fix: resolve Snyk violations, Go stdlib vulns, and broken list repos test#767
fix: resolve Snyk violations, Go stdlib vulns, and broken list repos test#767dangrondahl merged 5 commits intomainfrom
Conversation
- Bump go.opentelemetry.io/otel packages from v1.40.0 to v1.41.0 (fixes SNYK-GOLANG-GOOPENTELEMETRYIO* resource exhaustion via baggage headers) - Bump Go from 1.25.0 to 1.25.8 (fixes std/crypto/tls, std/crypto/x509, std/archive/tar, std/archive/zip, std/html/template, std/net/http vulnerabilities)
|
Claude finished @dangrondahl's task in 1m 44s —— View job PR Review: fix: upgrade dependencies to resolve Snyk vulnerabilities
Static AnalysisAll clean — Review SummaryOverall: Looks good. This is a well-structured dependency upgrade PR with a sensible bug fix included. Five clean, atomic commits with clear messages. Dependency upgrades (go.mod/go.sum) — Straightforward bumps:
All transitive — no direct API surface changes needed. Dockerfile — .snyk — Renewed ignore with improved reason text documenting that v0.49.0 is still affected. 6-month expiry (Oct 2026) is reasonable for a re-evaluation window. listRepos.go — The nil guard on listRepos_test.go — Test regex patterns relaxed from What's done well
|
SNYK-GOLANG-GOLANGORGXCRYPTOSSHAGENT-12668891 still has no fix available (latest golang.org/x/crypto is v0.49.0). Extend the ignore expiry to 2026-10-08.
Snyk reported new std/crypto/tls, std/crypto/x509, std/archive/tar, and std/html/template vulnerabilities requiring Go 1.25.9.
The API can return nil for the latest_activity field, which caused fmt.Sprintf to print %!s(<nil>). Display an empty string instead. Also relax the test regex to not require a specific activity string.
Go 1.25.9 Docker image doesn't exist yet. Use golang:1.25 base image with GOTOOLCHAIN=auto so Go auto-downloads 1.25.9 at build time.
Why
The Snyk dependency test and integration tests are failing on main.
Fixes
1. Bump
go.opentelemetry.io/otelpackages v1.40.0 → v1.41.0Fixes SNYK-GOLANG-GOOPENTELEMETRYIOOTELBAGGAGE-15928416 (High) — resource exhaustion via baggage header parsing. Also bumps transitive deps
grpc-gatewayandgenproto.2. Bump Go 1.25.0 → 1.25.9
Fixes stdlib vulnerabilities in
crypto/tls,crypto/x509,archive/tar,archive/zip,html/template,net/http.3. Renew expired Snyk ignore for
x/crypto/ssh/agentSNYK-GOLANG-GOLANGORGXCRYPTOSSHAGENT-12668891 — no upstream fix available (latest
golang.org/x/cryptois v0.49.0). The previous ignore expired 2025-11-17, causing Snyk to fail. Extended to 2026-10-08.4. Set
GOTOOLCHAIN=autoin DockerfileThe
golang:1.25-alpine3.21image ships Go 1.25.5 and there is nogolang:1.25.9image.GOTOOLCHAIN=autolets Go download 1.25.9 at build time.5. Handle nil
latest_activityinkosli list reposServer PR #5177 (2026-04-02) removed the
latest_activitycomputation for performance. The field now returnsnil, which causedfmt.Sprintfto print%!s(<nil>)in the table output. This was failingTestListReposCommandTestSuiteconsistently.Test plan