Bump Go toolchain to 1.25.12 to patch stdlib vulnerabilities - #156
Open
devin-ai-integration[bot] wants to merge 3 commits into
Open
devin-ai-integration[bot] wants to merge 3 commits into
devin-ai-integration[bot] wants to merge 3 commits into
Conversation
Co-Authored-By: shayan <shayan@cognition.ai>
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Co-Authored-By: shayan <shayan@cognition.ai>
Co-Authored-By: shayan <shayan@cognition.ai>
|
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.



Closes:
Summary
Snyk's 2026-08-10 audit reported 27 dependency vulnerabilities (11 high) in this repo; every one except a single medium came from the Go standard library pinned at
go 1.23.7ingo.mod, not from third-party modules. Raising the declared Go version to1.25.12(the lowest release whosefixedInclears all reported stdlib advisories, includingstd/crypto/x509SNYK-GOLANG-STDCRYPTOX509-17135840 fixed in 1.25.11/1.26.4 and the 1.25.12/1.26.5std/ossymlink issue) is the whole fix.Changes:
go.mod:go 1.23.7→go 1.25.12Dockerfile: buildergolang:1.24.4-alpine→golang:1.25.12-alpine.github/workflows/lint.yml: three follow-on edits, each forced by the bump:golangci-lintv2.1→v2.4: v2.1 is built with Go 1.24 and refuses to load a config targeting Go 1.25 (the Go language version (go1.24) used to build golangci-lint is lower than the targeted Go version (1.25.12)). v2.4.0 is the earliest v2 release built with Go 1.25.go-version: stable→go-version-file: "go.mod": withstablethe runner resolved Go 1.26.5, and golangci-lint v2.4.0 then panicked type-checking the 1.26 stdlib (file requires newer Go version go1.26 (application built with go1.25)). Reading the version fromgo.modmatches what every other workflow in the repo already does.golangci/golangci-lint-action@v8→ pinned to4afd733a84b1f43292c63897423277bb7f4313a9(v8.0.0): touching this file put the line into SonarCloud's "new code" window, where its unpinned-action rule (githubactions:S7637) failed the security-rating quality gate.No source changes were needed.
go.yml,goreleaser.yml,license-check.yml, anddocs-check.ymlalready usego-version-file: go.mod, so they pick up 1.25.12 automatically;code-scanning.ymlresolves its Go version from the CodeQL environment.Snyk before / after
snyk test --all-projects(125 dependencies tested):snyk code testreported zero issues before and after (unchanged, no source edits).Not fixed (out of scope of this audit's finding list)
The one remaining issue is
github.com/go-viper/mapstructure/v2@2.3.0— SNYK-GOLANG-GITHUBCOMGOVIPERMAPSTRUCTUREV2-12177854, medium, "Improper Output Neutralization for Logs", fixed in 2.4.0. It is an indirect dependency pulled in bygithub.com/spf13/viper@1.20.1and was not part of the stdlib findings this change targets, so it is left for a separate follow-up rather than widening this diff.Verification
With Go 1.25.12 locally:
go build ./...— passesgo test ./...— all packages passgolangci-lint run(v2.4.0, repo.golangci.yml) —0 issuesCI failures unrelated to this diff
security/snyk (Cognition-default): fails withYou have used your limit of private tests— an org test-quota limit, not a finding.Analyze (go)/Analyze (actions)(CodeQL): fail duringcodeql database initwithpermission_denied: read_packagefetching thegithub/ccr-go-queriespack from GHCR — a registry-permission problem in the workflow's environment, independent of the Go version.Link to Devin session: https://app.devin.ai/sessions/5849cf5bfb0847ad9ff24c48e8ca8a6d
Requested by: @shayanshafii
Devin Review