René's URL Explorer Experiment


Title: security: URL/path/JWT validation + proxy warning (APS-19008 partial / 19010 / 19011) by Rohannagariya1 · Pull Request #1141 · browserstack/browserstack-cypress-cli · GitHub

Open Graph Title: security: URL/path/JWT validation + proxy warning (APS-19008 partial / 19010 / 19011) by Rohannagariya1 · Pull Request #1141 · browserstack/browserstack-cypress-cli

X Title: security: URL/path/JWT validation + proxy warning (APS-19008 partial / 19010 / 19011) by Rohannagariya1 · Pull Request #1141 · browserstack/browserstack-cypress-cli

Description: Summary Ships the low-blast-radius subset of the CLI critical findings (per the agreed proposal); high-blast-radius items are left as documented accepted-risk / opt-in. APS-19010 (env-var API redirect): only honour BSTACK_CYPRESS_NODE_ENV URL overrides (RAILS_HOST / UPLOAD_URL / DASHBOARD_URL / USAGE_REPORTING_URL) when they point at *.browserstack.com / *.bsstag.com / localhost; otherwise warn and fall back to the production defaults. Preserves all internal dev/QA usage; blocks arbitrary external redirects. APS-19011: validate the API-supplied upload_url host before using it for the tests.zip upload; warn (not cert-pin) when an HTTP(S) proxy routes all API traffic incl. credentials; structural-only JWT check on the TestHub token (defence-in-depth — the CLI has no key to verify the signature). APS-19008 (browserstack.json half): read browserstack.json via JSON.parse(fs.readFileSync) instead of require(), so a .js config can't execute code; require .json extension + project-root path containment. New bin/helpers/securityValidation.js (stdlib-only): isAllowedBrowserstackUrl, isPathInsideBase, isWellFormedJwt. Tested New test/unit/bin/helpers/securityValidation.js — 13 tests, both paths (accepts prod/staging/localhost; rejects attacker hosts, suffix-spoofing like browserstack.com.attacker.net, non-http schemes; path-containment accepts inside / rejects ../ + sibling-prefix; JWT structural accept/reject). All pass. Existing validateBstackJson tests still pass with the JSON.parse rewrite. Smoke-tested config.js both paths: attacker RAILS_HOST warned+ignored (keeps prod default); legit *.bsstag.com override applied. Deliberately NOT changed (accepted-risk / opt-in — needs product decision) cypress.config.js sandbox (APS-19008 other half): cypress.config.js is legitimately JS that imports plugins; a vm sandbox breaks real configs, so it is NOT sandboxed by default. npm_dependencies lifecycle scripts (APS-19009): STILL OPEN. Not fixed here. ⚠️ Note: PR #1128's repo .npmrc (ignore-scripts=true) does not protect end users — packageInstaller copies the user's .npmrc into the temp install dir, not the CLI's own. APS-19009's real fix (--ignore-scripts + package name/version validation + shell:false) remains open. Fixes APS-19010; partially fixes APS-19008 and APS-19011.

