Skip to content

Fix/dependabot bumps#751

Merged
mikemccracken merged 15 commits intoproject-stacker:mainfrom
raharper:fix/dependabot-bumps
Mar 11, 2026
Merged

Fix/dependabot bumps#751
mikemccracken merged 15 commits intoproject-stacker:mainfrom
raharper:fix/dependabot-bumps

Conversation

@raharper
Copy link
Contributor

What type of PR is this?

cleanup

Which issue does this PR fix:

#742
#734
#732
#730
#725
#724
#722
#708
#704

What does this PR do / Why do we need it:

Fix Critical/High/Medium CVEs against golang dependencies in stacker.

If an issue # is not available please add repro steps and logs showing the issue:

grype stacker

Testing done on this change:

make test priv and unpriv on amd64

Automation added to e2e:

none

Will this break upgrades or downgrades?

no

Does this PR introduce any user-facing change?:

Yes. Dropping stacker-bom support. The stacker-bom project is out-of-date with newer synk API which prevents updating it to newer go.mods which then keeps stacker down to be compatible with the stacker-bom go API.

Dropping stacker-bom support

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@raharper

This comment was marked as outdated.

@codecov
Copy link

codecov bot commented Dec 22, 2025

Codecov Report

❌ Patch coverage is 5.40541% with 35 lines in your changes missing coverage. Please review.
✅ Project coverage is 64.74%. Comparing base (9104248) to head (7a9389e).
⚠️ Report is 15 commits behind head on main.

Files with missing lines Patch % Lines
pkg/container/idmap/idmap.go 0.00% 14 Missing ⚠️
pkg/container/userns.go 0.00% 14 Missing ⚠️
pkg/types/stackerfile.go 0.00% 3 Missing and 1 partial ⚠️
pkg/types/layer.go 0.00% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #751      +/-   ##
==========================================
+ Coverage   63.58%   64.74%   +1.16%     
==========================================
  Files          57       53       -4     
  Lines        5083     4601     -482     
==========================================
- Hits         3232     2979     -253     
+ Misses       1184     1024     -160     
+ Partials      667      598      -69     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@raharper raharper force-pushed the fix/dependabot-bumps branch from 23121cd to e82e7ce Compare January 6, 2026 17:06
@raharper
Copy link
Contributor Author

raharper commented Jan 6, 2026

Need to look into the make lint failure; complains about containers/image/storage go module not being importable. However stacker-dynamic and stacker builds just fine.

/home/runner/work/stacker/stacker/hack/tools/golangci-lint/v2.7.2/golangci-lint run --build-tags "exclude_graphdriver_btrfs exclude_graphdriver_devicemapper containers_image_openpgp osusergo netgo skipembed"
Error: pkg/lib/containers_storage/lib.go:8:2: could not import github.com/containers/image/v5/storage (.build/gopath/pkg/mod/github.com/containers/image/v5@v5.34.3/storage/storage_dest.go:32:2: could not import github.com/containers/storage (-: # github.com/containers/storage
Error: .build/gopath/pkg/mod/github.com/containers/storage@v1.59.1/userns.go:334:29: undefined: securejoin.OpenInRoot
Error: .build/gopath/pkg/mod/github.com/containers/storage@v1.59.1/userns.go:340:20: undefined: securejoin.Reopen)) (typecheck)
	"github.com/containers/image/v5/storage"
	^
1 issues:
* typecheck: 1
make: *** [Makefile:130: lint] Error 1

This took way longer than I wanted. Two issues:

  1. Had to move filepath-securejoin to v0.4.1 which still had these functions
  2. Had to move containers/storage to v1.58.0 to deal with GetDiffer -> NewDiffer breaking API change (containers/storage@c9260b97)

@raharper raharper force-pushed the fix/dependabot-bumps branch 4 times, most recently from 1ae968f to c20d613 Compare January 6, 2026 23:47
@raharper
Copy link
Contributor Author

raharper commented Jan 7, 2026

\o/

All these go deps are rather gnarly. A little surprised at the end here that not long were we dependent on umoci compress size (fixed since umoci 0.5.0) but it seems klauspost/compress and go-mtree affect our compressed blobs.

Will clean up these sets of commits tomorrow.

Stacker at this point is squeezy clean via grype:

ubuntu@build-stacker2:~/stacker$ grype --version
grype 0.104.3
ubuntu@build-stacker2:~/stacker$ grype stacker
 ✔ Indexed file system                                                                  stacker
 ✔ Cataloged contents          57747f80a24ceeb3f2e6499f0cde785761a752e4dbe4f0d7a6bd58e2ad42efb0
   ├── ✔ Packages                        [126 packages]
   ├── ✔ Executables                     [1 executables]
   ├── ✔ File digests                    [1 files]
   └── ✔ File metadata                   [1 locations]
 ✔ Scanned for vulnerabilities     [0 vulnerability matches]
   ├── by severity: 0 critical, 0 high, 0 medium, 0 low, 0 negligible
No vulnerabilities found

@mikemccracken
Copy link
Contributor

:shipit:

@raharper raharper force-pushed the fix/dependabot-bumps branch 2 times, most recently from 6b5358e to 2f9c980 Compare March 11, 2026 12:59
@raharper raharper marked this pull request as ready for review March 11, 2026 13:00
@raharper raharper force-pushed the fix/dependabot-bumps branch from 2f9c980 to ab0a92a Compare March 11, 2026 13:12
raharper and others added 10 commits March 11, 2026 09:44
Signed-off-by: Ryan Harper <ryaharpe@cisco.com>
Signed-off-by: Ryan Harper <rharper@woxford.com>
Signed-off-by: Ryan Harper <ryaharpe@cisco.com>
Signed-off-by: Ryan Harper <rharper@woxford.com>
Signed-off-by: Ryan Harper <ryaharpe@cisco.com>
Signed-off-by: Ryan Harper <rharper@woxford.com>
Signed-off-by: Ryan Harper <ryaharpe@cisco.com>
Signed-off-by: Ryan Harper <rharper@woxford.com>
Signed-off-by: Ryan Harper <ryaharpe@cisco.com>
Signed-off-by: Ryan Harper <rharper@woxford.com>
Re-add the Bom field in the Layer struct

Signed-off-by: Ryan Harper <ryaharpe@cisco.com>
Signed-off-by: Ryan Harper <rharper@woxford.com>
fulcio bump requires:

- move to go 1.25.8
- latest grpc 1.77.0 had issues with some undefined header so
  drop replace to 1.76.0 release

Signed-off-by: Ryan Harper <ryaharpe@cisco.com>
Signed-off-by: Ryan Harper <rharper@woxford.com>
Signed-off-by: Ryan Harper <ryaharpe@cisco.com>
Signed-off-by: Ryan Harper <rharper@woxford.com>
Fix the remaining high CVE by bumping to modern incus v6
shared golang API for idmap support

- reworked idmap struct member IDs and
- carefully bump to storage v1.58.0 as our containers/images
  release v5.34.0 requires a containers/storage release 1.58.0
  which is the last release before the API change of
  GetDiffer -> NewDiffer which breaks the storage_dest.go in
  the v5.34.0.  Note this is only detectable via `make lint` as
  the stacker binary does not utilize the pkg/lib code; but we have
  downstream tools which do import this which may be affected.

Signed-off-by: Ryan Harper <ryaharpe@cisco.com>
Signed-off-by: Ryan Harper <rharper@woxford.com>
Signed-off-by: Ryan Harper <ryaharpe@cisco.com>
Signed-off-by: Ryan Harper <rharper@woxford.com>
raharper and others added 5 commits March 11, 2026 09:45
Signed-off-by: Ryan Harper <ryaharpe@cisco.com>
Signed-off-by: Ryan Harper <rharper@woxford.com>
The various tar.gz test fails when we move up, keep previous values:
  compress v1.18.0
  mtree v0.5.4

Signed-off-by: Ryan Harper <ryaharpe@cisco.com>
Signed-off-by: Ryan Harper <rharper@woxford.com>
Resolve the last few Medium CVEs by bumping sigstore deps:

rekor v1.3.8 => v1.5.0
sigstore v1.10.0 => v1.10.4
fulcio v1.8.3 => v1.8.5

Signed-off-by: Ryan Harper <ryaharpe@cisco.com>
Signed-off-by: Ryan Harper <rharper@woxford.com>
Some strange case where the workflow cached 1.25.7 and used 1.25.8

Signed-off-by: Ryan Harper <ryaharpe@cisco.com>
Signed-off-by: Ryan Harper <rharper@woxford.com>
Detect when stacker.yaml has 'bom:' field set and print
a warning that it is no longer supported.

Signed-off-by: Ryan Harper <ryaharpe@cisco.com>
Signed-off-by: Ryan Harper <rharper@woxford.com>
@raharper raharper force-pushed the fix/dependabot-bumps branch from ab0a92a to 7a9389e Compare March 11, 2026 14:46
Copy link
Contributor

@mikemccracken mikemccracken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looked again after your update, still lgtm. thanks for adding the WasBom check.

It looks like the docs dir here doesn't cover bom: at all, which was an oversight.
It is currently covered in the website docs at https://github.com/project-stacker/project-stacker.github.io/blob/main/docs/user_guide/generate_sbom.md?plain=1 - which I previously assumed were generated from the docs directory here. We should delete that when this merges.

@mikemccracken mikemccracken merged commit 8e9e9d6 into project-stacker:main Mar 11, 2026
10 of 23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants