id: npm-debug-log

info:
  name: NPM Debug Log Disclosure
  author: Hardik-Solanki
  severity: low
  description: NPM Debug log file exposed.
  reference:
    - https://github.com/maurosoria/dirsearch/blob/master/db/dicc.txt
    - https://docs.npmjs.com/generating-and-locating-npm-debug.log-files
  classification:
    cpe: cpe:2.3:a:npmjs:npm:*:*:*:*:*:*:*:*
  metadata:
    verified: true
    max-request: 2
    vendor: npmjs
    product: npm
    github-query: filename:npm-debug.log
  tags: exposure,npm,logs,debug

http:
  - method: GET
    path:
      - "{{BaseURL}}/npm-debug.log"
      - "{{BaseURL}}/assets/npm-debug.log"

    stop-at-first-match: true

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - 'verbose cli'
          - 'verbose stack'
        condition: and

      - type: status
        status:
          - 200
# digest: 490a004630440220262ef650a80140c3db60eb3961c1e57e7c48f29c050b497106bb81ef7f14401902203d0e1cf83c0ac4485fdbcbe8672bb6442d84078139740cba63496b7df0567d20:922c64590222798bb761d5b6d8e72950