-
Notifications
You must be signed in to change notification settings - Fork 0
Add SBOM release metadata #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -124,6 +124,8 @@ jobs: | |
|
|
||
| - name: Generate release checksums | ||
| shell: bash | ||
| env: | ||
| VERSION: ${{ needs.version.outputs.version }} | ||
| run: | | ||
| mkdir -p release-files | ||
| mapfile -t downloaded_files < <(find release-assets -type f -name '*.zip' | sort) | ||
|
|
@@ -136,15 +138,37 @@ jobs: | |
| cp "$file" "release-files/$(basename "$file")" | ||
| done | ||
|
|
||
| mapfile -t files < <(find release-files -maxdepth 1 -type f -name '*.zip' | sort) | ||
| timestamp="$(date -u +"%Y-%m-%dT%H:%M:%SZ")" | ||
| cat > "release-files/MarkdownTableEditor-$VERSION-sbom.cdx.json" <<EOF | ||
| { | ||
| "bomFormat": "CycloneDX", | ||
| "specVersion": "1.6", | ||
| "version": 1, | ||
| "metadata": { | ||
| "timestamp": "$timestamp", | ||
| "component": { | ||
| "type": "application", | ||
| "name": "NppMarkdownTableEditor", | ||
| "version": "$VERSION", | ||
| "purl": "pkg:github/krotname/NppMarkdownTableEditor@v$VERSION" | ||
| } | ||
| } | ||
| } | ||
| EOF | ||
|
|
||
| mapfile -t files < <(find release-files -maxdepth 1 -type f \( -name '*.zip' -o -name '*-sbom.cdx.json' \) | sort) | ||
| sha256sum "${files[@]}" > SHA256SUMS.txt | ||
| cat SHA256SUMS.txt | ||
|
|
||
| - name: Generate release provenance attestation | ||
| continue-on-error: true | ||
| uses: actions/attest@59d89421af93a897026c735860bf21b6eb4f7b26 # v4 | ||
| with: | ||
| subject-checksums: SHA256SUMS.txt | ||
| - name: Generate release SBOM attestation | ||
| uses: actions/attest@59d89421af93a897026c735860bf21b6eb4f7b26 # v4 | ||
| with: | ||
| subject-path: release-files/*.zip | ||
| sbom-path: release-files/*-sbom.cdx.json | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
In the release job, this action input is not run through a shell, so the Useful? React with 👍 / 👎. |
||
|
|
||
| - name: Publish GitHub release | ||
| shell: bash | ||
|
|
@@ -153,7 +177,7 @@ jobs: | |
| TAG_NAME: ${{ needs.version.outputs.tag }} | ||
| VERSION: ${{ needs.version.outputs.version }} | ||
| run: | | ||
| mapfile -t files < <(find release-files -maxdepth 1 -type f -name '*.zip' | sort) | ||
| mapfile -t files < <(find release-files -maxdepth 1 -type f \( -name '*.zip' -o -name '*-sbom.cdx.json' \) | sort) | ||
| if [ "${#files[@]}" -eq 0 ]; then | ||
| echo "No release ZIP files were downloaded." >&2 | ||
| exit 1 | ||
|
|
@@ -163,7 +187,7 @@ jobs: | |
|
|
||
| - Hardened GitHub Actions permissions, dependency review, CodeQL, Scorecard, release packaging, and remote-update checks after repository audit. | ||
| - Refreshed compatibility smoke scripts and packaging targets for the current Notepad++ plugin release baseline. | ||
| - Rebuilt x86, x64, and arm64 plugin ZIPs plus Plugin Admin ZIPs with SHA-256 sums. | ||
| - Rebuilt x86, x64, and arm64 plugin ZIPs plus Plugin Admin ZIPs with SHA-256 sums, SBOM, and GitHub attestations. | ||
|
|
||
| ## Validation | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After the SBOM path is made explicit, the generated CycloneDX document is still rejected by the same pinned
actions/attestcode: its CycloneDX detector requiresbomFormat,serialNumber, andspecVersion, but this JSON only emitsbomFormatandspecVersion. That makes the SBOM attestation fail withUnsupported SBOM format, blocking releases that use the new SBOM step.Useful? React with 👍 / 👎.