Commit 9531b88
Add go.mod CVE override mechanism to the Helm build (fix x/net CVEs) (#137)
* Add go.mod CVE override mechanism to Helm build
Bring the declarative go.mod override mechanism (from
rancher/image-build-base) into klipper-helm so we can pin CVE-affected
transitive deps in the upstream Helm module even before Helm bumps them.
klipper-helm builds Helm on upstream golang:alpine (not
hardened-build-base), so this carries a local copy of
scripts/go-mod-overrides.sh alongside a go-mod-overrides file, and runs
it against the cloned Helm source before go build.
Initial entry pins golang.org/x/net to v0.55.0 to remediate
CVE-2026-33814 and CVE-2026-39821, which are unfixed in Helm v4.1.4
(x/net v0.49.0). Verified: go mod tidy and go build ./cmd/helm both
pass with the override applied.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: cwayne18 <cwayne18@users.noreply.github.com>
* Apply go.mod CVE overrides to helm plugins build
The helm-set-status and helm-mapkubeapis plugins are built from their own
upstream modules in the plugins stage and both compile in golang.org/x/net
v0.49.0 (vulnerable to CVE-2026-33814 and CVE-2026-39821). Run the same
go-mod-overrides.sh wrapper for each plugin so they pick up the tracked
x/net@v0.55.0 pin, matching the helm binary build.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: cwayne18 <cwayne18@users.noreply.github.com>
* Address review feedback
- Trim go-mod-overrides header comment that duplicated the script docs
- Copy overrides file once to /src and reference it from both build stages
instead of writing to the filesystem root
- Drop "Rancher images" wording from the script header
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: cwayne18 <cwayne18@users.noreply.github.com>
---------
Signed-off-by: cwayne18 <cwayne18@users.noreply.github.com>
Co-authored-by: cwayne18 <cwayne18@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent de25159 commit 9531b88
3 files changed
Lines changed: 69 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
23 | 30 | | |
24 | 31 | | |
25 | 32 | | |
| |||
53 | 60 | | |
54 | 61 | | |
55 | 62 | | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
56 | 68 | | |
57 | 69 | | |
58 | 70 | | |
59 | 71 | | |
60 | 72 | | |
61 | 73 | | |
62 | 74 | | |
63 | | - | |
| 75 | + | |
64 | 76 | | |
65 | 77 | | |
66 | 78 | | |
| |||
69 | 81 | | |
70 | 82 | | |
71 | 83 | | |
72 | | - | |
| 84 | + | |
73 | 85 | | |
74 | 86 | | |
75 | 87 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
0 commit comments