|
| 1 | +version: 2 |
| 2 | + |
| 3 | +project_name: tpm-trust |
| 4 | + |
| 5 | +builds: |
| 6 | + - id: tpm-trust |
| 7 | + main: ./ |
| 8 | + binary: tpm-trust |
| 9 | + env: |
| 10 | + - CGO_ENABLED=0 |
| 11 | + goos: |
| 12 | + - linux |
| 13 | + goarch: |
| 14 | + - amd64 |
| 15 | + - arm64 |
| 16 | + ldflags: |
| 17 | + - -s -w -X main.builtBy=goreleaser |
| 18 | + |
| 19 | +archives: |
| 20 | + - id: tpm-trust-archives |
| 21 | + ids: |
| 22 | + - tpm-trust |
| 23 | + formats: [ 'tar.gz' ] |
| 24 | + name_template: "tpm-trust_{{ .Version }}_{{ .Os }}_{{ .Arch }}" |
| 25 | + |
| 26 | +checksum: |
| 27 | + name_template: "checksums.txt" |
| 28 | + algorithm: sha256 |
| 29 | + |
| 30 | +sboms: |
| 31 | + - artifacts: archive |
| 32 | + - id: source |
| 33 | + artifacts: source |
| 34 | + |
| 35 | +# Signature in Sigstore bundle format |
| 36 | +signs: |
| 37 | + - id: cosign-checksum |
| 38 | + cmd: cosign |
| 39 | + signature: "${artifact}.sigstore.json" |
| 40 | + args: |
| 41 | + - "sign-blob" |
| 42 | + - "--bundle=${signature}" |
| 43 | + - "${artifact}" |
| 44 | + - "--yes" |
| 45 | + artifacts: checksum |
| 46 | + |
| 47 | +release: |
| 48 | + github: |
| 49 | + owner: loicsikidi |
| 50 | + name: "{{ .ProjectName }}" |
| 51 | + draft: true |
| 52 | + prerelease: auto |
| 53 | + mode: append |
| 54 | + header: | |
| 55 | + ## {{ .ProjectName }} {{ .Tag }} |
| 56 | +
|
| 57 | + ### What's Changed |
| 58 | +
|
| 59 | + This release contains the `tpm-trust` binary and OCI images built from commit [{{ .FullCommit }}](https://github.com/loicsikidi/{{ .ProjectName }}/tree/{{ .FullCommit }}). |
| 60 | +
|
| 61 | + ### Artifacts |
| 62 | +
|
| 63 | + - **`tpm-trust_$VERSION_$OS_$ARCH.$EXTENSION`** - CLI binaries for various platforms (stored in archives) |
| 64 | + - **`tpm-trust_$VERSION_$OS_$ARCH.$EXTENSION.sbom.json`** - SBOMs for the binaries in SPDX format |
| 65 | + - **`checksums.txt`** - SHA-256 checksums of all artifacts |
| 66 | + - **`checksums.txt.sigstore.json`** - Sigstore signature bundle for checksum verification |
| 67 | +
|
| 68 | + ### Verification |
| 69 | +
|
| 70 | + > [!IMPORTANT] |
| 71 | + > If you are not familiar with the concepts around software supply chain security, |
| 72 | + > (eg. build provenance attestation, keyless signature, etc.), please read the following resources first: |
| 73 | + > - [Cosign Signing Overview](https://docs.sigstore.dev/cosign/signing/overview/) |
| 74 | + > - [SLSA provenance attestation](https://slsa.dev/spec/v1.2/provenance) |
| 75 | + > - [GitHub attest-build-provenance action](https://github.com/actions/attest-build-provenance) |
| 76 | +
|
| 77 | + For complete security verification, follow this two-step process: |
| 78 | +
|
| 79 | + **Step 1: Verify Integrity with Cosign** |
| 80 | +
|
| 81 | + First, verify the **integrity** of the checksums file using Cosign: |
| 82 | +
|
| 83 | + > [!TIP] |
| 84 | + > Make sure to use **`cosign >= v2.4.3`** to support the [Sigstore bundle format](https://docs.sigstore.dev/about/bundle/). |
| 85 | +
|
| 86 | + ```bash |
| 87 | + # Verify the checksums signature |
| 88 | + cosign verify-blob \ |
| 89 | + --bundle checksums.txt.sigstore.json \ |
| 90 | + --certificate-identity-regexp 'https://github.com/loicsikidi/{{ .ProjectName }}/.github/workflows/release.yaml@refs/tags/{{ .Tag }}' \ |
| 91 | + --certificate-oidc-issuer https://token.actions.githubusercontent.com \ |
| 92 | + checksums.txt |
| 93 | +
|
| 94 | + # Verify any artifact matches the checksum |
| 95 | + sha256sum -c checksums.txt |
| 96 | + ``` |
| 97 | +
|
| 98 | + **Step 2: Verify Provenance with GitHub CLI** |
| 99 | +
|
| 100 | + Once the checksum integrity is established, verify the **provenance** using GitHub's attestation system: |
| 101 | +
|
| 102 | + ```bash |
| 103 | + # Verify the archive |
| 104 | + gh attestation verify tpm-trust_{{ .Version }}_linux_amd64.tar.gz --repo loicsikidi/{{ .ProjectName }} |
| 105 | + ``` |
| 106 | + footer: | |
| 107 | + **Generated with GoReleaser 🚀** |
| 108 | +
|
| 109 | +changelog: |
| 110 | + use: github |
| 111 | + sort: asc |
| 112 | + filters: |
| 113 | + exclude: |
| 114 | + - '^docs' |
| 115 | + - '^test' |
0 commit comments