id: npm-cli-metrics-json

info:
  name: NPM Anonymous CLI Metrics Json
  author: DhiyaneshDK
  severity: low
  description: anonymous-cli-metrics.json internal file in NPM is exposed.
  classification:
    cpe: cpe:2.3:a:npmjs:npm:*:*:*:*:*:*:*:*
  metadata:
    verified: true
    max-request: 2
    vendor: npmjs
    product: npm
    shodan-query: html:"anonymous-cli-metrics.json"
  tags: npm,devops,exposure,files,vuln

http:
  - method: GET
    path:
      - "{{BaseURL}}/anonymous-cli-metrics.json"
      - "{{BaseURL}}/.npm/anonymous-cli-metrics.json"

    stop-at-first-match: true

    matchers-condition: and
    matchers:
      - type: word
        words:
          - '"metricId"'
          - '"metrics"'
        condition: and

      - type: status
        status:
          - 200
# digest: 4a0a00473045022100afee09016ca4fd8d2c6660c7cfe41f2cbd88039be23349a8760caddbe2c8b7d6022069a0c0b7be6e1a416600749b72c2eae85348e93858f84df25084c0b05d8b3870:922c64590222798bb761d5b6d8e72950