Skip to content

Plan, apply and roll back changes to a production ontology, with a blast radius report and a proof an auditor can re-check.

ci(release): attest build provenance and publish SHASUMS.txt

Nicolas Geyssee7bbdb017bdd
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 67341edd..a7154e96 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -43,6 +43,11 @@ jobs:
runs-on: ubuntu-latest
permissions:
contents: write
+ # attest-build-provenance signs through Sigstore with the workflow's OIDC
+ # identity and writes the attestation back to the repository, so it needs
+ # both on top of the existing contents: write.
+ id-token: write
+ attestations: write
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
@@ -57,6 +62,19 @@ jobs:
mv "${dir}open-ontologies" "${dir}open-ontologies-${target}"
fi
done
+ - name: Generate SHASUMS.txt
+ run: |
+ # Strip the artifact directory so the listed names match the asset
+ # names as downloaded, and keep sha256sum's two-space separator so
+ # `sha256sum -c SHASUMS.txt` works as-is next to the binaries.
+ sha256sum open-ontologies-*/open-ontologies-* | sed 's| .*/| |' > SHASUMS.txt
+ cat SHASUMS.txt
+ - name: Attest build provenance
+ uses: actions/attest-build-provenance@v4
+ with:
+ # Runs after the rename so each attested subject name is the name the
+ # asset is published under.
+ subject-path: 'open-ontologies-*/open-ontologies-*'
- name: Extract release notes from CHANGELOG
run: |
version="${GITHUB_REF_NAME#v}"
@@ -68,4 +86,6 @@ jobs:
uses: softprops/action-gh-release@v2
with:
body_path: release-notes.md
- files: open-ontologies-*/open-ontologies-*
+ files: |
+ open-ontologies-*/open-ontologies-*
+ SHASUMS.txt
diff --git a/CHANGELOG.md b/CHANGELOG.md
index c0b780a0..50d46aa6 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,13 @@ All notable changes to Open Ontologies are documented here.
## [Unreleased]
### Added
+- **Build provenance and checksums on release binaries.** The release job now
+ emits a Sigstore attestation via `actions/attest-build-provenance`, binding
+ each published binary to the workflow run and the commit it was built from,
+ and publishes a `SHASUMS.txt` alongside the assets. Verify with
+ `gh attestation verify <binary> --repo fabio-rovai/open-ontologies`, or
+ `sha256sum -c SHASUMS.txt` next to the downloaded files. The release job
+ gains `id-token: write` and `attestations: write` for the signing identity.
- **Opt-in persistent triple store.** A new `[storage]` section selects the
backend for the main graph: `mode = "memory"` (default, unchanged behaviour)
or `mode = "persistent"`, which opens a RocksDB-backed Oxigraph store at