René's URL Explorer Experiment


Title: [APS-19017] fix: pin Semgrep CI image to sha256 digest by Rohannagariya1 · Pull Request #1129 · browserstack/browserstack-cypress-cli · GitHub

Open Graph Title: [APS-19017] fix: pin Semgrep CI image to sha256 digest by Rohannagariya1 · Pull Request #1129 · browserstack/browserstack-cypress-cli

X Title: [APS-19017] fix: pin Semgrep CI image to sha256 digest by Rohannagariya1 · Pull Request #1129 · browserstack/browserstack-cypress-cli

Description: Security Fix: APS-19017 (Low, supply-chain hygiene) Single-item PR — pins the Semgrep CI image from a mutable tag to its immutable digest. The other four items in APS-19017 were reviewed and are not included in this PR — reasoning at the bottom. Actual diff .github/workflows/Semgrep.yml: - image: returntocorp/semgrep:1.166.0 + image: returntocorp/semgrep:1.166.0@sha256:c180f0c93a17b420c0af5006214a29d3c747c5459c732b740191adf657dd0068 Why (INF-007) A version tag (:1.166.0) can be re-published by whoever owns the Docker Hub account at any time. Attack chain: Return-to-corp's Docker Hub account gets compromised (credential leak, MFA phishing, insider). Attacker re-publishes returntocorp/semgrep:1.166.0 with malicious layers added. Every subsequent CI run of this repo pulls the compromised image on next Semgrep step. Attacker's code executes inside our CI runner with access to GitHub Actions secrets — including the npm publish token for browserstack-cypress-cli. Attacker publishes a malicious version of the CLI to every BrowserStack Cypress customer's install. A sha256 digest is cryptographically immutable — Docker refuses to pull anything whose bytes don't hash to c180f0c9.... Even if Return-to-corp's account is compromised and the tag is re-published, Docker rejects the pull unless the digest matches the specific bytes we pinned to today. Verification Digest resolved via Docker Hub manifest API on 2026-09-16 — same image bytes master runs against today, just addressed by content-hash instead of tag. CI green post-change: CodeQL x3, semgrep/ci, Semgrep OSS, CodeRabbit. Other APS-19017 items — NOT in this PR INF-001 (axios ≥ 1.15.0) — already on master Confirmed via npm ls axios. No change needed. INF-005 (mocha → devDependencies) — REJECTED Ticket proposed this to shed the transitive serialize-javascript CVE (GHSA-5c6j-r48x-rmvq). Two problems: CVE is already mitigated on master. package.json has "overrides": { "serialize-javascript": ">=7.0.5" } — npm respects this override during resolution, so mocha's transitive serialize-javascript resolves to the patched version regardless of mocha's dependency section. The scanner that generated the ticket didn't account for the existing override. The move would break TestObservability for every default-config Cypress ≥ 10 customer. bin/testObservability/reporter/index.js:12 has: const Runnable = require('mocha/lib/runnable'); // need to handle as this isn't present in older mocha versions This is a regular require, not the requireModule() helper. Regular require walks up from the file's own location — from a globally-installed CLI's /usr/local/lib/node_modules/browserstack-cypress-cli/bin/testObservability/reporter/, it cannot reach the customer's project node_modules. Combined with: The CLI is globally installed per BS's official docs TestObservability is enabled by default for Cypress ≥ 10 → moving mocha to devDeps → npm install -g browserstack-cypress-cli uses --production → mocha not installed → next customer session → Runnable require throws MODULE_NOT_FOUND → TestObservability crashes on startup for every default-config Cypress ≥ 10 customer. INF-008 (files allowlist in package.json) — REJECTED The files this would hide from the npm tarball (.github/, CODEOWNERS, .eslintrc*, .editorconfig) are already public in this GitHub repo. Excluding them from the tarball doesn't protect any information that isn't already at github.com/browserstack/browserstack-cypress-cli. Framed as security in the ticket; is actually hygiene. Deferred as an optional hygiene PR if we want it later. CSL-003 (constants.js:401 md5 → sha256) — DEFERRED Changes the upload-dedup hash algorithm. A client-only bump would leave the CLI sending SHA-256 hashes that BS's server-side dedup (currently keyed on MD5 length/format) doesn't recognize → every next upload for every customer becomes a full re-upload until the SHA-256 cache warms. Needs client+server coordination and one-time bandwidth-spike acceptance. Separate ticket. Jira Ticket https://browserstack.atlassian.net/browse/APS-19017

Open Graph Description: Security Fix: APS-19017 (Low, supply-chain hygiene) Single-item PR — pins the Semgrep CI image from a mutable tag to its immutable digest. The other four items in APS-19017 were reviewed and are no...

