Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dockerfile: apply no-cache to generated sboms #3414

Merged
merged 2 commits into from
Dec 15, 2022

Conversation

jedevc
Copy link
Member

@jedevc jedevc commented Dec 15, 2022

🛠️ Fixes #3412 (cc @tianon)

If any of the stages that we would have generated sboms for match the no-cache filter, then the no-cache filter should also be applied to the sbom generation.

Note: this fix only applies for dockerfile-generated SBOMs - fallback SBOMs generated by buildkit won't use the no-cache frontend attribute.

If any of the stages that we would have generated sboms for match the
no-cache filter, then the no-cache filter should also be applied to the
sbom generation.

Signed-off-by: Justin Chadwell <me@jedevc.com>
@tonistiigi
Copy link
Member

fallback SBOMs generated by buildkit won't use the no-cache frontend attribute.

Why can't we do this as well?

The fallback scanner should also respect the no-cache value if set.

Signed-off-by: Justin Chadwell <me@jedevc.com>
@jedevc
Copy link
Member Author

jedevc commented Dec 15, 2022

Why can't we do this as well?

Have updated to do this buildkit side. We also need an update buildx side so that no-cache is actually sent to the buildkit solver: docker/buildx#1476

@tonistiigi tonistiigi merged commit c1bb63b into moby:master Dec 15, 2022
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.

SBOM cache in v0.10 is surprisingly aggressive (even with --no-cache)
2 participants