Better attestations default parameters using new exporter attestation options#1469
Better attestations default parameters using new exporter attestation options#1469jedevc wants to merge 1 commit intodocker:masterfrom
attestation options#1469Conversation
|
Is this actually fixing any cases? I think the new logic is much more complicated and makes assumptions about buildkit implementation. |
|
Yup, so there's a couple of issues fixes:
|
|
Another improvement from this change worth calling out - the version currently in master isn't 100% correct. If we only specified inline attestations, then even for a pushed image, we won't change a manifest into an index and include those attestations. This as mentioned in moby/buildkit#3389 (comment) - this is what currently prevents the error for loading to docker with index support - ideally the proper fix for this needs to be client led, since it's the only component that can be aware of the capabilities of the store where the image is being sent to. |
Signed-off-by: Justin Chadwell <me@jedevc.com>
eb7d70f to
6cec12e
Compare
|
Have dropped the commit to set the additional attestation options, we don't need to change any buildx logic with moby/buildkit#3466. However, we can still take the refactoring commit in here. |
🛠️ Fixes moby/buildkit#3380 (comment)
This PR refactors the buildx attestations addition to improve the defaults for what attestations are added.
The main part of the patch includes the addition of explicit filtering to all exporters -- if the user has not explicitly enabled an attestation option, then no attestations of that type will be exported, even if they are generated (e.g. a frontend that might unconditionally produce SBOMs).
The exception to the above rule is for the
type=imageexporter: for this case only, we additionally ensure that provenance is always generated (with at leastmode=min) and attach this provenance to the generated image (unless the user explicitly opts out, either by specifying--provenance=falseor setting the exporter attestation option to not includeprovenance). Because the end destination of theimageexporter should be a registry (or, I think, a containerd image store?), then it will support the image indexes we use for storing attestations.