René's URL Explorer Experiment


Title: build: verify gem integrity at install time + green the unit-test baseline by 07souravkunda · Pull Request #42 · browserstack/browserstack-local-ruby · GitHub

Open Graph Title: build: verify gem integrity at install time + green the unit-test baseline by 07souravkunda · Pull Request #42 · browserstack/browserstack-local-ruby

X Title: build: verify gem integrity at install time + green the unit-test baseline by 07souravkunda · Pull Request #42 · browserstack/browserstack-local-ruby

Description: What this does Two related things to the build/test dependency setup. Product code under lib/ is untouched. Greens the pre-existing unit-test baseline so the suite installs and runs on a current Ruby. Hardens gem install-time integrity — HTTPS source, a modern Bundler, and a CHECKSUMS block so every bundle install verifies gem content against a pinned SHA-256. Why the integrity part matters Gemfile/Gemfile.lock on master fetched gems from http://rubygems.org with BUNDLED WITH 1.11.2 (2016) and no CHECKSUMS block — so nothing verified the content of a downloaded gem. rake executes arbitrary code from the Rakefile at test time, so a substituted tarball would run as the developer. Related advisory context: CVE-2020-8130 / GHSA-jppv-gw3r-w3q8 (OS command injection in Rake::FileList, patched in rake 12.3.3). The old lockfile already pinned 12.3.3, so it was not itself vulnerable; this PR moves to rake 13.4.2 and, more importantly, makes the delivery of that gem verifiable. What was failing (baseline on master) bundle install failed outright, so no tests could run at all: The http://rubygems.org source no longer serves the spec index over plain HTTP, so resolution failed with Could not fetch specs from http://rubygems.org/. The lockfile pinned json 1.8.3, minitest 5.8.4, rake 12.3.3 and BUNDLED WITH 1.11.2. json 1.8.3 cannot compile its native extension on Ruby 3.x, and the ancient pinned Bundler was force-installed on every run. Once installable, the suite showed 3 errors out of 23 — all three start-based tests (test_check_pid, test_is_running, test_multiple_binary). These download and launch the real BrowserStackLocal binary and open a tunnel, so they need a valid BROWSERSTACK_ACCESS_KEY and network access. That is an environment/credential dependency, not a product bug. What changed Gemfile — source switched to https://rubygems.org. Dropped gem "json": lib/ uses the json default gem that ships with Ruby (only JSON.parse / JSON.dump), and the gemspec declares no dependency on it, so a third-party json was a redundant build-time dependency — and a native extension that fails to compile against Homebrew's ruby@3.2 headers (static declaration of 'rb_hash_bulk_insert' follows non-static declaration). Removing it drops one third-party build-time component. It does not make the dependency graph extension-free: prism 1.9.0 — pulled in transitively by minitest 6.0.6 (prism (~> 1.5)) — declares extensions: ["ext/prism/extconf.rb"] and is published for the ruby platform only (no precompiled x86_64-linux / aarch64-linux / darwin variants), so every bundle install still compiles one C extension and needs a C toolchain plus Ruby headers. Net native-build count is unchanged — json out, prism in. See the Linux check under Verification. Gemfile.lock — regenerated with Bundler 2.7.1: HTTPS remote, current buildable versions (minitest 6.0.6, rake 13.4.2), common Linux platforms for CI portability, and a CHECKSUMS block with per-gem SHA-256 digests. .gitignore — ignore .bundle/ and vendor/bundle/. .bundle/config can carry disable_checksum_validation, which would silently switch the new verification off; it must never be committed. test/browserstack-local-test.rb — the three live integration tests skip when BROWSERSTACK_ACCESS_KEY is absent, so the suite stays green in credential-less environments. With a key set they run in full, unchanged. Verification Checksums are genuine. Each digest in CHECKSUMS was cross-checked against the SHA-256 rubygems.org publishes for that exact version (/api/v2/rubygems//versions/.json) — all 4 match. Checksum verification is actually enforced (not just present). Flipping one digest in CHECKSUMS to a wrong-but-well-formed value: $ bundle install Bundler found mismatched checksums. This is a potential security risk. rake (13.4.2) sha256=0000...0000 from the lockfile CHECKSUMS at Gemfile.lock:25:17 rake (13.4.2) sha256=cb825b...3701 from the API at https://rubygems.org/ $ echo $? 37 # aborted; nothing installed With the CHECKSUMS block removed (the pre-change shape), the same install exits 0 and performs no verification at all. That is the before/after that matters. Linux install — aarch64-linux verified, x86_64-linux inconclusive. This is the check the incorrect "no native extensions" claim had wrongly downgraded to optional. Run in a ruby:3.2 container (Ruby 3.2.11, Bundler 2.7.1): Installing prism 1.9.0 with native extensions Bundle complete! 2 Gemfile dependencies, 5 gems now installed. BUNDLE_EXIT=0 /usr/local/bundle/extensions/aarch64-linux/3.2.0/prism-1.9.0/prism/prism.so prism does compile from source on Linux and the pinned digests are accepted. Note the Installing prism 1.9.0 with native extensions line — that is precisely the native build the earlier claim said no longer existed. x86_64-linux could not be settled here and is not claimed as passing: this is an arm64 host, so the amd64 container runs under qemu, and it segfaults inside the emulator while building prism's extension (rubygems/ext/ext_conf_builder.rb → open3.capture2e → qemu: uncaught target signal 11, exit 139). That is an emulation artifact, not a verdict about real x86_64 hardware — but it does independently land in prism's native-build path. A real x86_64 Linux box (or CI runner) should run gem install bundler:2.7.1 && bundle install and expect Bundle complete! 2 Gemfile dependencies, 5 gems now installed. Suite. bundle exec rake test → 23 runs, 40 assertions, 0 failures, 0 errors, 3 skips (Ruby 3.2.10, Bundler 2.7.1). With a key, a real tunnel was opened through the binding's own BrowserStack::Local#start / #isRunning / #stop and a live Automate session fetched a page served only on the dev machine, confirming start/stop and the tunnel path are unaffected. Notes for the reviewer No regression test is added for the lockfile change by team convention (a "version >= X" assertion adds nothing a scanner does not already do). The tamper check above is the meaningful proof and is reproducible in one command. The advisory's other suggestion — pinning the Bundler version in CI — is not applicable here: no workflow runs bundle install or rake (gem-push.yml is gem build + gem push under RubyGems Trusted Publishing/OIDC; Semgrep runs in a container). BUNDLED WITH 2.7.1 is the effective pin for local use. If a test-CI workflow is added later, pin bundler-version in ruby/setup-ruby there. How to run the suite bundle install bundle exec rake test Result without a key: 23 runs, 40 assertions, 0 failures, 0 errors, 3 skips. With BROWSERSTACK_ACCESS_KEY set, the three integration tests execute against live infrastructure.

