Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(logging): add section about debug.log's security & that private/secure information may exist there #432

Closed
1 task
Tracked by #536
darcyclarke opened this issue Jan 29, 2022 · 2 comments
Labels

Comments

@darcyclarke
Copy link
Contributor

Summary

There's been some confusion about npm's responsibility/capabilities to sanitize npm-debug.log's especially since we've previously issued a CVE for this (ref. GHSA-93f3-23rq-pjfp) which was/is confusing - let's clarify that.

Exit Criteria

  • Clearly document that debug logs may contain sensitive information & should be treated as such in the Logging section

Example of Wording

In regards to sensitive/private information & security best practices:
 
Logs that are generated & stored by npm can & will contain any number of references to information that was output from a project's own source code, scripts, packages & third-party processes; this means that although npm will do a best-effort job at redacting information we believe to be sensitive & are aware of, it does not fully prevent other scripts from generating logs that may include potentially sensitive information or configuration (including npm configuration). In general, you should consider npm-debug.log files to be sensitive & review them before exfiltrating/sharing them to untrusted parties.
 
npm configuration is often stored in either a .npmrc or package.json file; meaning this information is readily available to any system process in which the logs will be stored. If users provide a registry configuration via. command line flag, then that information is also readily available in memory where third-party packages may also be executing code. The only realistic mitigation tactic I can foresee is to thoroughly vet & ensure code living & executing on your system is trustworthy.

@darcyclarke darcyclarke changed the title docs(logging): Add section about security/privacy docs(logging): add section about debug.log's security & want that private/secure information may exist there Jan 29, 2022
@darcyclarke darcyclarke changed the title docs(logging): add section about debug.log's security & want that private/secure information may exist there docs(logging): add section about debug.log's security & that private/secure information may exist there Jan 29, 2022
@ljharb
Copy link

ljharb commented Jan 29, 2022

If it's generating the log inside a project folder, it could be easily committed and/or published - perhaps if the log's not going to be sanitized, then it should be generated somewhere else?

@darcyclarke darcyclarke mentioned this issue Mar 23, 2022
32 tasks
@darcyclarke darcyclarke mentioned this issue Aug 22, 2022
46 tasks
@lukekarrys
Copy link
Contributor

This is complete. And files are no longer written to a project directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants