Skip to content

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.

stacker-bom support is really far behind where it needs to be
to not keep stacker back in go dependencies.

Once stacker-bom is ported to recent syft go library we can
re-introduce support in stacker itself.

Signed-off-by: Ryan Harper <rharper@woxford.com>
Bump the major Critical CVE components. Once built a grype scan
shows now Critial CVEs anymore, just Highs/Mediums

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

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

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
- umoci version bumped and updated calls with time.Now()

Signed-off-by: Ryan Harper <rharper@woxford.com>
- Bump to latest golangci-lint (still has issues though)
- Attempt some go mod bumpts to deal with golangci-lint run
  complaining about containers/storage module
- Fix up a few more container image call sites where we need to
  pass in a time.Time parameter

Signed-off-by: Ryan Harper <rharper@woxford.com>
@raharper
Copy link
Contributor Author

raharper commented Dec 22, 2025

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

Signed-off-by: Ryan Harper <rharper@woxford.com>
Signed-off-by: Ryan Harper <rharper@woxford.com>
@codecov
Copy link

codecov bot commented Dec 22, 2025

Codecov Report

❌ Patch coverage is 12.50000% with 28 lines in your changes missing coverage. Please review.
✅ Project coverage is 60.21%. Comparing base (ebb4855) to head (23121cd).

Files with missing lines Patch % Lines
pkg/container/idmap/idmap.go 0.00% 14 Missing ⚠️
pkg/container/userns.go 0.00% 14 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #751      +/-   ##
==========================================
+ Coverage   52.84%   60.21%   +7.36%     
==========================================
  Files          59       54       -5     
  Lines        6492     4826    -1666     
==========================================
- Hits         3431     2906     -525     
+ Misses       2418     1346    -1072     
+ Partials      643      574      -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.

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.

1 participant