-
Notifications
You must be signed in to change notification settings - Fork 0
ci: attach SLSA provenance to release assets #472
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
base: main
Are you sure you want to change the base?
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 |
|---|---|---|
|
|
@@ -57,12 +57,22 @@ jobs: | |
| find bin -type f ! -name checksums.txt | sort | xargs sha256sum > bin/checksums.txt | ||
|
|
||
| - name: Attest build provenance | ||
| id: attest | ||
| # actions/attest defaults to SLSA build provenance when no sbom-path or | ||
| # predicate input is given. | ||
| uses: actions/attest@1e69f48acb82d1966a394da916b4c1698aa569d6 # v4 | ||
| with: | ||
| subject-path: 'bin/arc-*-*' # binaries only; runs before signing so the .sigstore.json bundles are not yet present | ||
|
|
||
| - name: Keep the provenance as a release asset | ||
| # The step above only writes to GitHub's attestation store. OpenSSF | ||
| # Scorecard's Signed-Releases check detects provenance by filename and | ||
| # never looks there, so ship the same bundle as *.intoto.jsonl. Verify | ||
| # with: gh attestation verify <binary> --bundle arc-<tag>.intoto.jsonl | ||
| env: | ||
| BUNDLE: ${{ steps.attest.outputs.bundle-path }} | ||
| run: cp "${BUNDLE}" "bin/arc-${GITHUB_REF_NAME}.intoto.jsonl" | ||
|
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. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win 🔎 Supported by static analysis🏁 Script executed: sed -n '1,13p' .github/workflows/release.yamlRepository: opendefensecloud/artifact-conduit Length of output: 366 🏁 Script executed: printf '%s\n' '--- repository conventions ---'
find /tmp/coderabbit-repo-knowledge/opendefensecloud-artifact-conduit-13feb829 -maxdepth 2 -type f -name '*.md' -print
printf '%s\n' '--- workflow ---'
sed -n '55,90p' .github/workflows/release.yaml
printf '%s\n' '--- tag-name usage ---'
rg -n 'GITHUB_REF_NAME|tags:|release tag|tag name' .github README.md 2>/dev/null || trueRepository: opendefensecloud/artifact-conduit Length of output: 2838 🏁 Script executed: cat /tmp/coderabbit-repo-knowledge/opendefensecloud-artifact-conduit-13feb829/learnings/github-workflows.mdRepository: opendefensecloud/artifact-conduit Length of output: 752 Normalize or reject slash-containing release tags. The 🤖 Prompt for AI Agents |
||
|
|
||
| - name: Install cosign | ||
| uses: sigstore/cosign-installer@6f9f17788090df1f26f669e9d70d6ae9567deba6 # v4.1.2 | ||
|
|
||
|
|
@@ -73,7 +83,7 @@ jobs: | |
| cd bin | ||
| for f in *; do | ||
| [ -f "$f" ] || continue | ||
| case "$f" in *.sigstore.json) continue ;; esac | ||
| case "$f" in *.sigstore.json | *.intoto.jsonl) continue ;; esac | ||
| # Emit a Sigstore bundle (signature + cert + Rekor proof), named | ||
| # *.sigstore.json so OpenSSF Scorecard's Signed-Releases check | ||
| # detects it. Don't revert to --output-signature/--output-certificate: | ||
|
|
||
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.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
Repository: opendefensecloud/artifact-conduit
Length of output: 511
🏁 Script executed:
Repository: opendefensecloud/artifact-conduit
Length of output: 9188
Add repository scope to the verification example.
gh attestation verifyrequires--owneror--repo, including with a local--bundle. Use--repo opendefensecloud/artifact-conduit.🤖 Prompt for AI Agents