René's URL Explorer Experiment


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 , npm writes the exact resolved version to package.json (e.g., "axios": "1.15.0") instead of a caret range ("^1.15.0"). Why: without this, npm install @X.Y.Z writes ^X.Y.Z which allows silent upgrades to any 1.x.x on the next npm install. That silent upgrade path is how you get accidentally-bumped-to-vulnerable transitives without a code review. Exact versions force every version bump to be a deliberate act with a diff. Flags NOT added — proposed by tech spec / earlier iteration, rejected on review Applying the rule: if a flag has no concrete "here's what specifically breaks without it" justification, and might cause weird breakages, don't add it. Four flags fail that test in this repo: ignore-scripts=true — rejected The runtime path already blocks scripts explicitly: bin/helpers/packageInstaller.js:102, 105 calls spawn('npm', ['install', '--ignore-scripts', ...]) so the CLI's runtime deps-install on customer machines is already protected via cmdline flag. Doesn't rely on .npmrc. Real footgun: packages with native builds (bcrypt, sharp, node-sass) use postinstall to compile their native binary. This flag silently skips the compile → install "succeeds" → runtime hits MODULE_NOT_FOUND or invalid ELF header with no obvious cause. Dev-time supply chain risk is low — our deps are vetted, named packages. audit-level=high — rejected Our CI doesn't gate on npm audit (uses Semgrep, CodeQL, SCA scanner instead). Flag has no operational effect anywhere in the pipeline. If a contributor runs npm audit locally, this flag hides medium/low CVEs from the report — slightly counterproductive. If we ever decide to gate CI on npm audit, we should be explicit in the CI script (npm audit --audit-level=high), not hide the threshold in .npmrc. legacy-peer-deps=false — rejected Already the default in npm 7+. Adding it doesn't change behavior; it's noise. npm install --legacy-peer-deps cmdline override for one-off cases still works regardless of this flag. engine-strict=true — rejected Only affects contributors (customer installs read customer's .npmrc). Real footgun: contributor 0.0.1 off the pinned Node version can't even run npm install — install fails hard. For a repo with casual contributors, this is friction that produces no real security value. The package.json engines field's npm WARN EBADENGINE message on install is usually enough signal. No consistent BS-wide policy on this — adding it here creates a one-off convention. Testing / Verification CI green: CodeQL x3, semgrep/ci, Semgrep OSS, CodeRabbit. min-release-age=7 verified with npm view time on recent bumps — expected versions resolve; freshly-published versions get skipped as documented. strict-ssl=true verified by temporarily setting strict-ssl=false in ~/.npmrc and running npm install in this repo — install correctly uses project-level true regardless. save-exact=true verified by running npm install lodash@4.17.21 --dry-run — writes "lodash": "4.17.21" (no caret). Note on branch history This PR supersedes #1128 (fix/APS-19734-npmrc-hardening), which was closed to standardize branch naming to APS-- format. Identical commits, same review outcome pending. Jira Ticket https://browserstack.atlassian.net/browse/APS-19734

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

direct link

Domain: github.com

IPv4 address: 140.82.114.4

react-profiling0
react-import-mapreact,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-controllerpull_requests
route-actionfiles
fetch-noncev2:dbeabf33-3166-2bd7-3bee-d6de3170158c
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idD692:237D74:802DDA:AE03F0:6B04482C
html-safe-nonce5d8de8d4d9e76938bd54310377a22d9d5159bcf44264609aac9cfef0d6daac49
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENjkyOjIzN0Q3NDo4MDJEREE6QUUwM0YwOjZCMDQ0ODJDIiwidmlzaXRvcl9pZCI6IjEwNTc5MjcyNTc5OTUzNjQzOTYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac307b82bc18281292c956d1340af42e3703f80f6827e85f2a86763a212c89cad5
hovercard-subject-tagpull_request:4601845530
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/browserstack/browserstack-cypress-cli/pull/1192/files
twitter:imagehttps://avatars.githubusercontent.com/u/210357699?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/210357699?s=400&v=4
og:image:altSecurity 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_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noned4495c3631faba668036f176d1f5946901c5172efd73a6edb984029e7d4f8e46
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/browserstack/browserstack-cypress-cli git https://github.com/browserstack/browserstack-cypress-cli.git
octolytics-dimension-user_id1119453
octolytics-dimension-user_loginbrowserstack
octolytics-dimension-repository_id242935045
octolytics-dimension-repository_nwobrowserstack/browserstack-cypress-cli
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id242935045
octolytics-dimension-repository_network_root_nwobrowserstack/browserstack-cypress-cli
turbo-body-classeslogged-out env-production page-responsive
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release9ac4337fb7c6a5846cdfdb1a04f154d3c33ebc77
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/browserstack/browserstack-cypress-cli/pull/1192/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fbrowserstack%2Fbrowserstack-cypress-cli%2Fpull%2F1192%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fbrowserstack%2Fbrowserstack-cypress-cli%2Fpull%2F1192%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=browserstack%2Fbrowserstack-cypress-cli
Reloadhttps://github.com/browserstack/browserstack-cypress-cli/pull/1192/files
Reloadhttps://github.com/browserstack/browserstack-cypress-cli/pull/1192/files
Reloadhttps://github.com/browserstack/browserstack-cypress-cli/pull/1192/files
browserstackhttps://github.com/browserstack
browserstack-cypress-clihttps://github.com/browserstack/browserstack-cypress-cli
Codehttps://github.com/browserstack/browserstack-cypress-cli
Issues28 (28)https://github.com/browserstack/browserstack-cypress-cli/issues
Pull requests47 (47)https://github.com/browserstack/browserstack-cypress-cli/pulls
Actionshttps://github.com/browserstack/browserstack-cypress-cli/actions
Projectshttps://github.com/browserstack/browserstack-cypress-cli/projects
Security and quality1 (1)https://github.com/browserstack/browserstack-cypress-cli/security
Insightshttps://github.com/browserstack/browserstack-cypress-cli/insights
Sign up for GitHub https://github.com/signup?return_to=%2Fbrowserstack%2Fbrowserstack-cypress-cli%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fbrowserstack%2Fbrowserstack-cypress-cli%2Fissues%2Fnew%2Fchoose
karanshah-browserstackhttps://github.com/karanshah-browserstack
masterhttps://github.com/browserstack/browserstack-cypress-cli/tree/master
APS-19734-npmrc-hardeninghttps://github.com/browserstack/browserstack-cypress-cli/tree/APS-19734-npmrc-hardening
Conversation 1 https://github.com/browserstack/browserstack-cypress-cli/pull/1192
Commits 4 https://github.com/browserstack/browserstack-cypress-cli/pull/1192/commits
Checks 5 https://github.com/browserstack/browserstack-cypress-cli/pull/1192/checks
Files changed https://github.com/browserstack/browserstack-cypress-cli/pull/1192/files
Please reload this pagehttps://github.com/browserstack/browserstack-cypress-cli/pull/1192/files
[APS-19734] fix: harden .npmrc with supply-chain security directives https://github.com/browserstack/browserstack-cypress-cli/pull/1192/files#top
Show all changes 4 commits https://github.com/browserstack/browserstack-cypress-cli/pull/1192/files
2e489f8 fix(security): harden .npmrc with supply-chain directives [APS-19734] Jun 11, 2026 https://github.com/browserstack/browserstack-cypress-cli/pull/1192/commits/2e489f8786f93a92afd0eb9573f7bfaeffcc8be0
57a8eae Merge branch 'master' into fix/APS-19734-npmrc-hardening Raghav11-11 Sep 15, 2026 https://github.com/browserstack/browserstack-cypress-cli/pull/1192/commits/57a8eaed2f7ab74142600e09b0ff721b1e1b28a6
c6dc2c8 update Raghav11-11 Sep 16, 2026 https://github.com/browserstack/browserstack-cypress-cli/pull/1192/commits/c6dc2c88bc16091d0c9000d6f7c7af5f4865d180
2e0838c Merge branch 'master' into APS-19734-npmrc-hardening Raghav11-11 Sep 22, 2026 https://github.com/browserstack/browserstack-cypress-cli/pull/1192/commits/2e0838c543f37ba1792db01c342a576d42ca74fa
Clear filters https://github.com/browserstack/browserstack-cypress-cli/pull/1192/files
Please reload this pagehttps://github.com/browserstack/browserstack-cypress-cli/pull/1192/files
Please reload this pagehttps://github.com/browserstack/browserstack-cypress-cli/pull/1192/files
.npmrchttps://github.com/browserstack/browserstack-cypress-cli/pull/1192/files#diff-e813096d69c49812e40e00be9ac8fa14d77f0ec1f97ab4c45cb096b3bedd35de
View file https://github.com/browserstack/browserstack-cypress-cli/blob/2e0838c543f37ba1792db01c342a576d42ca74fa/.npmrc
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/browserstack/browserstack-cypress-cli/pull/1192/{{ revealButtonHref }}
Please reload this pagehttps://github.com/browserstack/browserstack-cypress-cli/pull/1192/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlno-cache

Viewport: width=device-width


URLs of crawlers that visited me.