moby / moby/buildkit

Failed builds should still capture provenance in History API

Open
#3,799 0 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.