René's URL Explorer Experiment


Title: Scope binary-download fallback state per Local instance by 07souravkunda · Pull Request #178 · browserstack/browserstack-local-nodejs · GitHub

Open Graph Title: Scope binary-download fallback state per Local instance by 07souravkunda · Pull Request #178 · browserstack/browserstack-local-nodejs

X Title: Scope binary-download fallback state per Local instance by 07souravkunda · Pull Request #178 · browserstack/browserstack-local-nodejs

Description: Summary The binary-download retry/fallback state is signalled through three process.env variables — BINARY_DOWNLOAD_FALLBACK_ENABLED, BINARY_DOWNLOAD_ERROR_MESSAGE, BINARY_DOWNLOAD_SOURCE_URL. process.env is a process-global mutable store, and using it for inter-instance signalling on the download path causes two issues: Cross-instance state bleed (CWE-362). A download/exec failure on one Local instance sets these globals for the whole process, so every other concurrent Local instance (common in parallel test runners / CI that fan out) inherits the failed instance's fallback flag, error text, and cached source URL. Instances silently download from another instance's request-context URL and report another instance's error as their own telemetry. Unvalidated download source (CWE-494). getSourceUrl/getSourceUrlSync return process.env.BINARY_DOWNLOAD_SOURCE_URL verbatim — no scheme/host check — before contacting the endpoint API. A value planted in the environment before the process boots therefore steers the binary download to an arbitrary host, which is then chmod 0755'd and executed. Change Replace the three globals with a per-Local-instance state object ({ fallbackEnabled, errorMessage, sourceURL }), shared by reference with the LocalBinary objects a single instance recreates during its retry loop. This ends the cross-instance bleed and removes the environment shortcut, while preserving the same per-instance retry/fallback behaviour — the resolved fallback URL is still cached to avoid re-requesting the endpoint API within one instance. A standalone new LocalBinary() keeps its own default state. Files: lib/Local.js, lib/LocalBinary.js (+ regression tests in test/local.js). These env vars have no external consumer (internal implementation detail only). Test plan eslint lib/* index.js (repo pretest) passes. New regression tests in test/local.js — pass on this change, fail when reverted: a BINARY_DOWNLOAD_SOURCE_URL planted in process.env is no longer honored; download-fallback state stays per Local instance (no cross-instance bleed, no process.env writes). Existing arg-building + real-tunnel-start unit tests pass; a real tunnel starts through the binding and stops cleanly on the patched download path. Manual PoCs: env-shortcut, cross-instance bleed, and a full on-box download→chmod 0755→execFile all reproduce before the change and are blocked after it. 🤖 Generated with Claude Code

Open Graph Description: Summary The binary-download retry/fallback state is signalled through three process.env variables — BINARY_DOWNLOAD_FALLBACK_ENABLED, BINARY_DOWNLOAD_ERROR_MESSAGE, BINARY_DOWNLOAD_SOURCE_URL. proc...

X Description: Summary The binary-download retry/fallback state is signalled through three process.env variables — BINARY_DOWNLOAD_FALLBACK_ENABLED, BINARY_DOWNLOAD_ERROR_MESSAGE, BINARY_DOWNLOAD_SOURCE_URL. proc...

Opengraph URL: https://github.com/browserstack/browserstack-local-nodejs/pull/178

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:591dfc9e-36a6-a6ad-33e8-2186a4df3239
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idB220:1FAF:196FB11:22192A0:6B043705
html-safe-nonce994d5e9cb9b7b6bf95f45f971521866c2611f2bb7c3e3a578fc1341915291083
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMjIwOjFGQUY6MTk2RkIxMToyMjE5MkEwOjZCMDQzNzA1IiwidmlzaXRvcl9pZCI6IjU0ODY1MjY1Mzg2NTA0OTg4MjEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac578a10ee0f961c5eb76cd07f4b98919650087688fb7dc6e8a606916eab69e0c4
hovercard-subject-tagpull_request:4222731987
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-local-nodejs/pull/178/files
twitter:imagehttps://avatars.githubusercontent.com/u/50537259?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/50537259?s=400&v=4
og:image:altSummary The binary-download retry/fallback state is signalled through three process.env variables — BINARY_DOWNLOAD_FALLBACK_ENABLED, BINARY_DOWNLOAD_ERROR_MESSAGE, BINARY_DOWNLOAD_SOURCE_URL. proc...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noneb7a1d2b9101496921b08579fbee988d014345aef2f5bd660d1f8c7332d81560e
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/browserstack/browserstack-local-nodejs git https://github.com/browserstack/browserstack-local-nodejs.git
octolytics-dimension-user_id1119453
octolytics-dimension-user_loginbrowserstack
octolytics-dimension-repository_id51923223
octolytics-dimension-repository_nwobrowserstack/browserstack-local-nodejs
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id51923223
octolytics-dimension-repository_network_root_nwobrowserstack/browserstack-local-nodejs
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
releasec3dd496c3da6ea6b77e69c09279d2b81604654f1
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/browserstack/browserstack-local-nodejs/pull/178/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fbrowserstack%2Fbrowserstack-local-nodejs%2Fpull%2F178%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-local-nodejs%2Fpull%2F178%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-local-nodejs
Reloadhttps://github.com/browserstack/browserstack-local-nodejs/pull/178/files
Reloadhttps://github.com/browserstack/browserstack-local-nodejs/pull/178/files
Reloadhttps://github.com/browserstack/browserstack-local-nodejs/pull/178/files
browserstackhttps://github.com/browserstack
browserstack-local-nodejshttps://github.com/browserstack/browserstack-local-nodejs
Codehttps://github.com/browserstack/browserstack-local-nodejs
Issues25 (25)https://github.com/browserstack/browserstack-local-nodejs/issues
Pull requests29 (29)https://github.com/browserstack/browserstack-local-nodejs/pulls
Actionshttps://github.com/browserstack/browserstack-local-nodejs/actions
Projectshttps://github.com/browserstack/browserstack-local-nodejs/projects
Security and qualityhttps://github.com/browserstack/browserstack-local-nodejs/security
Insightshttps://github.com/browserstack/browserstack-local-nodejs/insights
Sign up for GitHub https://github.com/signup?return_to=%2Fbrowserstack%2Fbrowserstack-local-nodejs%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-local-nodejs%2Fissues%2Fnew%2Fchoose
07souravkundahttps://github.com/07souravkunda
release_1.5.14https://github.com/browserstack/browserstack-local-nodejs/tree/release_1.5.14
locsec/WI-f16a1d45https://github.com/browserstack/browserstack-local-nodejs/tree/locsec/WI-f16a1d45
Conversation 8 https://github.com/browserstack/browserstack-local-nodejs/pull/178
Commits 3 https://github.com/browserstack/browserstack-local-nodejs/pull/178/commits
Checks 5 https://github.com/browserstack/browserstack-local-nodejs/pull/178/checks
Files changed https://github.com/browserstack/browserstack-local-nodejs/pull/178/files
Please reload this pagehttps://github.com/browserstack/browserstack-local-nodejs/pull/178/files
Scope binary-download fallback state per Local instance https://github.com/browserstack/browserstack-local-nodejs/pull/178/files#top
Show all changes 3 commits https://github.com/browserstack/browserstack-local-nodejs/pull/178/files
6964d17 Scope binary-download fallback state per Local instance (was process.… 07souravkunda Aug 6, 2026 https://github.com/browserstack/browserstack-local-nodejs/pull/178/commits/6964d172c95df78cfa0da0b435cf609a4150f150
9b158d4 test: drop internal tracker ids from download-state isolation tests 07souravkunda Aug 6, 2026 https://github.com/browserstack/browserstack-local-nodejs/pull/178/commits/9b158d47ca2815699e27ea9e0f6ec70d206fb104
6e6fd40 Merge branch 'master' into locsec/WI-f16a1d45 07souravkunda Sep 1, 2026 https://github.com/browserstack/browserstack-local-nodejs/pull/178/commits/6e6fd40704b06b8c668d93558f072bd223c02764
Clear filters https://github.com/browserstack/browserstack-local-nodejs/pull/178/files
Please reload this pagehttps://github.com/browserstack/browserstack-local-nodejs/pull/178/files
Please reload this pagehttps://github.com/browserstack/browserstack-local-nodejs/pull/178/files
Local.js https://github.com/browserstack/browserstack-local-nodejs/pull/178/files#diff-55822fcdf12b3af2932090ab27bf9d373bde5a0923595fca062e5ab834efdaf9
LocalBinary.js https://github.com/browserstack/browserstack-local-nodejs/pull/178/files#diff-5af64958aaf2b1a4a750ddf96b03cc5742385ee3429d829dd0052429f81d47f3
local.js https://github.com/browserstack/browserstack-local-nodejs/pull/178/files#diff-de3a83ad024f2fb51977a7a30106c9507902d3efefdbd980946aa4afabf896b8
https://github.com/browserstack/browserstack-local-nodejs/blob/release_1.5.14/CODEOWNERS#L1
lib/Local.jshttps://github.com/browserstack/browserstack-local-nodejs/pull/178/files#diff-55822fcdf12b3af2932090ab27bf9d373bde5a0923595fca062e5ab834efdaf9
View file https://github.com/browserstack/browserstack-local-nodejs/blob/6e6fd40704b06b8c668d93558f072bd223c02764/lib/Local.js
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/browserstack/browserstack-local-nodejs/pull/178/{{ revealButtonHref }}
https://github.com/browserstack/browserstack-local-nodejs/pull/178/files#diff-55822fcdf12b3af2932090ab27bf9d373bde5a0923595fca062e5ab834efdaf9
07souravkundahttps://github.com/07souravkunda
Aug 6, 2026https://github.com/browserstack/browserstack-local-nodejs/pull/178/files#r3730744327
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
#2https://github.com/browserstack/browserstack-local-nodejs/pull/2
#3https://github.com/browserstack/browserstack-local-nodejs/pull/3
Please reload this pagehttps://github.com/browserstack/browserstack-local-nodejs/pull/178/files
https://github.com/browserstack/browserstack-local-nodejs/pull/178/files#diff-55822fcdf12b3af2932090ab27bf9d373bde5a0923595fca062e5ab834efdaf9
https://github.com/browserstack/browserstack-local-nodejs/pull/178/files#diff-55822fcdf12b3af2932090ab27bf9d373bde5a0923595fca062e5ab834efdaf9
https://github.com/browserstack/browserstack-local-nodejs/pull/178/files#diff-55822fcdf12b3af2932090ab27bf9d373bde5a0923595fca062e5ab834efdaf9
https://github.com/browserstack/browserstack-local-nodejs/pull/178/files#diff-55822fcdf12b3af2932090ab27bf9d373bde5a0923595fca062e5ab834efdaf9
https://github.com/browserstack/browserstack-local-nodejs/pull/178/files#diff-55822fcdf12b3af2932090ab27bf9d373bde5a0923595fca062e5ab834efdaf9
https://github.com/browserstack/browserstack-local-nodejs/pull/178/files#diff-55822fcdf12b3af2932090ab27bf9d373bde5a0923595fca062e5ab834efdaf9
https://github.com/browserstack/browserstack-local-nodejs/pull/178/files#diff-55822fcdf12b3af2932090ab27bf9d373bde5a0923595fca062e5ab834efdaf9
https://github.com/browserstack/browserstack-local-nodejs/blob/release_1.5.14/CODEOWNERS#L1
lib/LocalBinary.jshttps://github.com/browserstack/browserstack-local-nodejs/pull/178/files#diff-5af64958aaf2b1a4a750ddf96b03cc5742385ee3429d829dd0052429f81d47f3
View file https://github.com/browserstack/browserstack-local-nodejs/blob/6e6fd40704b06b8c668d93558f072bd223c02764/lib/LocalBinary.js
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/browserstack/browserstack-local-nodejs/pull/178/{{ revealButtonHref }}
https://github.com/browserstack/browserstack-local-nodejs/pull/178/files#diff-5af64958aaf2b1a4a750ddf96b03cc5742385ee3429d829dd0052429f81d47f3
07souravkundahttps://github.com/07souravkunda
Aug 6, 2026https://github.com/browserstack/browserstack-local-nodejs/pull/178/files#r3730745545
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/browserstack/browserstack-local-nodejs/pull/178/files
https://github.com/browserstack/browserstack-local-nodejs/pull/178/files#diff-5af64958aaf2b1a4a750ddf96b03cc5742385ee3429d829dd0052429f81d47f3
https://github.com/browserstack/browserstack-local-nodejs/pull/178/files#diff-5af64958aaf2b1a4a750ddf96b03cc5742385ee3429d829dd0052429f81d47f3
https://github.com/browserstack/browserstack-local-nodejs/pull/178/files#diff-5af64958aaf2b1a4a750ddf96b03cc5742385ee3429d829dd0052429f81d47f3
https://github.com/browserstack/browserstack-local-nodejs/blob/release_1.5.14/CODEOWNERS#L1
test/local.jshttps://github.com/browserstack/browserstack-local-nodejs/pull/178/files#diff-de3a83ad024f2fb51977a7a30106c9507902d3efefdbd980946aa4afabf896b8
View file https://github.com/browserstack/browserstack-local-nodejs/blob/6e6fd40704b06b8c668d93558f072bd223c02764/test/local.js
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/browserstack/browserstack-local-nodejs/pull/178/{{ revealButtonHref }}
https://github.com/browserstack/browserstack-local-nodejs/pull/178/files#diff-de3a83ad024f2fb51977a7a30106c9507902d3efefdbd980946aa4afabf896b8
07souravkundahttps://github.com/07souravkunda
Aug 13, 2026https://github.com/browserstack/browserstack-local-nodejs/pull/178/files#r3777886504
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/browserstack/browserstack-local-nodejs/pull/178/files
Please reload this pagehttps://github.com/browserstack/browserstack-local-nodejs/pull/178/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.