-
Notifications
You must be signed in to change notification settings - Fork 19
chore: add .npmrc with supply chain protection #244
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| # Supply chain protection | ||
| # - save-exact: pin to exact versions instead of semver ranges | ||
| # - min-release-age: quarantine newly published packages for 7 days | ||
| # (blocks typosquatting & fast-publish supply chain attacks like axios@1.14.1) | ||
| save-exact=true | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Small but important scope gap: |
||
| min-release-age=7 | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think this enables the protection yet. The release-age gate was added in npm CLI |
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we do move the repo to npm 11.10+ for supply-chain hardening, I’d consider adding
allow-git=nonehere in the same pass. npm’s own install docs recommend it because git dependencies can override the git executable via nested.npmrcfiles, and I couldn’t find any git-based deps inpackage.jsonorpackage-lock.json, so it looks like a safe default for this project.