Skip to content

Commit e41d226

Browse files
committed
Fix SBOM generation
1 parent e828c21 commit e41d226

3 files changed

Lines changed: 7 additions & 11 deletions

File tree

.github/workflows/release.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ jobs:
2929

3030
- name: Install Cosign
3131
uses: sigstore/cosign-installer@v4.1.2
32+
with:
33+
cosign-release: 'v3.1.3'
3234

3335
- name: Generate and sign SBOM
3436
run: make sbom

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,8 @@ sbom: sbom/assets/troubleshoot-sbom.tgz
246246
--tlog-upload \
247247
--yes \
248248
--rekor-url=https://rekor.sigstore.dev \
249-
sbom/assets/troubleshoot-sbom.tgz > sbom/assets/troubleshoot-sbom.tgz.sig
249+
--bundle sbom/assets/troubleshoot-sbom.tgz.bundle \
250+
sbom/assets/troubleshoot-sbom.tgz
250251
cosign public-key --key cosign.key --outfile sbom/assets/key.pub
251252

252253
.PHONY: get-govulncheck

README.md

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -56,19 +56,12 @@ For questions about using Troubleshoot, how to contribute and engaging with the
5656
# Software Bill of Materials
5757
A signed SBOM that includes Troubleshoot dependencies is included in each release.
5858
- **troubleshoot-sbom.tgz** contains a software bill of materials for Troubleshoot.
59-
- **troubleshoot-sbom.tgz.sig** is the digital signature for troubleshoot-sbom.tgz
59+
- **troubleshoot-sbom.tgz.bundle** contains the signature and transparency log material used by Cosign.
6060
- **key.pub** is the public key from the key pair used to sign troubleshoot-sbom.tgz
6161

6262
The following example illustrates using [cosign](https://github.com/sigstore/cosign) to verify that **troubleshoot-sbom.tgz** has
63-
not been tampered with.
63+
not been tampered with. Install [Cosign v3](https://github.com/sigstore/cosign/releases).
6464
```sh
65-
$ cosign verify-blob --key key.pub --signature troubleshoot-sbom.tgz.sig troubleshoot-sbom.tgz
66-
Verified OK
67-
```
68-
69-
If you were to get an error similar to the one below, it means you are verifying an SBOM signed using cosign `v1` using a newer `v2` of the binary. This version introduced [breaking changes](https://github.com/sigstore/cosign/blob/main/CHANGELOG.md#breaking-changes) which require an additional flag `--insecure-ignore-tlog=true` to successfully verify SBOMs like so.
70-
```sh
71-
$ cosign verify-blob --key key.pub --signature troubleshoot-sbom.tgz.sig troubleshoot-sbom.tgz --insecure-ignore-tlog=true
72-
WARNING: Skipping tlog verification is an insecure practice that lacks of transparency and auditability verification for the blob.
65+
$ cosign verify-blob --key key.pub --bundle troubleshoot-sbom.tgz.bundle troubleshoot-sbom.tgz
7366
Verified OK
7467
```

0 commit comments

Comments
 (0)