-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #34 from natrontech/ci/improve-release
ci: fix draft release for binary provenance
- Loading branch information
Showing
4 changed files
with
127 additions
and
52 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: verify-release-assets | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
permissions: {} | ||
|
||
jobs: | ||
verification-with-slsa-verifier: | ||
runs-on: ubuntu-latest | ||
permissions: read-all | ||
steps: | ||
- name: Install the verifier | ||
uses: slsa-framework/slsa-verifier/actions/installer@eb7007070baa04976cb9e25a0d8034f8db030a86 # v2.5.1 | ||
|
||
- name: Install Cosign | ||
uses: sigstore/cosign-installer@59acb6260d9c0ba8f4a2f9d9b48431a222b68e20 # v3.5.0 | ||
|
||
- name: Download assets | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
set -euo pipefail | ||
echo "Downloading release assets (tag: $GITHUB_REF_NAME)" | ||
gh -R "$GITHUB_REPOSITORY" release download "$GITHUB_REF_NAME" | ||
# verify each artifact in checksum.txt file with the provenance | ||
- name: Verify assets | ||
run: | | ||
set -euo pipefail | ||
echo "Verifying checksums.txt" | ||
cosign verify-blob \ | ||
--certificate checksums.txt.pem \ | ||
--signature checksums.txt.sig \ | ||
--certificate-identity-regexp '^https://github.com/natrontech/pbs-exporter/.github/workflows/release.yml@refs/tags/v[0-9]+.[0-9]+.[0-9]+(-rc.[0-9]+)?$' \ | ||
--certificate-oidc-issuer https://token.actions.githubusercontent.com \ | ||
checksums.txt | ||
checksums=$(cat checksums.txt) | ||
while read -r line; do | ||
fn=$(echo $line | cut -d ' ' -f2) | ||
echo "Verifying $fn" | ||
slsa-verifier verify-artifact --provenance-path "multiple.intoto.jsonl" \ | ||
--source-uri "github.com/$GITHUB_REPOSITORY" \ | ||
--source-tag "$GITHUB_REF_NAME" \ | ||
"$fn" | ||
done <<<"$checksums" |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
header: | ||
schema-version: 1.0.0 | ||
expiration-date: '2025-06-25T10:00:00.000Z' | ||
last-updated: '2024-06-25' | ||
last-reviewed: '2024-06-25' | ||
project-url: https://github.com/natrontech/pbs-exporter | ||
changelog: https://github.com/natrontech/pbs-exporter/blob/main/CHANGELOG.md | ||
license: https://github.com/natrontech/pbs-exporter/blob/main/LICENSE | ||
project-lifecycle: | ||
bug-fixes-only: false | ||
core-team: | ||
- name: Jan Fuhrer | ||
contact: [email protected] | ||
- name: Sven Gerber | ||
contact: [email protected] | ||
status: concept | ||
contribution-policy: | ||
accepts-pull-requests: true | ||
accepts-automated-pull-requests: true | ||
contributing-policy: https://github.com/natrontech/pbs-exporter/blob/main/CONTRIBUTING.md | ||
code-of-conduct: https://github.com/natrontech/pbs-exporter/blob/main/CODE_OF_CONDUCT.md | ||
distribution-points: | ||
- https://github.com/natrontech/pbs-exporter/releases | ||
- https://github.com/orgs/natrontech/packages?repo_name=pbs-exporter | ||
security-testing: | ||
- tool-type: sca | ||
tool-name: Dependabot | ||
tool-version: latest | ||
integration: | ||
ad-hoc: false | ||
ci: true | ||
before-release: true | ||
comment: | | ||
Dependabot is enabled for this repo. | ||
security-contacts: | ||
- type: email | ||
value: [email protected] | ||
primary: true | ||
vulnerability-reporting: | ||
accepts-vulnerability-reports: true | ||
bug-bounty-available: false | ||
email-contact: [email protected] | ||
security-policy: https://github.com/natrontech/pbs-exporter/blob/main/SECURITY.md | ||
comment: | | ||
Report security vulnerabilities via GitHub Security Advisory in this repository. | ||
dependencies: | ||
third-party-packages: true | ||
dependencies-lists: | ||
- https://github.com/natrontech/pbs-exporter/blob/main/go.mod | ||
sbom: | ||
- sbom-file: https://github.com/natrontech/pbs-exporter/releases | ||
sbom-format: CycloneDX | ||
sbom-url: https://github.com/natrontech/pbs-exporter/blob/main/SECURITY.md#sbom | ||
- sbom-file: https://github.com/natrontech/pbs-exporter/pkgs/container/sbom | ||
sbom-format: CycloneDX | ||
sbom-url: https://github.com/natrontech/pbs-exporter/blob/main/SECURITY.md#sbom |