ci: attach provenance and SBOM attestations to the published image - #361
ci: attach provenance and SBOM attestations to the published image#361kobihikri wants to merge 33 commits into
Conversation
Improvements
Improvements
Improvements
Improvements
Update Readme
Feat(ci): auto-sync README.md to Docker Hub on every push
Improvements
Improvements
Improvements
Greptile SummaryAdds BuildKit provenance and SBOM attestations to published Docker images.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| .github/workflows/docker-image.yml | Enables provenance and SBOM attestations without changing image tags, registry authentication, cache configuration, or build inputs. |
Reviews (2): Last reviewed commit: "ci: restore trailing newline at end of f..." | Re-trigger Greptile
|
Correction — I got a fact wrong in this PR, and I would rather flag it myself than let it sit. I wrote that the pushed manifest "carries no provenance or SBOM attestation". That is half wrong, and the wrong half matters. Provenance is already there. For public repositories, The SBOM is genuinely new. That part stands — the same page says "SBOM attestations aren't automatically added to the image", and I also wrote in the caveats that So the honest description of this PR is: it adds an SBOM attestation, and pins the provenance mode explicitly instead of relying on the default. Both are still defensible — an explicit line means the behaviour will not change quietly if the default ever does — but it is a smaller change than my description implied, and you should judge it on that basis rather than on what I originally wrote. Happy to retitle and rewrite the description accordingly, or to close this if the SBOM alone is not worth the diff to you. Either is fine — just say which and I will act on it. Apologies for the inaccuracy. It was caught by a maintainer reviewing the same change on another project, and they were right to. |
|
Thanks for the PR and for the honest framing (including the "no SLSA level claimed" note) — appreciated. After looking into it, I'm leaning toward not merging this, for two reasons:
If you're interested in doing the signed-attestation version properly, I'd be happy to look at that as a separate proposal. Thanks again for taking the time to look at the workflow. |
Hi, and thanks for MyIP.
.github/workflows/docker-image.ymlpublishes the image, but the pushed manifest carries no provenance or SBOM attestation. Someone pulling it cannot check that it was built by this workflow, from this repository, at that tag.MyIP is self-hosted so the lookups it performs stay on the operator's own box rather than going through a third-party service — the same reasoning that makes the image's origin worth confirming.
The change is two lines on the build step:
BuildKit attaches both to the image manifest, so they travel with the image. No permissions change is needed — nothing has to gain
id-token, and your tag and cache configuration are untouched.Two caveats worth stating:
mode=maxrecords the full build including build arguments, soprovenance: trueis the smaller option if any have ever been sensitive; and attestations add an extra manifest to the index, which the registry supports.No SLSA level claimed — the attestation is what BuildKit produces.
Disclosure: I used AI assistance to help spot this and prepare the change, and I read the workflow myself.