[HOLD App#96205][No QA] Add npm min-release-age cooldown for supply chain protection#95897
Draft
NicolasBonet wants to merge 4 commits into
Draft
[HOLD App#96205][No QA] Add npm min-release-age cooldown for supply chain protection#95897NicolasBonet wants to merge 4 commits into
NicolasBonet wants to merge 4 commits into
Conversation
Bump npm to 11.18.0 (first 11.x line with min-release-age-exclude) and configure a 7-day install cooldown in .npmrc, exempting Expensify-owned packages. CI installs npm 11 explicitly since Node 20 bundles npm 10. Lockfile regenerated with npm 11: platform-specific optional deps (@img/sharp-*) are now recorded, and optional peer dependencies are no longer auto-installed. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
NicolasBonet
force-pushed
the
claude-npm-min-release-age
branch
from
July 16, 2026 23:22
2d26918 to
387a004
Compare
The npm engine bump and setup-npm tooling are no longer needed: the Node 26 upgrade (#96205) ships npm 11.17.0 bundled, which already supports min-release-age (added in npm 11.10.0).
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.
MOBILE-EXPENSIFY: https://github.com/Expensify/Mobile-Expensify/pull/14014
HOLD on #96205 —
min-release-agerequires npm 11 (11.10+ for the setting, 11.17+ for the exclude list). That PR upgrades Node to 26.5.0, which bundles npm 11.17.0, so no separate npm bump is needed. Until it merges, npm 10 ignores the setting with a warning.Explanation of Change
Adds a 7-day npm install cooldown (
min-release-age) to protect against supply chain attacks, where compromised package versions are typically detected and unpublished within days of release..npmrc:min-release-age=7— npm refuses to resolve versions published less than 7 days ago. Expensify-owned packages (@expensify/*,expensify-common,react-native-onyx,eslint-config-expensify) are exempt viamin-release-age-excludeso internal releases install immediately.Notes:
npm ciinstalls from the lockfile without re-resolving, so day-to-day CI/dev installs are unaffected. The cooldown applies when dependencies are added or updated — exactly the supply chain window it targets.npm install <pkg> --min-release-age=0, or add the package to the exclude list..npmrccooldown for HybridApp builds (App'spostInstall.shrunsnpm installin that repo)..nvmrc-based provisioning.Fixed Issues
$ https://github.com/Expensify/Expensify/issues/636594
Tests
This is a tooling-only change with no runtime app code affected.
nvm install), verifynpm --versionprints11.17.0.npm ciand verify it completes without errors.npm install left-pad --dry-run(or any package with a release newer than 7 days) and verify npm resolves a version published at least 7 days ago.npm view expensify-common time --jsonand verify a hypothetical fresh internal release would still be installable (excluded packages resolve to their newest version).Offline tests
None — no runtime app code changes. npm install behavior offline is unchanged (installs resolve from cache/lockfile).
QA Steps
[No QA] — tooling-only change, no app behavior affected.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
N/A — tooling-only change, no UI.
Android: mWeb Chrome
N/A — tooling-only change, no UI.
iOS: Native
N/A — tooling-only change, no UI.
iOS: mWeb Safari
N/A — tooling-only change, no UI.
MacOS: Chrome / Safari
N/A — tooling-only change, no UI.