fix(deps): bump buildkit to v0.28.1 (CVE-2026-33747/33748) via kubescape fork#4954
Conversation
…ape fork buildkit v0.26.3 carries two HIGH advisories reachable in KSail through kubescape's copa patch path (core/core -> buildx -> buildkit): GO-2026-4858 / CVE-2026-33747 (untrusted frontend file escape) and GO-2026-4859 / CVE-2026-33748 (git #ref:subdir path traversal), both fixed in v0.28.1. The bump was blocked (see #4615): buildkit v0.28.0 removed authprovider.DockerAuthProviderConfig.ConfigFile, which kubescape v3.0.48 (the latest v3 tag) still uses in core/core/patch.go, so it cannot compile against a fixed buildkit. Every kubescape build that fixes patch.go (master, v4.x) also bumps docker/buildx to v0.33, which migrates to the moby/moby/client split modules — incompatible with KSail's docker monolith pin required by k3d. Resolve by pinning kubescape to a minimal fork (devantler/kubescape: v3.0.48 plus the one-line upstream-master patch.go fix) via a go.mod replace, keeping the docker monolith type system intact. Closes the buildkit half of the govulncheck backlog (#4894); the x/{crypto,net,image} half was handled in #4951. Supersedes #4615. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
✅MegaLinter analysis: Success✅ Linters with no issuesactionlint, bash-exec, git_diff, hadolint, jscpd, jsonlint, lychee, markdown-table-formatter, markdownlint, prettier, prettier, shellcheck, shfmt, stylelint, syft, trivy-sbom, trufflehog, v8r, v8r, yamllint Notices📣 MegaLinter 9.5.0 is out! Discover the new features and security recommendations in the release announcement. (Skip this info by defining See detailed reports in MegaLinter artifacts
|
There was a problem hiding this comment.
Pull request overview
Bumps github.com/moby/buildkit from v0.26.3 to v0.28.1 to address two HIGH advisories (CVE-2026-33747 / CVE-2026-33748) that are reachable transitively via kubescape's image-patch path. Because upstream kubescape v3.0.48 still uses an API removed in BuildKit v0.28.0, and newer kubescape releases force the docker monolith → split-module migration that conflicts with k3d, the bump is unblocked by pinning kubescape to a minimal one-line devantler/kubescape fork via a go.mod replace directive (mirroring the existing loft-sh/log => devantler/log precedent).
Changes:
- Bump
github.com/moby/buildkitto v0.28.1 (plus transitivetonistiigi/fsutilandotelhttptraceupdates). - Add a
replaceforgithub.com/kubescape/kubescape/v3pointing at thedevantler/kubescapefork, with a comment explaining the API-break / monolith-vs-split tradeoff. - Refresh
go.sum(incl.containerd/nydus-snapshotterv0.15.4 → v0.15.11 and the newly-introducedmoby/policy-helpers).
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| go.mod | Bumps buildkit + transitive indirect deps; adds documented replace pointing kubescape to the devantler fork. |
| go.sum | Updates checksums for buildkit and its transitive deps; replaces upstream kubescape sums with fork sums. |
Code Coverage OverviewLanguages: Go Go / code-coverage/goThe overall coverage remains at 55%, unchanged from the branch. Updated |
The gomoddirectives linter enforces an explicit replace-allow-list; add github.com/kubescape/kubescape/v3 alongside the existing entries (docker, grype, loft-sh/log, moby/go-archive) so the new fork replace passes lint. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
There was a problem hiding this comment.
⚠️ Performance Alert ⚠️
Possible performance regression was detected for benchmark.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.50.
| Benchmark suite | Current: 7fc1692 | Previous: 0b88c6a | Ratio |
|---|---|---|---|
BenchmarkCluster_MarshalJSON/FullProductionCluster (github.com/devantler-tech/ksail/v7/pkg/apis/cluster/v1alpha1) |
249158 ns/op 24791 B/op 551 allocs/op |
136428 ns/op 24779 B/op 551 allocs/op |
1.83 |
BenchmarkCluster_MarshalJSON/FullProductionCluster (github.com/devantler-tech/ksail/v7/pkg/apis/cluster/v1alpha1) - ns/op |
249158 ns/op |
136428 ns/op |
1.83 |
BenchmarkYAMLEncode/Minimal (github.com/devantler-tech/ksail/v7/pkg/apis/cluster/v1alpha1) |
225430 ns/op 25432 B/op 474 allocs/op |
94294 ns/op 25432 B/op 474 allocs/op |
2.39 |
BenchmarkYAMLEncode/Minimal (github.com/devantler-tech/ksail/v7/pkg/apis/cluster/v1alpha1) - ns/op |
225430 ns/op |
94294 ns/op |
2.39 |
BenchmarkYAMLEncode/FullProductionCluster (github.com/devantler-tech/ksail/v7/pkg/apis/cluster/v1alpha1) |
277466 ns/op 36560 B/op 519 allocs/op |
104492 ns/op 36560 B/op 519 allocs/op |
2.66 |
BenchmarkYAMLEncode/FullProductionCluster (github.com/devantler-tech/ksail/v7/pkg/apis/cluster/v1alpha1) - ns/op |
277466 ns/op |
104492 ns/op |
2.66 |
BenchmarkJSONEncode (github.com/devantler-tech/ksail/v7/pkg/apis/cluster/v1alpha1) |
233452 ns/op 19948 B/op 470 allocs/op |
91469 ns/op 19944 B/op 470 allocs/op |
2.55 |
BenchmarkJSONEncode (github.com/devantler-tech/ksail/v7/pkg/apis/cluster/v1alpha1) - ns/op |
233452 ns/op |
91469 ns/op |
2.55 |
BenchmarkPruneClusterDefaults/MostlyDefaults (github.com/devantler-tech/ksail/v7/pkg/apis/cluster/v1alpha1) |
108423 ns/op 9872 B/op 267 allocs/op |
44348 ns/op 9872 B/op 267 allocs/op |
2.44 |
BenchmarkPruneClusterDefaults/MostlyDefaults (github.com/devantler-tech/ksail/v7/pkg/apis/cluster/v1alpha1) - ns/op |
108423 ns/op |
44348 ns/op |
2.44 |
BenchmarkPruneClusterDefaults/MixedDefaultsAndCustom (github.com/devantler-tech/ksail/v7/pkg/apis/cluster/v1alpha1) |
95964 ns/op 9872 B/op 267 allocs/op |
44856 ns/op 9872 B/op 267 allocs/op |
2.14 |
BenchmarkPruneClusterDefaults/MixedDefaultsAndCustom (github.com/devantler-tech/ksail/v7/pkg/apis/cluster/v1alpha1) - ns/op |
95964 ns/op |
44856 ns/op |
2.14 |
This comment was automatically generated by workflow using github-action-benchmark.
The previous run failed on the actions/cache step of the build-artifact job (a GitHub cache-service hiccup), not on any code. This empty commit re-runs CI; it is collapsed away by the squash merge. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

What
Bumps
github.com/moby/buildkitfrom v0.26.3 → v0.28.1, which carries the fixes for two HIGH advisories that are reachable in KSail:#ref:subdirfragment can access restricted files outside the checked-out repo root.Both are reachable transitively via kubescape's image-patch (copa) path:
pkg/client/kubescape→kubescape/v3/core/core→docker/buildx/build→moby/buildkit.Supersedes #4615 (the stale Dependabot bump,
CONFLICTING/DIRTYfor ~3.5 weeks with all required checks red). Closes the buildkit half of the govulncheck backlog tracked in #4894; thegolang.org/x/{crypto,net,image}half was handled in #4951.Why #4615 was stuck (genuine API break, not merge rot)
This is a hard dependency-resolution problem, not conflict rot:
introduced 0, fixed 0.28.1).authprovider.DockerAuthProviderConfig.ConfigFile.core/core/patch.go, and KSail importscore/core(only forcore.NewKubescape), so the package must compile →unknown field ConfigFile. That is exactly what reddened chore(deps): Bump github.com/moby/buildkit from 0.26.3 to 0.28.1 #4615's Build / Test / golangci-lint checks.patch.go(master and the tagged v4.0.x) also bumps docker/buildx → v0.33.0, which migrates to thegithub.com/moby/moby/clientsplit module universe.docker/cli→ v28.3.1) because k3d v5.9.0-rc.0 requires monolith types (documented in the go.modreplaceblock). The two universes are mutually exclusive, and 52 KSail source files + k3d depend on the monolith.So there is no buildkit version that both fixes the CVE and keeps the API kubescape v3.0.48 needs, and no kubescape release that fixes the API without forcing the k3d-incompatible split universe.
The fix
Pin kubescape to a minimal fork via a
go.modreplace:The fork (
devantler/kubescape, branchksail/buildkit-v0.28-compat) is v3.0.48 + a single one-line change — the exact upstream-master fix topatch.go:This keeps everything on the docker monolith type system (buildx stays at v0.30.1, which compiles cleanly against buildkit v0.28.1), so the bump touches only
go.mod/go.sum. It mirrors the existingloft-sh/log => devantler/logfork precedent and is frozen at the kubescape version KSail already targets (cf. the grype pin).Remove the fork once kubescape ships a tagged v3 release that fixes
patch.gowithout forcing the moby/moby split, or once KSail migrates to the split universe (gated on a monolith-free k3d release).Verification
go build ./...— cleango test ./...— green (the only failure is the pre-existingpkg/cli/cmd/chatenv-flake under full parallel load; it passes in isolation)govulncheck ./...— GO-2026-4858 / GO-2026-4859 are gone from the reachable setgit diffconfirms the change is buildkit-only:buildkit v0.26.3→v0.28.1plus its two transitive deps (tonistiigi/fsutil,otelhttptrace);x/crypto,x/net,docker/docker,k8s.io/kubernetesare untouched.Remaining govulncheck findings (out of scope here)
docker/dockerGO-2026-4883 / GO-2026-4887 andk8s.io/kubernetesGO-2025-3521 / GO-2025-3547 — no upstream fix (per MegaLinter osv-scanner gate crashes on cgo and masks a dependency-vulnerability backlog #4894).golang.org/x/crypto(7) +golang.org/x/net(1) GO-2026-50xx — newly published since fix(deps): bump golang.org/x/{crypto,net,image} to clear reachable CVEs #4951, at versionsmainalready pins (x/crypto@v0.51.0,x/net@v0.54.0). This is a re-emergence of the x/* half and is unrelated to this buildkit change; it deserves a separate follow-up bump.Note: depends on a fork
This PR depends on
devantler/kubescape@ksail/buildkit-v0.28-compat(pushed under the maintainer's account). Keep that branch until thereplaceis removed.🤖 Generated with Claude Code