[No QA] Add npm min-release-age cooldown for supply chain protection - #95897
Conversation
2d26918 to
387a004
Compare
1d20b64 to
a1c538e
Compare
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> Add setup-npm.sh script for installing the pinned npm version Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Scope PR to the min-release-age cooldown only 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). Generate new package lock
6f61238 to
e922080
Compare
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
List each self-published package App installs from the registry instead of a scope wildcard so every exclusion is visible and reviewed.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚧 roryabraham has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/roryabraham in version: 9.4.82-0 🚀
|
|
🚀 Deployed to staging by https://github.com/roryabraham in version: 9.4.86-0 🚀
|
|
🚀 Deployed to staging by https://github.com/roryabraham in version: 9.4.89-0 🚀
|
|
🚀 Deployed to production by https://github.com/luacmartins in version: 9.4.89-0 🚀
Bundle Size Analysis (Sentry): |
MOBILE-EXPENSIFY: https://github.com/Expensify/Mobile-Expensify/pull/14014
Explanation of Change
min-release-age=7) so freshly published, possibly malicious package versions are not resolved;npm ciand lockfile-clean installs are unaffected.Design doc: https://expensify.enterprise.slack.com/docs/T03SC9DTT/F0BNG8W2FML
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 @types/node@latest --dry-runand verify 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 verify npm resolves the fresh version, showing the bypass works.npm config get min-release-age-excludeand verify it lists the eight self-published packages.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.