id: webpack-sourcemap-disclosure

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

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: 490a004630440220395c601a9281c0ac3a24b18ea058c26df360379f7402b3d327900a32fef5ca2c022052fb1ee74deefa1980bf6a4ae15e98fee835848d52802192b1347926a1ba1674:922c64590222798bb761d5b6d8e72950