Failed builds should still capture provenance in History API
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 10.3k
- Forks
- 1.5k
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 48
Description
History API (v0.11+) will store provenance attestation for any successful build, even if the user did not ask one to be embedded into the resulting image. This contains a lot of useful information about the build https://github.com/moby/buildkit/blob/master/docs/attestations/slsa-definitions.md .
If build fails, some of this information might still be available but gets lost. Eg. we capture the typed error with stacktrace, vertex and logs but we lose the LLB definition for the build step or the materials digests that were already loaded.
As the build failed and did not generate an artifact, the subject for the attestation would be the error itself, not the image/binary.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the History API path that stores provenance attestations for successful builds, using the linked SLSA definitions for the provenance fields. Trace how failed builds retain typed errors, stacktraces, vertices, and logs, and identify where the LLB definition and already-loaded material digests are discarded. Done means failed builds expose the available provenance with the error as the attestation subject.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- api, build-system
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100