X Description: Security Fix: APS-19017 (Low, supply-chain hygiene) Single-item PR — pins the Semgrep CI image from a mutable tag to its immutable digest. The other four items in APS-19017 were reviewed and are no...

Opengraph URL: https://github.com/browserstack/browserstack-cypress-cli/pull/1129

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.114.3

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:4d837bd3-0f7a-0cd0-7dda-6eea843f05eb
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idBAA2:321B08:2451F7:321866:6B04B698
html-safe-nonce53a8f5d14249ab36f72a2dd419ee1afa2207e054b790df2fc4d34d0dee7d1bb6
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQUEyOjMyMUIwODoyNDUxRjc6MzIxODY2OjZCMDRCNjk4IiwidmlzaXRvcl9pZCI6Ijc3MDMwMDQ3NDMxNTY5MzgzOTIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmaca12e30463260af7b4b7abcb5890822684ce0505bebdfcfe5e4c98520704d6eb4
hovercard-subject-tagpull_request:3865974452
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/1129/files
twitter:imagehttps://avatars.githubusercontent.com/u/142411639?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/142411639?s=400&v=4
og:image:altSecurity Fix: APS-19017 (Low, supply-chain hygiene) Single-item PR — pins the Semgrep CI image from a mutable tag to its immutable digest. The other four items in APS-19017 were reviewed and are no...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None378bd702ac792b3550e484ad39d9a898fcd25bb52ba6962b0c9cc457c1ea71c7
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
releaseb032e77f1ea437ede6c115446a0a467709b468e7
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/browserstack/browserstack-cypress-cli/pull/1129/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fbrowserstack%2Fbrowserstack-cypress-cli%2Fpull%2F1129%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%2F1129%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/1129/files
Reloadhttps://github.com/browserstack/browserstack-cypress-cli/pull/1129/files
Reloadhttps://github.com/browserstack/browserstack-cypress-cli/pull/1129/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
fix/APS-19017-supply-chain-hygienehttps://github.com/browserstack/browserstack-cypress-cli/tree/fix/APS-19017-supply-chain-hygiene
Conversation 2 https://github.com/browserstack/browserstack-cypress-cli/pull/1129
Commits 2 https://github.com/browserstack/browserstack-cypress-cli/pull/1129/commits
Checks 8 https://github.com/browserstack/browserstack-cypress-cli/pull/1129/checks
Files changed https://github.com/browserstack/browserstack-cypress-cli/pull/1129/files
Please reload this pagehttps://github.com/browserstack/browserstack-cypress-cli/pull/1129/files
[APS-19017] fix: pin Semgrep CI image to sha256 digest https://github.com/browserstack/browserstack-cypress-cli/pull/1129/files#top
Show all changes 2 commits https://github.com/browserstack/browserstack-cypress-cli/pull/1129/files
4015286 fix(security): supply-chain hygiene — mocha to devDeps, pin Semgrep i… Jun 15, 2026 https://github.com/browserstack/browserstack-cypress-cli/pull/1129/commits/40152862a2e8bc63699584583de3b89a72c617d7
38c4afd Revert mocha move: CVE already mitigated by serialize-javascript over… Raghav11-11 Sep 16, 2026 https://github.com/browserstack/browserstack-cypress-cli/pull/1129/commits/38c4afdddfb588d69550e10bc144ec035e3dca42
Clear filters https://github.com/browserstack/browserstack-cypress-cli/pull/1129/files
Please reload this pagehttps://github.com/browserstack/browserstack-cypress-cli/pull/1129/files
Please reload this pagehttps://github.com/browserstack/browserstack-cypress-cli/pull/1129/files
.github/workflows/Semgrep.ymlhttps://github.com/browserstack/browserstack-cypress-cli/pull/1129/files#diff-93dcf82f9faa3ee9c420f45a76c781fc44eb797fec2f444ce1d899713d09d3b2
View file https://github.com/browserstack/browserstack-cypress-cli/blob/38c4afdddfb588d69550e10bc144ec035e3dca42/.github/workflows/Semgrep.yml
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/browserstack/browserstack-cypress-cli/pull/1129/{{ revealButtonHref }}
https://github.com/browserstack/browserstack-cypress-cli/pull/1129/files#diff-93dcf82f9faa3ee9c420f45a76c781fc44eb797fec2f444ce1d899713d09d3b2
https://github.com/browserstack/browserstack-cypress-cli/pull/1129/files#diff-93dcf82f9faa3ee9c420f45a76c781fc44eb797fec2f444ce1d899713d09d3b2
Please reload this pagehttps://github.com/browserstack/browserstack-cypress-cli/pull/1129/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.