fix(deps): clear Snyk criticals and highs - #161
Conversation
Bump Go to 1.26.8 and the dependencies carrying known advisories: - golang.org/x/net v0.48.0 -> v0.58.0 (critical in idna, DoS in http2) - google.golang.org/grpc v1.77.0 -> v1.83.2 (critical, plus three highs) - github.com/go-jose/go-jose/v4 v4.1.3 -> v4.1.4 - github.com/traefik/traefik/v3 v3.6.4 -> v3.6.25, which also pulls the OpenTelemetry set to otel v1.44.0 and the OTLP exporters to v1.44.0 / v0.20.0, clearing six highs there traefik v3.6.23 and later require Go 1.26.0, so this moves the module off the Go 1.25 line. Go 1.25.3 carried 16 high and 15 medium stdlib advisories and Go 1.26.0 carries more still, so the directive goes to 1.26.8, the latest patch, which is stdlib-clean. Takes the module from 21 findings to 2, both without an upstream fix.
The container scans pass --exclude-app-vulns, so go.mod was never scanned. Two criticals and fourteen highs sat unreported as a result. Monitor only, matching ptd: `snyk monitor` uploads a snapshot and exits 0, so it does not block the build. Restricted to main so the dashboard reflects what ships rather than the most recently pushed branch.
|
Claude finished @stevenolen's task in 57s —— View job Review
The PR is solid. The motivation is clear, the scope is appropriate, and the description is thorough enough to stand on its own. A few observations:
The new step is consistent with the existing container scan pattern (no The inline comment block is longer than it needs to be — the decision logic (why monitor-only, why main-only) belongs in the PR description, not the YAML. A single line like
The bumps match what the description claims. Two undocumented changes are worth noting:
None of these are blockers. The unmentioned additions are all indirect and come along with the traefik and AWS SDK updates that are explicitly listed. Overall The |
`make docker-build` ran a bare `docker build`, so the image fell back to the Dockerfile's `ARG GO_VERSION=1.25` default instead of the version the module requires. With the go directive on 1.26.8 that failed the Kind integration tests: go: go.mod requires go >= 1.26.8 (running go 1.25.14; GOTOOLCHAIN=local) The Makefile now derives GO_VERSION from the go directive and passes it as a build arg, matching what the Justfile and the build workflow already do, so the builder image cannot drift from go.mod again. The ARG defaults move to 1.26 as a fallback for a bare `docker build`.
## [1.31.1](v1.31.0...v1.31.1) (2026-09-02) ### Bug Fixes * **deps:** clear Snyk criticals and highs ([#161](#161)) ([1abe6a6](1abe6a6))
Summary
Clears the fixable Snyk findings in this module: 21 findings down to 2, including both criticals.
These had not surfaced anywhere because CI runs only
snyk container monitor ... --exclude-app-vulns, which by design excludes Go application dependencies. Nothing was scanning thisgo.mod.Dependency bumps
golang.org/x/net(idna)google.golang.org/grpcgolang.org/x/net/http2DoSgrpc/mem,grpc/internal/transport,grpc/internal/envconfiggithub.com/go-jose/go-jose/v4github.com/traefik/traefik/v3go.opentelemetry.io/otel/*The OpenTelemetry packages are all indirect, pulled by traefik, so the traefik bump moves them as a coordinated set rather than needing individual pins.
Go 1.25 to 1.26
traefik v3.6.23 and later require Go 1.26.0, so reaching a patched traefik moves this module off the Go 1.25 line.
The
godirective matters for more than the toolchain: Snyk reports the standard library asstd/*components versioned from it. Measured against Snyk's database:godirectiveSo the directive is set to 1.26.8 rather than the 1.26.0 that
go mod tidywould otherwise settle on. Letting it land on 1.26.0 would have left the stdlib posture worse than before this PR.The
godirective has two consumers, and both needed attention:go-version-file: go.mod, so no workflow change is needed there.ARG GO_VERSIONinDockerfileandflightdeck/Dockerfile. Thebuildjob andjust docker-buildboth derive that value from go.mod and pass it as a build arg, butmake docker-buildran a baredocker buildand so fell back to the stale1.25default. Sincekind-load-imagedepends ondocker-build, the Kind integration tests failed withgo.mod requires go >= 1.26.8 (running go 1.25.14; GOTOOLCHAIN=local).The Makefile now derives
GO_VERSIONfrom the go directive and passes it through, matching the Justfile and the build workflow, so the builder image cannot drift from go.mod again. The twoARGdefaults move to1.26as a fallback for a baredocker build.Remaining findings
Two, neither with an upstream fix:
github.com/jackc/pgproto3/v2v2.3.3 — Improper Input Validation (high). Reached throughgithub.com/jackc/pgx/v4v4.18.3, which is a direct dependency imported byinternal/db/postgres_client.goandinternal/db/pgx_logr.go. v2.3.3 is the latest release of that line; the advisory is resolved only by moving topgx/v5, which internalises pgproto3. That is an API migration and belongs in its own PR.github.com/grpc-ecosystem/grpc-gateway/v2/runtime— Incorrect Authorization (medium). No patched release; still reproduces on the latest v2.30.0.Verification
make go-testexits 0 on Go 1.26.8 (all packages, includinginternal/controller/coreunder envtest)go build ./...andgo vet ./...cleansnyk testre-run on the branch confirms 2 remaining findingsNote that a bare
go test ./...panics ininternal/controller/corewith a nil client, becauselocalTestEnv.StartneedsKUBEBUILDER_ASSETSand the test usesassertrather thanrequire, so it continues past the failed setup. Usemake go-test, which provisions envtest. This is unrelated to the dependency changes and reproduces onmain.Also adds the missing CI scan
build.ymlnow runssnyk monitor --file=go.modafter the unit tests. Both existing Snyk steps scan container images with--exclude-app-vulns, so this module's Go dependencies were never scanned by anything, which is how two criticals went unreported.Monitor only, matching ptd's
snyk.yml:snyk monitoruploads a snapshot and exits 0, so it cannot block the build. No PTD repo currently gates on dependency vulnerabilities; the only Snyk gate in the org is ptd'ssnyk code test --threshold=medium, which is static analysis.It runs on
mainonly, deliberately unlike ptd, which also monitors onpull_request. Monitoring from PR branches means the dashboard reports whichever branch was pushed most recently rather than what is shipping. That behaviour actively misled a diagnosis this week, where a project's counts reflected an in-flight branch.Nothing is required in the Snyk console:
snyk monitorcreates the project in the org on first run.Suggested follow-up
Plan the
pgx/v4topgx/v5migration to clear the last high.