Open Graph Description: What this does Two related things to the build/test dependency setup. Product code under lib/ is untouched. Greens the pre-existing unit-test baseline so the suite installs and runs on a current R...

X Description: What this does Two related things to the build/test dependency setup. Product code under lib/ is untouched. Greens the pre-existing unit-test baseline so the suite installs and runs on a current R...

Opengraph URL: https://github.com/browserstack/browserstack-local-ruby/pull/42

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.113.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:d414aae0-6603-3a19-b474-c5d3a1428357
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idBB32:19B98B:5FFC5C:8754C7:6B0478A7
html-safe-nonce44200b00a0c3c214ed95d3f5ba84cfce7cdc142eb77f3c25f66a95f419e1570f
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQjMyOjE5Qjk4Qjo1RkZDNUM6ODc1NEM3OjZCMDQ3OEE3IiwidmlzaXRvcl9pZCI6IjU1NzgyMzk1NDM3MTI0NDY2MzEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac91667619ae6544ec3e808c89b00a632072f7c640164eb6b41ce82b23b35588ad
hovercard-subject-tagpull_request:4229997871
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-ruby/pull/42/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:altWhat this does Two related things to the build/test dependency setup. Product code under lib/ is untouched. Greens the pre-existing unit-test baseline so the suite installs and runs on a current R...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None9c099f1b85def81ca352464c276510dfef32deaf3c305404e65b8d270284a58b
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/browserstack/browserstack-local-ruby git https://github.com/browserstack/browserstack-local-ruby.git
octolytics-dimension-user_id1119453
octolytics-dimension-user_loginbrowserstack
octolytics-dimension-repository_id51922935
octolytics-dimension-repository_nwobrowserstack/browserstack-local-ruby
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id51922935
octolytics-dimension-repository_network_root_nwobrowserstack/browserstack-local-ruby
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
releasecf73f57448d52b3a7b619195e182b33d3b3454ca
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/browserstack/browserstack-local-ruby/pull/42/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fbrowserstack%2Fbrowserstack-local-ruby%2Fpull%2F42%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-ruby%2Fpull%2F42%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-ruby
Reloadhttps://github.com/browserstack/browserstack-local-ruby/pull/42/files
Reloadhttps://github.com/browserstack/browserstack-local-ruby/pull/42/files
Reloadhttps://github.com/browserstack/browserstack-local-ruby/pull/42/files
browserstackhttps://github.com/browserstack
browserstack-local-rubyhttps://github.com/browserstack/browserstack-local-ruby
Codehttps://github.com/browserstack/browserstack-local-ruby
Issues1 (1)https://github.com/browserstack/browserstack-local-ruby/issues
Pull requests6 (6)https://github.com/browserstack/browserstack-local-ruby/pulls
Actionshttps://github.com/browserstack/browserstack-local-ruby/actions
Projectshttps://github.com/browserstack/browserstack-local-ruby/projects
Security and qualityhttps://github.com/browserstack/browserstack-local-ruby/security
Insightshttps://github.com/browserstack/browserstack-local-ruby/insights
Sign up for GitHub https://github.com/signup?return_to=%2Fbrowserstack%2Fbrowserstack-local-ruby%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-ruby%2Fissues%2Fnew%2Fchoose
07souravkundahttps://github.com/07souravkunda
release_1.5.1https://github.com/browserstack/browserstack-local-ruby/tree/release_1.5.1
chore/green-unit-testshttps://github.com/browserstack/browserstack-local-ruby/tree/chore/green-unit-tests
Conversation 10 https://github.com/browserstack/browserstack-local-ruby/pull/42
Commits 2 https://github.com/browserstack/browserstack-local-ruby/pull/42/commits
Checks 5 https://github.com/browserstack/browserstack-local-ruby/pull/42/checks
Files changed https://github.com/browserstack/browserstack-local-ruby/pull/42/files
Please reload this pagehttps://github.com/browserstack/browserstack-local-ruby/pull/42/files
build: verify gem integrity at install time + green the unit-test baseline https://github.com/browserstack/browserstack-local-ruby/pull/42/files#top
Show all changes 2 commits https://github.com/browserstack/browserstack-local-ruby/pull/42/files
ee74327 test: fix pre-existing unit-test failures (green the suite) 07souravkunda Aug 7, 2026 https://github.com/browserstack/browserstack-local-ruby/pull/42/commits/ee74327bd78662d2c385e235d07262f662b5dc64
524db87 build: verify gem integrity at install time (CVE-2020-8130 hardening) 07souravkunda Aug 12, 2026 https://github.com/browserstack/browserstack-local-ruby/pull/42/commits/524db87c33ffbc6c3d12df52476e972703af8e65
Clear filters https://github.com/browserstack/browserstack-local-ruby/pull/42/files
Please reload this pagehttps://github.com/browserstack/browserstack-local-ruby/pull/42/files
Please reload this pagehttps://github.com/browserstack/browserstack-local-ruby/pull/42/files
.gitignore https://github.com/browserstack/browserstack-local-ruby/pull/42/files#diff-bc37d034bad564583790a46f19d807abfe519c5671395fd494d8cce506c42947
Gemfile https://github.com/browserstack/browserstack-local-ruby/pull/42/files#diff-d09ea66f8227784ff4393d88a19836f321c915ae10031d16c93d67e6283ab55f
Gemfile.lock https://github.com/browserstack/browserstack-local-ruby/pull/42/files#diff-89cade48462044ee1b672dc5f4c3ec250fbd29effcd8932096a23c1283c6731f
browserstack-local-test.rb https://github.com/browserstack/browserstack-local-ruby/pull/42/files#diff-0bc53e459a5550e42da6e5efbfb46daea5f95fa50416654c15f71e83ba97fa70
https://github.com/browserstack/browserstack-local-ruby/blob/release_1.5.1/CODEOWNERS#L1
.gitignorehttps://github.com/browserstack/browserstack-local-ruby/pull/42/files#diff-bc37d034bad564583790a46f19d807abfe519c5671395fd494d8cce506c42947
View file https://github.com/browserstack/browserstack-local-ruby/blob/524db87c33ffbc6c3d12df52476e972703af8e65/.gitignore
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/browserstack/browserstack-local-ruby/pull/42/{{ revealButtonHref }}
https://github.com/browserstack/browserstack-local-ruby/blob/release_1.5.1/CODEOWNERS#L1
Gemfilehttps://github.com/browserstack/browserstack-local-ruby/pull/42/files#diff-d09ea66f8227784ff4393d88a19836f321c915ae10031d16c93d67e6283ab55f
View file https://github.com/browserstack/browserstack-local-ruby/blob/524db87c33ffbc6c3d12df52476e972703af8e65/Gemfile
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/browserstack/browserstack-local-ruby/pull/42/{{ revealButtonHref }}
https://github.com/browserstack/browserstack-local-ruby/blob/release_1.5.1/CODEOWNERS#L1
Gemfile.lockhttps://github.com/browserstack/browserstack-local-ruby/pull/42/files#diff-89cade48462044ee1b672dc5f4c3ec250fbd29effcd8932096a23c1283c6731f
View file https://github.com/browserstack/browserstack-local-ruby/blob/524db87c33ffbc6c3d12df52476e972703af8e65/Gemfile.lock
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/browserstack/browserstack-local-ruby/pull/42/{{ revealButtonHref }}
07souravkundahttps://github.com/07souravkunda
Aug 12, 2026https://github.com/browserstack/browserstack-local-ruby/pull/42/files#r3765298668
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/browserstack/browserstack-local-ruby/pull/42/files
07souravkundahttps://github.com/07souravkunda
Aug 12, 2026https://github.com/browserstack/browserstack-local-ruby/pull/42/files#r3765418520
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/browserstack/browserstack-local-ruby/pull/42/files
07souravkundahttps://github.com/07souravkunda
Aug 12, 2026https://github.com/browserstack/browserstack-local-ruby/pull/42/files#r3765474793
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/browserstack/browserstack-local-ruby/pull/42/files
07souravkundahttps://github.com/07souravkunda
Aug 12, 2026https://github.com/browserstack/browserstack-local-ruby/pull/42/files#r3765299840
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/browserstack/browserstack-local-ruby/pull/42/files
07souravkundahttps://github.com/07souravkunda
Aug 12, 2026https://github.com/browserstack/browserstack-local-ruby/pull/42/files#r3765420662
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/browserstack/browserstack-local-ruby/pull/42/files
https://github.com/browserstack/browserstack-local-ruby/blob/release_1.5.1/CODEOWNERS#L1
test/browserstack-local-test.rbhttps://github.com/browserstack/browserstack-local-ruby/pull/42/files#diff-0bc53e459a5550e42da6e5efbfb46daea5f95fa50416654c15f71e83ba97fa70
View file https://github.com/browserstack/browserstack-local-ruby/blob/524db87c33ffbc6c3d12df52476e972703af8e65/test/browserstack-local-test.rb
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/browserstack/browserstack-local-ruby/pull/42/{{ revealButtonHref }}
https://github.com/browserstack/browserstack-local-ruby/pull/42/files#diff-0bc53e459a5550e42da6e5efbfb46daea5f95fa50416654c15f71e83ba97fa70
07souravkundahttps://github.com/07souravkunda
Aug 12, 2026https://github.com/browserstack/browserstack-local-ruby/pull/42/files#r3765302071
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/browserstack/browserstack-local-ruby/pull/42/files
07souravkundahttps://github.com/07souravkunda
Aug 12, 2026https://github.com/browserstack/browserstack-local-ruby/pull/42/files#r3765424796
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/browserstack/browserstack-local-ruby/pull/42/files
https://github.com/browserstack/browserstack-local-ruby/pull/42/files#diff-0bc53e459a5550e42da6e5efbfb46daea5f95fa50416654c15f71e83ba97fa70
Please reload this pagehttps://github.com/browserstack/browserstack-local-ruby/pull/42/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.