id: webpack-sourcemap-disclosure

info:
  name: Webpack Sourcemap Disclosure
  author: dhiyaneshDk
  severity: info
  metadata:
    max-request: 2
  tags: exposure,files

http:
  - method: GET
    path:
      - "{{BaseURL}}"
      - "{{RootURL}}/{{Path}}/{{map}}.js.map"

    matchers-condition: and
    matchers:
      - type: word
        words:
          - '"version":'
          - '"file":'
          - '"sources":'
        condition: and

      - type: status
        status:
          - 200

    extractors:
      - type: regex
        internal: true
        name: map
        group: 1
        regex:
          - "sourceMappingURL=([a-z-~0-9.]+).js.map"
# digest: 4a0a0047304502205667ace9982c459b70c77c1b7db5305b3b48d7d1a2701475ff70ec461c1837a2022100e0be3ad491fcbb650dfc1d167f9c0b819efbfc6414e8c105edad949f3ab560eb:922c64590222798bb761d5b6d8e72950