Open Graph Description: Summary Ships the low-blast-radius subset of the CLI critical findings (per the agreed proposal); high-blast-radius items are left as documented accepted-risk / opt-in. APS-19010 (env-var API redi...

X Description: Summary Ships the low-blast-radius subset of the CLI critical findings (per the agreed proposal); high-blast-radius items are left as documented accepted-risk / opt-in. APS-19010 (env-var API redi...

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

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.112.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:a91d4b60-de5c-2c47-b096-7a486e81c779
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idA2E6:2A756:368127:4A2393:6B0437F4
html-safe-nonceadea3b69b3703829c1513d2b1084665d075959fc556cffc03809ad62a80b948c
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMkU2OjJBNzU2OjM2ODEyNzo0QTIzOTM6NkIwNDM3RjQiLCJ2aXNpdG9yX2lkIjoiMjc1NDk5MTc1MDAxOTAzNzE3MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacb587a56b4501d0c8aba78f88211c9a0d67973f17ef8e3fc376a282485846d6ae
hovercard-subject-tagpull_request:3978222811
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/1141/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:altSummary Ships the low-blast-radius subset of the CLI critical findings (per the agreed proposal); high-blast-radius items are left as documented accepted-risk / opt-in. APS-19010 (env-var API redi...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None9185ccfefd80c1ff2d9ddcdb0cd2becf46b5a1efbbf30741a895e4bb8de25e64
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 full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release06dc448a76fe4751ac1db26524aefa3aa3e889a8
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/browserstack/browserstack-cypress-cli/pull/1141/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fbrowserstack%2Fbrowserstack-cypress-cli%2Fpull%2F1141%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%2F1141%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/1141/files
Reloadhttps://github.com/browserstack/browserstack-cypress-cli/pull/1141/files
Reloadhttps://github.com/browserstack/browserstack-cypress-cli/pull/1141/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
Rohannagariya1https://github.com/Rohannagariya1
masterhttps://github.com/browserstack/browserstack-cypress-cli/tree/master
security/cypress-cli-safe-subsethttps://github.com/browserstack/browserstack-cypress-cli/tree/security/cypress-cli-safe-subset
Conversation 5 https://github.com/browserstack/browserstack-cypress-cli/pull/1141
Commits 4 https://github.com/browserstack/browserstack-cypress-cli/pull/1141/commits
Checks 5 https://github.com/browserstack/browserstack-cypress-cli/pull/1141/checks
Files changed https://github.com/browserstack/browserstack-cypress-cli/pull/1141/files
Please reload this pagehttps://github.com/browserstack/browserstack-cypress-cli/pull/1141/files
security: URL/path/JWT validation + proxy warning (APS-19008 partial / 19010 / 19011) https://github.com/browserstack/browserstack-cypress-cli/pull/1141/files#top
Show all changes 4 commits https://github.com/browserstack/browserstack-cypress-cli/pull/1141/files
e578fad security: validate override/response URLs, config path, JWT; warn on … Rohannagariya1 Jul 2, 2026 https://github.com/browserstack/browserstack-cypress-cli/pull/1141/commits/e578fadb257e45781ac16ef1f6b2682a285e77cc
999a0b5 security(cli): suppress false-positive path-traversal Semgrep finding… Rohannagariya1 Aug 6, 2026 https://github.com/browserstack/browserstack-cypress-cli/pull/1141/commits/999a0b5e3d0bcb051d0fde16cbefaf2ba045e149
12f73d3 [APS-19008] fix IPv6-loopback allowlist entry (::1 -> [::1]) Rohannagariya1 Aug 6, 2026 https://github.com/browserstack/browserstack-cypress-cli/pull/1141/commits/12f73d31a12aa8b798be8390686fc0285aa212e3
c5b17c2 Merge remote-tracking branch 'origin/master' into security/cypress-cl… Rohannagariya1 Aug 6, 2026 https://github.com/browserstack/browserstack-cypress-cli/pull/1141/commits/c5b17c2d839d8a1eb6f8be6a462857dbd19a19ee
Clear filters https://github.com/browserstack/browserstack-cypress-cli/pull/1141/files
Please reload this pagehttps://github.com/browserstack/browserstack-cypress-cli/pull/1141/files
Please reload this pagehttps://github.com/browserstack/browserstack-cypress-cli/pull/1141/files
config.js https://github.com/browserstack/browserstack-cypress-cli/pull/1141/files#diff-897085e5322b0e10348313dfa9e4515c50981147821f2b6bfdb634ab7e29d5ed
getInitialDetails.js https://github.com/browserstack/browserstack-cypress-cli/pull/1141/files#diff-5f7ac88a3ed22db57c04bfe63e938317bb88d10dbe6ff48ab302069810f7562d
helper.js https://github.com/browserstack/browserstack-cypress-cli/pull/1141/files#diff-18b187a85729a3b883797258dfe0e56770438b8167d16959edecec687637a913
securityValidation.js https://github.com/browserstack/browserstack-cypress-cli/pull/1141/files#diff-1b655a19161b6017220f174ff5bdf02e99f34371a14cd4cd3b7b3e4971fb4f3d
utils.js https://github.com/browserstack/browserstack-cypress-cli/pull/1141/files#diff-767dbfdc97b44842992762e966fcc633ebbf9d90e8af9942bdf48aca05d55a69
utils.js https://github.com/browserstack/browserstack-cypress-cli/pull/1141/files#diff-27cd1c8e7d63b737bed9c7909b050bc66e3c293a01bbc042a2d4f1dcbca2553f
securityValidation.js https://github.com/browserstack/browserstack-cypress-cli/pull/1141/files#diff-4ae740abf7df3236fb948546def95ef4f318e26fbf46f5a7c01fe00735fa15a9
bin/helpers/config.jshttps://github.com/browserstack/browserstack-cypress-cli/pull/1141/files#diff-897085e5322b0e10348313dfa9e4515c50981147821f2b6bfdb634ab7e29d5ed
View file https://github.com/browserstack/browserstack-cypress-cli/blob/c5b17c2d839d8a1eb6f8be6a462857dbd19a19ee/bin/helpers/config.js
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/browserstack/browserstack-cypress-cli/pull/1141/{{ revealButtonHref }}
https://github.com/browserstack/browserstack-cypress-cli/pull/1141/files#diff-897085e5322b0e10348313dfa9e4515c50981147821f2b6bfdb634ab7e29d5ed
bin/helpers/getInitialDetails.jshttps://github.com/browserstack/browserstack-cypress-cli/pull/1141/files#diff-5f7ac88a3ed22db57c04bfe63e938317bb88d10dbe6ff48ab302069810f7562d
View file https://github.com/browserstack/browserstack-cypress-cli/blob/c5b17c2d839d8a1eb6f8be6a462857dbd19a19ee/bin/helpers/getInitialDetails.js
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/browserstack/browserstack-cypress-cli/pull/1141/{{ revealButtonHref }}
https://github.com/browserstack/browserstack-cypress-cli/pull/1141/files#diff-5f7ac88a3ed22db57c04bfe63e938317bb88d10dbe6ff48ab302069810f7562d
https://github.com/browserstack/browserstack-cypress-cli/pull/1141/files#diff-5f7ac88a3ed22db57c04bfe63e938317bb88d10dbe6ff48ab302069810f7562d
https://github.com/browserstack/browserstack-cypress-cli/pull/1141/files#diff-5f7ac88a3ed22db57c04bfe63e938317bb88d10dbe6ff48ab302069810f7562d
https://github.com/browserstack/browserstack-cypress-cli/pull/1141/files#diff-5f7ac88a3ed22db57c04bfe63e938317bb88d10dbe6ff48ab302069810f7562d
https://github.com/browserstack/browserstack-cypress-cli/blob/master/CODEOWNERS#L16
bin/helpers/helper.jshttps://github.com/browserstack/browserstack-cypress-cli/pull/1141/files#diff-18b187a85729a3b883797258dfe0e56770438b8167d16959edecec687637a913
View file https://github.com/browserstack/browserstack-cypress-cli/blob/c5b17c2d839d8a1eb6f8be6a462857dbd19a19ee/bin/helpers/helper.js
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/browserstack/browserstack-cypress-cli/pull/1141/{{ revealButtonHref }}
https://github.com/browserstack/browserstack-cypress-cli/pull/1141/files#diff-18b187a85729a3b883797258dfe0e56770438b8167d16959edecec687637a913
https://github.com/browserstack/browserstack-cypress-cli/pull/1141/files#diff-18b187a85729a3b883797258dfe0e56770438b8167d16959edecec687637a913
bin/helpers/securityValidation.jshttps://github.com/browserstack/browserstack-cypress-cli/pull/1141/files#diff-1b655a19161b6017220f174ff5bdf02e99f34371a14cd4cd3b7b3e4971fb4f3d
View file https://github.com/browserstack/browserstack-cypress-cli/blob/c5b17c2d839d8a1eb6f8be6a462857dbd19a19ee/bin/helpers/securityValidation.js
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/browserstack/browserstack-cypress-cli/pull/1141/{{ revealButtonHref }}
Please reload this pagehttps://github.com/browserstack/browserstack-cypress-cli/pull/1141/files
https://github.com/browserstack/browserstack-cypress-cli/blob/master/CODEOWNERS#L18
bin/helpers/utils.jshttps://github.com/browserstack/browserstack-cypress-cli/pull/1141/files#diff-767dbfdc97b44842992762e966fcc633ebbf9d90e8af9942bdf48aca05d55a69
View file https://github.com/browserstack/browserstack-cypress-cli/blob/c5b17c2d839d8a1eb6f8be6a462857dbd19a19ee/bin/helpers/utils.js
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/browserstack/browserstack-cypress-cli/pull/1141/{{ revealButtonHref }}
https://github.com/browserstack/browserstack-cypress-cli/pull/1141/files#diff-767dbfdc97b44842992762e966fcc633ebbf9d90e8af9942bdf48aca05d55a69
https://github.com/browserstack/browserstack-cypress-cli/pull/1141/files#diff-767dbfdc97b44842992762e966fcc633ebbf9d90e8af9942bdf48aca05d55a69
https://github.com/browserstack/browserstack-cypress-cli/pull/1141/files#diff-767dbfdc97b44842992762e966fcc633ebbf9d90e8af9942bdf48aca05d55a69
https://github.com/browserstack/browserstack-cypress-cli/blob/master/CODEOWNERS#L8
bin/testhub/utils.jshttps://github.com/browserstack/browserstack-cypress-cli/pull/1141/files#diff-27cd1c8e7d63b737bed9c7909b050bc66e3c293a01bbc042a2d4f1dcbca2553f
View file https://github.com/browserstack/browserstack-cypress-cli/blob/c5b17c2d839d8a1eb6f8be6a462857dbd19a19ee/bin/testhub/utils.js
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/browserstack/browserstack-cypress-cli/pull/1141/{{ revealButtonHref }}
https://github.com/browserstack/browserstack-cypress-cli/pull/1141/files#diff-27cd1c8e7d63b737bed9c7909b050bc66e3c293a01bbc042a2d4f1dcbca2553f
https://github.com/browserstack/browserstack-cypress-cli/pull/1141/files#diff-27cd1c8e7d63b737bed9c7909b050bc66e3c293a01bbc042a2d4f1dcbca2553f
https://github.com/browserstack/browserstack-cypress-cli/pull/1141/files#diff-27cd1c8e7d63b737bed9c7909b050bc66e3c293a01bbc042a2d4f1dcbca2553f
https://github.com/browserstack/browserstack-cypress-cli/pull/1141/files#diff-27cd1c8e7d63b737bed9c7909b050bc66e3c293a01bbc042a2d4f1dcbca2553f
test/unit/bin/helpers/securityValidation.jshttps://github.com/browserstack/browserstack-cypress-cli/pull/1141/files#diff-4ae740abf7df3236fb948546def95ef4f318e26fbf46f5a7c01fe00735fa15a9
View file https://github.com/browserstack/browserstack-cypress-cli/blob/c5b17c2d839d8a1eb6f8be6a462857dbd19a19ee/test/unit/bin/helpers/securityValidation.js
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/browserstack/browserstack-cypress-cli/pull/1141/{{ revealButtonHref }}
Please reload this pagehttps://github.com/browserstack/browserstack-cypress-cli/pull/1141/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.