40 lines
973 B
YAML
40 lines
973 B
YAML
id: package-json
|
|
|
|
info:
|
|
name: NPM package.json Disclosure
|
|
author: geeknik,afaq,noraj
|
|
severity: info
|
|
description: |
|
|
All NodeJS packages contain a file, usually in the project root, called package.json - this file holds various metadata relevant to the project generated by package managers such as npm, yarn, pnpm.
|
|
reference:
|
|
- https://docs.npmjs.com/cli/v9/configuring-npm/package-json
|
|
- https://classic.yarnpkg.com/lang/en/docs/package-json/
|
|
- https://pnpm.io/package_json
|
|
metadata:
|
|
max-request: 2
|
|
verified: true
|
|
tags: config,exposure,node,npm
|
|
|
|
http:
|
|
- method: GET
|
|
path:
|
|
- "{{BaseURL}}/package.json"
|
|
- "{{BaseURL}}/package-lock.json"
|
|
|
|
matchers-condition: and
|
|
matchers:
|
|
- type: word
|
|
words:
|
|
- "name"
|
|
- "version"
|
|
condition: and
|
|
|
|
- type: word
|
|
part: header
|
|
words:
|
|
- "application/json"
|
|
|
|
- type: status
|
|
status:
|
|
- 200
|