feat(ci):create sbom generate and attest functions#643
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #643 +/- ##
=========================================
- Coverage 10.99% 7.45% -3.54%
=========================================
Files 173 261 +88
Lines 8671 12930 +4259
=========================================
+ Hits 953 964 +11
- Misses 7612 11857 +4245
- Partials 106 109 +3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@bupd @NucleoFusion This PR is ready for review. Please have a look :) |
There was a problem hiding this comment.
Pull request overview
Adds SBOM generation + in-toto attestation to the container image publish flow to address #229 (attach generated SBOMs to published images), implemented as reusable Dagger functions and wired into the existing publish-and-sign step.
Changes:
- Generate an SPDX-JSON SBOM for each published image using Syft.
- Attest the generated SBOM to the image using
cosign attest(in-toto attestation). - Invoke SBOM generation + attestation as part of
PublishImageAndSign.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
I have made changes, waiting on the working of demo.goharbor.io to test |
2ce1c3e to
88eda24
Compare
|
@adityachopra29 please fix lint |
|
Yes, waiting on the issue #711 to get fixed. Several contributors have raised a PR for the same. Will rebase when the PR is merged |
88eda24 to
3fabe95
Compare
Signed-off-by: Aditya Chopra <adityachopra2912@gmail.com>
Signed-off-by: Aditya Chopra <adityachopra2912@gmail.com>
3fabe95 to
6627144
Compare
|
@bupd @qcserestipy PTAL. I have rebased branch to updated ref |
Overview
This pr fixes #229
The github actions ci is modified to
Verifications
This show that the sbom is successfully generating using the syft command, and we can see the generated sbom in the
sbom.spdx.jsonfileThis shows that the cosign command used to attest the sbom to the image is successful.
In the CI, we use the
githubTokeninstead of verification using OTP, which is taken care of in the implementation