Add SBOM and provenance generation - #188
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds supply-chain metadata generation and publishing for Flashbox L1 builds by producing a CycloneDX 1.6 SBOM from the mkosi manifest and signing/verifying provenance + SBOM attestations during the publish workflow.
Changes:
- Add an mkosi post-output script to generate a deterministic CycloneDX 1.6 SBOM from the mkosi JSON manifest.
- Extend the build/publish workflow to generate combined
SHA256SUMS, create Sigstore (SLSA provenance + SBOM) attestations, verify them, and upload artifacts + bundles to R2 / attach to releases. - Update mkosi module configuration to run shared post-output scripts; ignore Python
__pycache__artifacts.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| shared/mkosi.postoutput.d/91-deb-sbom.py | New Python post-output script that converts mkosi manifests into a deterministic CycloneDX 1.6 SBOM. |
| modules/flashbox/flashbox-l1/mkosi.conf | Enables mkosi post-output scripts for flashbox-l1 builds. |
| .gitignore | Ignores Python __pycache__/ directories. |
| .github/workflows/flashbox-l1.yaml | Adds permissions needed to mint/verify attestations in the release job. |
| .github/workflows/_build-and-publish-image.yaml | Adds checksum generation, provenance/SBOM attestation creation, verification, and publishing of SBOM + bundles. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ExtraTrees=modules/flashbox/flashbox-l1/mkosi.extra | ||
| PostInstallationScripts=modules/flashbox/flashbox-l1/mkosi.postinst | ||
| BuildScripts=modules/flashbox/flashbox-l1/mkosi.build | ||
| PostOutputScripts=shared/mkosi.postoutput.d/* |
alexhulbert
left a comment
There was a problem hiding this comment.
Generally looks good except the python file looks a bit overengineered, the shared folder has some flashbots-specific stuff (other companies use it shared folder so we need to keep it generic), and ive run into reproducibility issues with python-based post output files in the past.
ill write up a small ~30-40 line jq script when i get back from my vacation on monday and you lmk if that's a suitable alternative to the python one you have here.
This commit generates a CycloneDX 1.6 SBOM from the mkosi manifest at build time;
Then in the "publish" workflow: