fix: resolve reachable CVEs and document non-exploitable grype findings - #1698
Merged
Conversation
jabrown85
approved these changes
Aug 10, 2026
Contributor
|
A rebase is needed here @pujitha24 - then I can re-review and merge |
Motivation: Grype flagged 7 CVEs against the v0.21.14 release image: golang.org/x/text (norm.Iter infinite loop on invalid UTF-8), go.opentelemetry.io/otel (baggage parsing missing a header-length cap), three containerd CRI checkpoint-restore issues, github.com/klauspost/compress/s2 (OOB read in s2.NewDict), and golang.org/x/crypto/openpgp (unmaintained/unsafe by design). Rather than reacting to module versions alone, each finding was checked for actual reachability from lifecycle's build. Approach: - golang.org/x/text/unicode/norm is reachable via internal/extend/kaniko -> osscontainertools/kaniko/pkg/executor -> spf13/afero (confirmed with `go mod why golang.org/x/text/unicode/norm`). Bumped golang.org/x/text to v0.40.0; the fix landed in v0.39.0. - go.opentelemetry.io/otel/baggage is reachable via auth -> docker/docker/registry -> otelhttp -> otel/propagation -> otel/baggage (confirmed with `go mod why go.opentelemetry.io/otel/baggage`). Bumped go.opentelemetry.io/otel, otel/metric, and otel/trace to v1.45.0 as defense-in-depth; the fix landed in v1.44.0. - github.com/klauspost/compress/s2 is not imported anywhere in the build (only the zstd subpackage of that module is used), but was bumped to the fixed v1.18.7 anyway since it is a trivial, risk-free patch bump. - The three containerd CRI checkpoint-restore findings (GO-2026-5064, GO-2026-5338, GO-2026-5622) are not exploitable: `go list -deps ./cmd/...` confirms lifecycle only imports containerd/platforms, never the CRI plugin packages implicated in the advisories. There is also no fixed version available for the github.com/containerd/containerd v1 module line lifecycle depends on (only containerd/containerd/v2 received patches, per the upstream OSV records at vuln.go.dev). Documented as suppressions in .grype.yaml, matching this repo's existing convention for non-exploitable/no-fix findings. - golang.org/x/crypto/openpgp (GO-2026-5932) is never imported by lifecycle (absent from `go list -deps ./cmd/...`) and has no fixed version; the upstream advisory recommends avoiding the package rather than upgrading. Documented as a suppression in .grype.yaml. - `go mod tidy` after the above also advanced some purely transitive versions (golang.org/x/sync, x/sys, x/mod, x/net, x/tools, x/telemetry, go-logr/logr) via minimal version selection; these are incidental to satisfying the direct bumps, not independently chosen. Validation: Built a linux/amd64 lifecycle binary from main before and after this change and scanned both with a local grype CLI against a same-day vulnerability DB. Before: 1 finding (GO-2026-5970, High, golang.org/x/text v0.37.0). After: 0 findings. The other 6 CVEs from the issue did not reproduce against either binary built from current main (the issue was filed against the older v0.21.14 release, whose dependency versions differ from main); the .grype.yaml entries are added defensively since they were explicitly named in the issue and could resurface in a release scan. `go build ./...` and `go vet ./...` are clean. `go test $(go list ./... | grep -v acceptance)` passes except for the buildpack and image packages, which fail identically on an unmodified checkout in this sandbox (no local Docker daemon; a missing helper binary needed by one generate test) -- confirmed pre-existing/environmental, not caused by this change, by re-running the same tests against a git stash of these changes. Report: buildpacks#1697 Signed-off-by: Pujitha Paladugu <10557236+pujitha24@users.noreply.github.com>
pujitha24
force-pushed
the
auto/issue-1697
branch
from
August 10, 2026 14:38
9f2a159 to
ff0d0c7
Compare
jabrown85
approved these changes
Aug 10, 2026
jabrown85
enabled auto-merge
August 10, 2026 15:02
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.
Summary
Grype flagged 7 CVEs against the v0.21.14 release image. For each, I checked whether the vulnerable code is actually reachable from lifecycle's build (via
go list -deps/go mod why) rather than reacting to the module version alone:golang.org/x/text/unicode/norm(GO-2026-5970, High) is reachable viainternal/extend/kaniko->osscontainertools/kaniko/pkg/executor->spf13/afero, and is the one finding that's actually reproducible against a binary built from currentmain(see Validation). Fixed by bumpinggolang.org/x/textto v0.40.0 (fix landed in 0.39.0).go.opentelemetry.io/otel/baggage(GO-2026-5158, Medium) is reachable viaauth->docker/docker/registry->otelhttp->otel/propagation->otel/baggage. Bumpedgo.opentelemetry.io/otel{,/metric,/trace}to v1.45.0 (fix landed in 1.44.0) as defense-in-depth, even though it wasn't reproducible against a binary built from currentmain.github.com/klauspost/compress/s2(GO-2026-5841) is not imported anywhere in the build (onlyzstdfrom that module is used). Bumped to the fixed v1.18.7 anyway since it's a trivial, risk-free patch bump.containerd/platforms, never the CRI plugin. There is also no fix available for thegithub.com/containerd/containerdv1 module line lifecycle depends on (onlycontainerd/containerd/v2was patched). Documented as suppressions in.grype.yaml, following this repo's existing convention.golang.org/x/crypto/openpgp(GO-2026-5932) is never imported by lifecycle and has no fixed version (upstream advisory says to stop using the package, not upgrade). Documented as a suppression in.grype.yaml.go mod tidyafter these bumps also pulled forward some purely transitive/tooling versions (golang.org/x/sync,x/sys,x/mod,x/net,x/tools,x/telemetry,go-logr/logr) via minimal version selection; these are incidental to satisfying the direct bumps above, not independently chosen.Release notes
Bumped
golang.org/x/text,go.opentelemetry.io/otel, andgithub.com/klauspost/compressto resolve reachable CVEs, and documented several non-exploitable/no-fix-available Grype findings in.grype.yaml.Related
Resolves #1697
Context
Validation: built a
linux/amd64lifecycle binary frommainbefore and after this change and scanned both with a localgrypeCLI against a same-day vulnerability DB. Before: 1 finding (GO-2026-5970, High,golang.org/x/textv0.37.0). After: 0 findings. The other 6 CVEs from the issue did not reproduce against either binary built from currentmain(the issue was filed against the older v0.21.14 release, whose dependency versions differ frommain); the.grype.yamlentries are added defensively since they were explicitly called out in the issue and could resurface in a release scan.go build ./...andgo vet ./...are clean.go test $(go list ./... | grep -v acceptance)passes except for thebuildpackandimagepackages, which fail identically on an unmodified checkout in this sandbox (no local Docker daemon; a missing helper binary needed by one generate test) — confirmed pre-existing/environmental, not caused by this change, by re-running the same tests againstgit stash.