From 6afbf1a279edb937cc8ecbb7ec63b22b21bd542a Mon Sep 17 00:00:00 2001 From: Gayatri Nair Date: Wed, 21 Oct 2026 15:42:52 +0530 Subject: [PATCH 1/2] AAP-22023: build xcui step with Go 1.26.10 (eMudhra CA compromise) Go before 1.26.10 does not distrust the 8 compromised eMudhra intermediate keys. Raise the go directive from 1.18 to 1.26.10 so the Bitrise go toolkit (GOTOOLCHAIN=auto) compiles the step with go1.26.10. go vet's printf check is stricter at language version >= 1.24 and failed go test on non-constant format strings; pass error messages to failf via "%s". Co-Authored-By: Claude Opus 5.5 --- go.mod | 10 ++++++---- go.sum | 2 +- main.go | 14 +++++++------- util_fns.go | 2 +- 4 files changed, 15 insertions(+), 13 deletions(-) diff --git a/go.mod b/go.mod index a6d9e82..8dad4bc 100644 --- a/go.mod +++ b/go.mod @@ -1,13 +1,15 @@ module github.com/browserstack/browserstack-bitrise-xcui-step -go 1.18 +go 1.26.10 + +require ( + github.com/olekukonko/tablewriter v0.0.5 + github.com/stretchr/testify v1.7.5 +) require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/mattn/go-runewidth v0.0.9 // indirect - github.com/olekukonko/tablewriter v0.0.5 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/stretchr/objx v0.4.0 // indirect - github.com/stretchr/testify v1.7.5 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index ee02e40..ff1f4cd 100644 --- a/go.sum +++ b/go.sum @@ -8,11 +8,11 @@ github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6 github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.4.0 h1:M2gUjqZET1qApGOWNSnZ49BAIMX4F/1plDv3+l31EJ4= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.5 h1:s5PTfem8p8EbKQOctVV53k6jCJt3UX4IEJzwh+C324Q= github.com/stretchr/testify v1.7.5/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/main.go b/main.go index c3f839f..488e2aa 100644 --- a/main.go +++ b/main.go @@ -35,7 +35,7 @@ func main() { find_and_zip_file_err := locateTestRunnerFileAndZip(test_suite_path) if find_and_zip_file_err != nil { - failf(find_and_zip_file_err.Error()) + failf("%s", find_and_zip_file_err.Error()) } test_runner_app := TEST_RUNNER_ZIP_FILE_NAME @@ -45,13 +45,13 @@ func main() { upload_app, err := upload(ios_app, APP_UPLOAD_ENDPOINT, username, access_key) if err != nil { - failf(err.Error()) + failf("%s", err.Error()) } upload_app_parsed_response := jsonParse(upload_app) if upload_app_parsed_response["app_url"] == "" { - failf(err.Error()) + failf("%s", err.Error()) } log.Print("Successfully uploaded the app") @@ -63,13 +63,13 @@ func main() { upload_test_suite, err := upload(test_runner_app, TEST_SUITE_UPLOAD_ENDPOINT, username, access_key) if err != nil { - failf(err.Error()) + failf("%s", err.Error()) } test_suite_upload_parsed_response := jsonParse(upload_test_suite) if test_suite_upload_parsed_response["test_suite_url"] == "" { - failf(err.Error()) + failf("%s", err.Error()) } log.Print("Successfully uploaded the test suite") @@ -79,7 +79,7 @@ func main() { build_response, err := build(app_url, test_suite_url, username, access_key) if err != nil { - failf(err.Error()) + failf("%s", err.Error()) } build_parsed_response := jsonParse(build_response) @@ -99,7 +99,7 @@ func main() { build_status, err = checkBuildStatus(build_id, username, access_key, check_build_status) if err != nil { - failf(err.Error()) + failf("%s", err.Error()) } cmd_log_build_id, err_build_id := exec.Command("bitrise", "envman", "add", "--key", "BROWSERSTACK_BUILD_URL", "--value", APP_AUTOMATE_BUILD_DASHBOARD_URL+build_parsed_response["build_id"].(string)).CombinedOutput() diff --git a/util_fns.go b/util_fns.go index 189ffc6..f2fa9fa 100644 --- a/util_fns.go +++ b/util_fns.go @@ -124,7 +124,7 @@ func createBuildPayload() BrowserStackPayload { network_logs_options, network_logs_options_err := parseNetworkLogsOptions(os.Getenv("network_logs_options")) if network_logs_options_err != nil { - failf(network_logs_options_err.Error()) + failf("%s", network_logs_options_err.Error()) } sharding_data := TestSharding{} From 9cecf693d6ab16f3ce7197a9672aadae5c1be7f0 Mon Sep 17 00:00:00 2001 From: Gayatri Nair Date: Wed, 21 Oct 2026 16:55:30 +0530 Subject: [PATCH 2/2] AAP-22023: raise go directive to 1.27.3 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 --- go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 8dad4bc..ff06d3c 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/browserstack/browserstack-bitrise-xcui-step -go 1.26.10 +go 1.27.3 require ( github.com/olekukonko/tablewriter v0.0.5