Skip to content

Commit

Permalink
Introduce Artifact Attestations (#2038)
Browse files Browse the repository at this point in the history
  • Loading branch information
wata727 committed May 11, 2024
1 parent d69dad0 commit 0628926
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
permissions:
contents: write
id-token: write
attestations: write

jobs:
goreleaser:
Expand All @@ -32,3 +33,6 @@ jobs:
args: release --rm-dist --release-notes tools/release/release-note.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/attest-build-provenance@v1
with:
subject-path: 'dist/checksums.txt'
15 changes: 13 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,24 @@ NOTE: The Chocolatey package is NOT directly maintained by the TFLint maintainer

### Verification

Releases are signed by [Cosign](https://github.com/sigstore/cosign). `cosign verify-blob` ensures that the release was built with this repository's GitHub Actions.
#### Cosign

```
[Cosign](https://github.com/sigstore/cosign) `verify-blob` command ensures that the release was built with GitHub Actions in this repository.

```console
cosign verify-blob --certificate=checksums.txt.pem --signature=checksums.txt.keyless.sig --certificate-identity-regexp="^https://github.com/terraform-linters/tflint" --certificate-oidc-issuer=https://token.actions.githubusercontent.com checksums.txt
sha256sum --ignore-missing -c checksums.txt
```

#### GitHub CLI (Beta)

[Artifact Attestations](https://docs.github.com/en/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds) are available that can be verified using the GitHub CLI.

```console
gh attestation verify checksums.txt -R terraform-linters/tflint
sha256sum --ignore-missing -c checksums.txt
```

### Docker

Instead of installing directly, you can use the Docker image:
Expand Down

0 comments on commit 0628926

Please sign in to comment.