Skip to content

chore: update Go to 1.25 and golangci-lint to v2#6512

Open
thomasschafer wants to merge 1 commit intomainfrom
chore/bump-go-version-cli-extension-sbom
Open

chore: update Go to 1.25 and golangci-lint to v2#6512
thomasschafer wants to merge 1 commit intomainfrom
chore/bump-go-version-cli-extension-sbom

Conversation

@thomasschafer
Copy link
Contributor

@thomasschafer thomasschafer commented Feb 6, 2026

Pull Request Submission Checklist

  • Follows CONTRIBUTING guidelines
  • Commit messages
    are release-note ready, emphasizing
    what was changed, not how.
  • Includes detailed description of changes
  • Contains risk assessment (Low | Medium | High) - n/a
  • Highlights breaking API changes (if applicable) - n/a
  • Links to automated tests covering new functionality - n/a
  • Includes manual testing instructions (if necessary) - n/a
  • Updates relevant GitBook documentation (PR link: ___) - n/a
  • Includes product update to be announced in the next stable release notes - n/a

What does this PR do?

In snyk/cli-extension-sbom#167 in we bumped the version of Go, so before merging that PR we need to bump the Go version in the CLI. This PR bumps Go and golangi-lint versions in here, fixing the linting errors that arise.

I also ran into a couple of FIPS issues. Initially, acceptance tests were previously failing on non-FIPS builds with

Expected: ""
Received: "panic: opensslcrypto: FIPS mode requested (environment variable GODEBUG=fips140=on) but not available: OpenSSL 3.0.8 7 Feb 2023·
goroutine 1 [running]:
crypto/internal/backend.init.0()
    /home/circleci/project/go/src/crypto/internal/backend/openssl_linux.go:39 +0x129

which appears to be because of the change here to the Microsoft Go build:

Prior to Go 1.25, developers can opt into using system-provided cryptography by setting the GOEXPERIMENT environment variable to systemcrypto before building their program.
Starting with Go 1.25, the Microsoft toolchain enables systemcrypto by default. Developers can opt out by setting the GOEXPERIMENT environment variable to nosystemcrypto.which is used here, meaning that the non-FIPS builds now have FIPS enabled and so are panicking because OPENSSL is not available. To work around this I have split out FIPS and non-FIPS builds, given that previously they were both built using Microsoft Go.

After that, acceptance tests were failing with

Failed to clone test repository: Command failed: git clone https://github.com/leaktk/fake-leaks /tmp/snyk-secrets-test && cd /tmp/snyk-secrets-test && git checkout 366ae0080cc67973619584080fc85734ba2658b2
Cloning into '/tmp/snyk-secrets-test'...
ssh_dispatch_run_fatal: Connection to 140.82.112.3 port 22: invalid argument
fatal: Could not read from remote repository.

This was happening because OPENSSL_CONF was being set for not just the CLI but also for other commands such as git clone. To resolve this I updated the env handling to only pass a value for OPENSSL_CONF to the CLI commands.

What's the product update that needs to be communicated to CLI users?

None

@thomasschafer thomasschafer changed the title Chore/bump go version cli extension SBOM chore: update Go to 1.25 and golangci-lint to v2 Feb 6, 2026
@thomasschafer thomasschafer force-pushed the chore/bump-go-version-cli-extension-sbom branch from ba9a2b1 to 26f58d2 Compare February 6, 2026 16:05
@thomasschafer thomasschafer marked this pull request as ready for review February 6, 2026 16:07
@thomasschafer thomasschafer requested review from a team as code owners February 6, 2026 16:07
@thomasschafer thomasschafer force-pushed the chore/bump-go-version-cli-extension-sbom branch 2 times, most recently from 6aba91f to 8849c0f Compare February 6, 2026 16:55
@brew42 brew42 force-pushed the chore/bump-go-version-cli-extension-sbom branch from 68297a5 to 8849c0f Compare February 6, 2026 17:06
@thomasschafer thomasschafer force-pushed the chore/bump-go-version-cli-extension-sbom branch 2 times, most recently from e7df0a0 to 59bce10 Compare February 6, 2026 22:11
@hoerup
Copy link

hoerup commented Feb 9, 2026

Maybe even update to go 1.25.7 to avoid the recent CVE-2025-68121

@thomasschafer thomasschafer force-pushed the chore/bump-go-version-cli-extension-sbom branch from 59bce10 to 863fc37 Compare February 9, 2026 11:04
@thomasschafer thomasschafer force-pushed the chore/bump-go-version-cli-extension-sbom branch from 863fc37 to 381de30 Compare February 9, 2026 13:09
if [[ "$1" == "x86_64" ]]; then
FILE=swift-5.8.1-RELEASE-ubuntu20.04
curl --compressed --output swift.tar.gz https://download.swift.org/swift-5.8.1-release/ubuntu2004/swift-5.8.1-RELEASE/$FILE.tar.gz
FILE=swift-5.10.1-RELEASE-debian12
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated from Ubuntu to Debian as the Dockerfile uses Debian

@thomasschafer thomasschafer force-pushed the chore/bump-go-version-cli-extension-sbom branch 3 times, most recently from a3b9740 to 3e0ecfd Compare February 10, 2026 10:50
@thomasschafer thomasschafer marked this pull request as draft February 10, 2026 11:33
@thomasschafer thomasschafer force-pushed the chore/bump-go-version-cli-extension-sbom branch 5 times, most recently from aed946a to a9d537a Compare February 11, 2026 09:05
@thomasschafer thomasschafer force-pushed the chore/bump-go-version-cli-extension-sbom branch 4 times, most recently from 3e8970f to 550568c Compare February 11, 2026 14:56
@thomasschafer thomasschafer force-pushed the chore/bump-go-version-cli-extension-sbom branch 9 times, most recently from 41272d2 to be2447c Compare February 12, 2026 16:53
@thomasschafer thomasschafer marked this pull request as ready for review February 13, 2026 16:35
@thomasschafer thomasschafer force-pushed the chore/bump-go-version-cli-extension-sbom branch from be2447c to 37d70d6 Compare February 13, 2026 16:35
Co-Authored-By: Tom Brewster <brew42@hotmail.com>
@thomasschafer thomasschafer force-pushed the chore/bump-go-version-cli-extension-sbom branch from 37d70d6 to e647122 Compare February 13, 2026 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants