[BUG] npm audit - explain and show data send to the registry
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 10.1k
- Forks
- 4.7k
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 19
Description
Hey, according to the docs:
The audit command submits a description of the dependencies configured in your project to your default registry and asks for a report of known vulnerabilities. (...)
However, this does not state clearly the exact data sent to the registry.
This, along with a lack of an "offline mode" and the fact that some private npm registries may not support audit requests:
$ npm audit
npm ERR! code ENOAUDIT
npm ERR! audit Your configured registry (<some registry URL>) does not support audit requests
may end up with people using the --registry=https://registry.npmjs.org flag and sending potentially sensitive data to a public registry.
It would be great to:
- Extend the
npm auditdocumentation so it clearly states what exact data is sent (package.json? package-lock.json? just list of dependencies with their versions?) - Adding a
--dry-runoption to thenpm auditcommand, so it shows the data that will be sent. - Making
npm auditfail if it gets an unrecognized option, so it does not send a request if someone mistakenly donpm audit --halp - (Wishful thinking?) Have an
--offlinemode
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked npm audit documentation and the npm audit command behavior described in the issue. Determine which request data is sent, how unrecognized options are handled, and whether dry-run or offline behavior is feasible; done means the agreed scope is documented and verified without sending unintended data.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nodejs
- Domain
- cli, documentation, security
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100