Add SBOM generation to CI/CD pipeline and releases#5588
Conversation
Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
|
@copilot merge job into release.md agentic workflow. it can run concurrently with the agent job. |
|
@copilot Apply comment above |
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Done in 2998b33. Added |
.github/workflows/security-sbom.yml
Outdated
| @@ -0,0 +1,50 @@ | |||
| name: Weekly SBOM Generation | |||
.github/workflows/release.md
Outdated
| echo "release_id=$RELEASE_ID" >> "$GITHUB_OUTPUT" | ||
| echo "✓ Release ID: $RELEASE_ID" | ||
| generate-sbom: | ||
| needs: ["activation"] |
There was a problem hiding this comment.
Fixed in 629a9e1. Changed to needs: ["release"].
.github/workflows/release.md
Outdated
| env: | ||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| run: | | ||
| RELEASE_TAG="${GITHUB_REF#refs/tags/}" |
There was a problem hiding this comment.
@copilot create output in "release" job with release tag and use this output here
There was a problem hiding this comment.
Done in 629a9e1. Added release_tag output to the release job and using it via ${{ needs.release.outputs.release_tag }} in the generate-sbom job.
…, fix job dependencies Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
| needs: ["release"] | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: write |
There was a problem hiding this comment.
@copilot should be released write, not contents
There was a problem hiding this comment.
releases is not a valid GitHub Actions permission. The gh release upload command requires contents: write permission to upload assets to releases. This is the correct permission as per GitHub's documentation.
| format: cyclonedx-json | ||
|
|
||
| - name: Upload SBOM artifacts | ||
| uses: actions/upload-artifact@v4 |
.github/workflows/release.md
Outdated
.github/workflows/release.md
Outdated
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
.github/workflows/security-sbom.yml-Weekly SBOM generation workflowDELETEDgenerate-sbomjob torelease.md- Runs afterreleasejob completesrelease_tagoutput toreleasejob and use it ingenerate-sbomMakefile- addsbomtarget for local generationSECURITY.md- document SBOM generation process.gitignore- exclude generated SBOM filesmake lintandmake buildArchitecture
v*.*.*): SBOM generation runs as part of the release.md workflow via thegenerate-sbomjob, which runs after thereleasejob completes and uses therelease_tagoutputSBOM is generated in both SPDX and CycloneDX formats and attached to GitHub releases.
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.