Repository navigation
AAP-22022: build espresso step with Go 1.27.3 (eMudhra CA compromise) - #16
Merged
Merged
Conversation
Go releases before 1.26.10 / 1.27.3 do not distrust the 8 compromised
eMudhra intermediate keys. The step sends BrowserStack credentials to
api-cloud.browserstack.com, so it must be built with a patched toolchain.
- go.mod: go 1.18 -> go 1.26.10. Bitrise's Go toolkit builds the step from
source with the stack's Go (>= 1.22.12) and default GOTOOLCHAIN=auto, so
the go command switches to go1.26.10 at build time.
- go mod tidy: mark tablewriter/testify as direct deps, drop unused objx.
- failf(err.Error()) -> failf("%s", err.Error()): go vet printf check is
enabled for go >= 1.24 modules and fails go test otherwise. Also stops
'%' in error text being treated as a format verb.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
go 1.26.10 left stacks on Go 1.27.0-1.27.2 unpatched: they satisfy the directive so no toolchain switch happens, yet lack the eMudhra block-list. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GayatriNairAtBrowserstack
marked this pull request as ready for review
October 21, 2026 11:40
darshilgada24
approved these changes
Oct 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Jira: https://browserstack.atlassian.net/browse/AAP-22022
Why
Go releases before 1.26.10 / 1.27.3 do not distrust the 8 compromised eMudhra intermediate keys. This step runs on customer CI and sends BrowserStack credentials to
api-cloud.browserstack.com, so its TLS client must come from a patched toolchain.go.modwasgo 1.18.What
go.mod:go 1.18->go 1.26.10. Atoolchain go1.26.10line was added, butgo mod tidyremoves it because it matches thegoline, so it adds nothing.go mod tidy: markstablewriter/testifyas direct deps and drops the unusedstretchr/objxfromgo.sum. No dependency version changes.failf(err.Error())->failf("%s", err.Error())at 6 call sites (main.gox5,util_fns.gox1).go vet's printf check covers non-constant format strings for modules declaring go >= 1.24, so without thisgo testfails at vet. It also stops a%in an error message being read as a format verb.io/ioutilmigration:ioutil.ReadAllis deprecated but still compiles, and vet does not flag it. Left unchanged to keep the diff small.How customers get go1.26.10
This step has no prebuilt executable in the steplib, so the Bitrise CLI Go toolkit (stepman
toolkits/golang.go) builds it from source on the customer's stack:gofrom PATH if that Go is >=1.22.12. Otherwise it installs Go 1.22.12.go buildwithGOROOT=<that go>,GO111MODULE=onand noGOTOOLCHAINoverride.GOTOOLCHAIN=auto, Go >= 1.21 readsgo 1.26.10and downloads and builds with go1.26.10.step.ymlhas no field for the Go version (toolkit.gohas onlypackage_name), so nostep.ymlchange is needed.Caveats:
go 1.26.10, so the toolchain does not switch and the build still uses an unpatched compiler. Closing that gap would needgo 1.27.3instead.GOTOOLCHAIN=localor blocksproxy.golang.org, builds on Go older than 1.26.10 now fail withgo.mod requires go >= 1.26.10. They do not silently build with the vulnerable toolchain.Build / test (local, darwin/arm64)
Simulated Bitrise toolkit build: Homebrew go1.26.4 binary,
GOROOTset to the go1.26.4 root,GO111MODULE=on,GOTOOLCHAINunset. Resulting binary reportsgo1.26.10.With
GOTOOLCHAIN=go1.26.4forced:go: go.mod requires go >= 1.26.10 (running go 1.26.4; GOTOOLCHAIN=go1.26.4).Before the change (go 1.18 directive, local go1.26.4), build, vet and test all passed.
Release steps still needed (not done in this PR)
1.1.0). The steplib entry issteps/browserstack-bitrise-espresso-step/inbitrise-io/bitrise-steplib.bitrise run share-this-step. Note:bitrise.ymlsetsBITRISE_STEP_ID: espresso-browserstack-officialandBITRISE_STEP_VERSION: 1.0.0, but the steplib ID isbrowserstack-bitrise-espresso-step. Fix both before sharing.1.0.0, pinned to commit180c566from 2022. Customers onbrowserstack-bitrise-espresso-step@1get this fix only once the new version is published.git::...@<ref>to update the ref.🤖 Generated with Claude Code