Add npm min-release-age cooldown for supply chain protection - #20
Open
NicolasBonet wants to merge 2 commits into
Open
NicolasBonet wants to merge 2 commits into
NicolasBonet wants to merge 2 commits into
Conversation
Only resolve package versions published at least 7 days ago. npm ci and lockfile-clean installs are unaffected. See Expensify/Expensify#636594
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Details
min-release-age=7) so freshly published, possibly malicious package versions are not resolved;npm ciand lockfile-clean installs are unaffected..npmrcis also removed from.gitignoreso the config can be committed; publishing uses OIDC trusted publishing, so no token file is ever written there.Design doc: https://expensify.enterprise.slack.com/docs/T03SC9DTT/F0BNG8W2FML
Related Issues
https://github.com/Expensify/Expensify/issues/636594
Manual Tests
Tooling-only change, no library code affected. Existing CI
npm cicovers the no-op case.nvm useand confirmnpm --versionprints11.17.0.npm config get min-release-agefrom the repo root and confirm it prints7.npm ciand confirm it installs the lockfile contents without errors.npm install @types/node@latest --dry-runand confirm npm resolves a version published at least 7 days ago (currently22.20.1, not the fresh22.20.3).npm install @types/node@latest --dry-run --min-release-age=0and confirm npm resolves the fresh version, showing the bypass works.Linked PRs
None. No package version changes.