Skip to content

Commit 0628926

Browse files
authored
Introduce Artifact Attestations (#2038)
1 parent d69dad0 commit 0628926

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

.github/workflows/release.yml

+4
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ on:
1010
permissions:
1111
contents: write
1212
id-token: write
13+
attestations: write
1314

1415
jobs:
1516
goreleaser:
@@ -32,3 +33,6 @@ jobs:
3233
args: release --rm-dist --release-notes tools/release/release-note.md
3334
env:
3435
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36+
- uses: actions/attest-build-provenance@v1
37+
with:
38+
subject-path: 'dist/checksums.txt'

README.md

+13-2
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,24 @@ NOTE: The Chocolatey package is NOT directly maintained by the TFLint maintainer
4040

4141
### Verification
4242

43-
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.
43+
#### Cosign
4444

45-
```
45+
[Cosign](https://github.com/sigstore/cosign) `verify-blob` command ensures that the release was built with GitHub Actions in this repository.
46+
47+
```console
4648
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
4749
sha256sum --ignore-missing -c checksums.txt
4850
```
4951

52+
#### GitHub CLI (Beta)
53+
54+
[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.
55+
56+
```console
57+
gh attestation verify checksums.txt -R terraform-linters/tflint
58+
sha256sum --ignore-missing -c checksums.txt
59+
```
60+
5061
### Docker
5162

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

0 commit comments

Comments
 (0)