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

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: 4a0a00473045022100f90c0bb69a22b94c4fb6d929aacd8664d77dbc58095c444551521cc56fbb35460220626a33de0083a9b2affc4ab54c110597477674f14d8f28c1965cf67a31dc56a3:922c64590222798bb761d5b6d8e72950