diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 84da383..d2b358a 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -12,6 +12,8 @@ jobs: runs-on: ubuntu-26.04 permissions: contents: write + id-token: write + attestations: write steps: - uses: actions/checkout@v7 - uses: extractions/setup-just@53165ef7e734c5c07cb06b3c8e7b647c5aa16db3 @@ -26,6 +28,10 @@ jobs: - name: Build Artifact run: | just compile "${{ github.event.inputs.tag }}" + - name: Attest Build Provenance + uses: actions/attest@v4.2.2 + with: + subject-path: '.bin/onlylogins' - uses: actions/upload-artifact@v7 with: name: "onlylogins" diff --git a/README.md b/README.md index 9dabc07..c1a71c4 100644 --- a/README.md +++ b/README.md @@ -268,6 +268,26 @@ as a reference for setting up configuration. Before you host on an ARM64 instance, note that the [argon2](https://cs.opensource.google/go/x/crypto/+/refs/tags/v0.59.0:argon2/) crypto package is optimized only for AMD64. +#### Verifying a Release + +Release binaries are signed with a SLSA build provenance attestation, generated +by the `actions/attest` GitHub Action and stored against this repository. The +attestation records the exact commit and workflow that produced the binary, so +you can confirm the file you downloaded is the one built by our release pipeline. + +Use the [GitHub CLI](https://cli.github.com) to verify a downloaded binary: + +```shell +gh attestation verify --repo cattlecloud/onlylogins ./onlylogins +``` + +`gh` checks the file's SHA256 digest against the attestation stored for the +repository, so the filename does not need to match the release asset. The +command succeeds when the binary matches an attestation produced from this +repository. + +#### Running + Launch the agent specifying the `agent` subcommand with the path to your configuration file.