Title: [APS-19734] fix: harden .npmrc with supply-chain security directives by Rohannagariya1 · Pull Request #1128 · browserstack/browserstack-cypress-cli · GitHub
Open Graph Title: [APS-19734] fix: harden .npmrc with supply-chain security directives by Rohannagariya1 · Pull Request #1128 · browserstack/browserstack-cypress-cli
X Title: [APS-19734] fix: harden .npmrc with supply-chain security directives by Rohannagariya1 · Pull Request #1128 · browserstack/browserstack-cypress-cli
Description: Security Fix: APS-19734 — .npmrc supply-chain hardening
Repo failed BrowserStack's weekly Enigma .npmrc audit (SC-12282). This PR adds the subset of the Supply Chain Security Enhancements tech spec that actually delivers value for a public CLI repo. The remaining directives from the tech spec were reviewed and dropped — reasoning at the bottom.
Actual diff — 3 lines added to .npmrc
min-release-age=7
strict-ssl=true
save-exact=true
Flags added — what each does and why
min-release-age=7
Only resolves package versions that were published ≥ 7 days ago during install.
Why: blocks freshly-published malicious versions (event-stream, ua-parser-js, Shai-Hulud-style attacks) before the community or npm registry can detect and yank them. A version published today that's malicious usually gets yanked within 24–72 hours; the 7-day window means we never install those versions in that danger period.
Scope: dev-time only — customers doing npm install browserstack-cypress-cli read their own .npmrc, not ours. Protects our supply chain from a freshly-published malicious transitive dep landing in our package-lock.json.
Compatibility: requires npm 11.10+. Older npm silently ignores the flag (no harm, just no protection).
strict-ssl=true
Enforces TLS certificate validation when npm connects to any HTTPS URL (npm registry, tarball downloads, etc.).
Why: true is npm's default, but a contributor on a corporate proxy or MITM'd network may have strict-ssl=false set in their ~/.npmrc as a workaround. That personal override silently accepts fake certs on all their npm installs — including when they clone this repo and run npm install. Setting strict-ssl=true at the project level sits above user-level config in npm's precedence order, so it overrides the personal override and forces cert validation on our repo's installs.
What could go wrong without it: contributor on compromised network → their ~/.npmrc accepts fake npmjs.org cert → malicious axios ships into our package-lock.json → we push that lockfile to master.
Scope: dev-time only, same as above. Zero effect on customer installs.
save-exact=true
When a contributor runs npm install
Open Graph Description: Security Fix: APS-19734 — .npmrc supply-chain hardening Repo failed BrowserStack's weekly Enigma .npmrc audit (SC-12282). This PR adds the subset of the Supply Chain Security Enhancements tech ...
X Description: Security Fix: APS-19734 — .npmrc supply-chain hardening Repo failed BrowserStack's weekly Enigma .npmrc audit (SC-12282). This PR adds the subset of the Supply Chain Security Enhancements t...
Opengraph URL: https://github.com/browserstack/browserstack-cypress-cli/pull/1128
X: @github
Domain: github.com
IPv4 address: 140.82.113.4
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:ec11bc1d-18eb-0c64-65b2-149b31e7e1ac |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 8EF4:1F63A9:40D412:59AAF6:6B0450FC |
| html-safe-nonce | 4b75e6f64bc50fa374c2e3ddc3055d8bb523e773d3d63ee79959a4fc3164feae |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RUY0OjFGNjNBOTo0MEQ0MTI6NTlBQUY2OjZCMDQ1MEZDIiwidmlzaXRvcl9pZCI6IjM0NTk1NTc0MDA5Mzg1NjU4ODQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 17e3c73742edf2947bdc14ae44a8a142091bac6fe433525efd338605242ba25f |
| hovercard-subject-tag | pull_request:3850013990 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/browserstack/browserstack-cypress-cli/pull/1128/files |
| twitter:image | https://avatars.githubusercontent.com/u/142411639?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/142411639?s=400&v=4 |
| og:image:alt | Security Fix: APS-19734 — .npmrc supply-chain hardening Repo failed BrowserStack's weekly Enigma .npmrc audit (SC-12282). This PR adds the subset of the Supply Chain Security Enhancements tech ... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 002aa6b95ffa730b0aec436a5c383f536ad677284e60056037fb120afe37b730 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/browserstack/browserstack-cypress-cli git https://github.com/browserstack/browserstack-cypress-cli.git |
| octolytics-dimension-user_id | 1119453 |
| octolytics-dimension-user_login | browserstack |
| octolytics-dimension-repository_id | 242935045 |
| octolytics-dimension-repository_nwo | browserstack/browserstack-cypress-cli |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 242935045 |
| octolytics-dimension-repository_network_root_nwo | browserstack/browserstack-cypress-cli |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 059f24c781e3a0d7df3f27a97da0e93fab06ae39 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | no-cache |
Viewport: width=device-width