Open jedevc opened 1 year ago
Today, I learned there is a attestation-inline=false
build option. Does it solve your issue?
Today, I learned there is a
attestation-inline=false
build option. Does it solve your issue?
Unfortunately not really. There's no functionality in buildkit today to do anything as described above - I wrote up some additional context in https://github.com/moby/buildkit/pull/4435#issuecomment-1830109768:
small rant (hindsight is 20/20).
inline
is such a weird name for this behavior, it's nothing about inline attestations, it's more about a tag that different exporters can use to detect if an attestation should be included by default.
Currently, when buildkit exports attestations, it exports them inline with the rest of the content:
image
,oci
anddocker
exporters, the attestations are exported using the attached attestation storage.local
andtar
exporters, the attestations are exported to separate files within the output directory.While this is most designed for use cases where the attestations are intended for publishing, using the results in CI/CD pipelines is more complicated. For these cases, a user will likely want to extract the attestations separately from the exported result.
For example:
Ideally, BuildKit should support generating these attestations separately from the main output, to enable these use cases. A couple of implementation possibilities:
attestations
exporter that only exports all the attestations. Using #3403, the user can then precisely configure which attestations end up where, and can create a pipeline to easily get the attestations separately. One issue with the above is that attestations vary between exporters (e.g. the subject of a local attestation is the list of all files in the export, while in an image attestation it's the digest of the platform manifest). We should be able to get the exact same attestation that is exported.