Title: [APS-19734] fix: harden .npmrc with supply-chain security directives by Raghav11-11 · Pull Request #1192 · browserstack/browserstack-cypress-cli · GitHub
Open Graph Title: [APS-19734] fix: harden .npmrc with supply-chain security directives by Raghav11-11 · Pull Request #1192 · browserstack/browserstack-cypress-cli
X Title: [APS-19734] fix: harden .npmrc with supply-chain security directives by Raghav11-11 · Pull Request #1192 · 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/1192
X: @github
Domain: github.com
IPv4 address: 140.82.114.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:dbeabf33-3166-2bd7-3bee-d6de3170158c |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | D692:237D74:802DDA:AE03F0:6B04482C |
| html-safe-nonce | 5d8de8d4d9e76938bd54310377a22d9d5159bcf44264609aac9cfef0d6daac49 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENjkyOjIzN0Q3NDo4MDJEREE6QUUwM0YwOjZCMDQ0ODJDIiwidmlzaXRvcl9pZCI6IjEwNTc5MjcyNTc5OTUzNjQzOTYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 307b82bc18281292c956d1340af42e3703f80f6827e85f2a86763a212c89cad5 |
| hovercard-subject-tag | pull_request:4601845530 |
| 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/1192/files |
| twitter:image | https://avatars.githubusercontent.com/u/210357699?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/210357699?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 | d4495c3631faba668036f176d1f5946901c5172efd73a6edb984029e7d4f8e46 |
| 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 | 9ac4337fb7c6a5846cdfdb1a04f154d3c33ebc77 |
| 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