CD workflow: generate SBOM artifact with least-privilege permissions#62
Merged
Conversation
Co-authored-by: thomasneuberger <23504477+thomasneuberger@users.noreply.github.com> Agent-Logs-Url: https://github.com/thomasneuberger/TgHomeBot/sessions/919dae8a-b9a6-479b-8135-ed4e6160e078
Copilot
AI
changed the title
[WIP] Extend CD workflow to create SBOM artifact
Add SBOM generation to CD workflow
Mar 22, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Adds SBOM generation to the CD workflow so each deployed container image has a downloadable SPDX JSON SBOM attached to the workflow run (supports supply-chain visibility for releases).
Changes:
- Expanded workflow token permissions to support SBOM generation/attestation.
- Added an
anchore/sbom-actionstep to generate an SPDX JSON SBOM for the pushed image and upload it as an artifact.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
… CD workflow Co-authored-by: thomasneuberger <23504477+thomasneuberger@users.noreply.github.com> Agent-Logs-Url: https://github.com/thomasneuberger/TgHomeBot/sessions/520c83c2-8c1a-4670-ac3e-6cc2fd1abb96
Copilot
AI
changed the title
Add SBOM generation to CD workflow
CD workflow: generate SBOM artifact with least-privilege permissions
Mar 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Extends the CD workflow to generate an SBOM from the published container image and attach it as a workflow artifact. Adds only the permissions actually required — dropping the over-broad
id-token: writeandattestations: writethat are only needed for signed supply-chain attestations (e.g.actions/attest-sbom), which this workflow does not create.Changes
.github/workflows/cd.ymlactions: writepermission (required for artifact upload)anchore/sbom-actionstep post-push, producing an SPDX JSON SBOM uploaded assbom-<image-tag>.spdx.jsonid-token: writeandattestations: writeare not included —anchore/sbom-actiononly needsactions: writeto upload the artifactOriginal prompt
📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.