Skip to content

Commit f12edf6

Browse files
fix: SBOM attestation for multi-platform images and cosign identity matching
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 6d503b7 commit f12edf6

File tree

4 files changed

+10
-5
lines changed

4 files changed

+10
-5
lines changed

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
5858
- name: SBOM attestation for initium image
5959
run: |
6060
cosign attest --yes --type spdx \
61-
--predicate <(docker buildx imagetools inspect ghcr.io/kitstream/initium@${{ steps.build-main.outputs.digest }} --format '{{json .SBOM.SPDX}}') \
61+
--predicate <(docker buildx imagetools inspect ghcr.io/kitstream/initium@${{ steps.build-main.outputs.digest }} --format '{{json (index .SBOM "linux/amd64").SPDX}}') \
6262
ghcr.io/kitstream/initium@${{ steps.build-main.outputs.digest }}
6363
- uses: docker/build-push-action@v6
6464
id: build-jyq
@@ -81,5 +81,5 @@ jobs:
8181
- name: SBOM attestation for initium-jyq image
8282
run: |
8383
cosign attest --yes --type spdx \
84-
--predicate <(docker buildx imagetools inspect ghcr.io/kitstream/initium-jyq@${{ steps.build-jyq.outputs.digest }} --format '{{json .SBOM.SPDX}}') \
84+
--predicate <(docker buildx imagetools inspect ghcr.io/kitstream/initium-jyq@${{ steps.build-jyq.outputs.digest }} --format '{{json (index .SBOM "linux/amd64").SPDX}}') \
8585
ghcr.io/kitstream/initium-jyq@${{ steps.build-jyq.outputs.digest }}

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Fixed
11+
12+
- SBOM attestation in release workflow: use platform-specific SBOM path (`index .SBOM "linux/amd64"`) instead of `.SBOM.SPDX` which returns `null` for multi-platform images.
13+
- Cosign verification commands in docs and Makefile: use `--certificate-identity` with the exact tag ref (e.g. `@refs/tags/v2.0.0`) instead of a glob pattern (`v*`) which cosign does not support.
14+
1015
## [2.0.0] - 2026-03-14
1116

1217
### Security

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
BINARY := initium
22
VERSION ?= dev
33
IMAGE ?= ghcr.io/kitstream/initium
4-
COSIGN_IDENTITY := https://github.com/KitStream/initium/.github/workflows/release.yml@refs/tags/v*
4+
COSIGN_IDENTITY := https://github.com/KitStream/initium/.github/workflows/release.yml@refs/tags/v$(VERSION)
55
.PHONY: all build test lint clean verify-image
66
all: lint test build
77
build:

docs/security.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ Release images are signed with [cosign](https://github.com/sigstore/cosign) usin
8686
# Verify signature (requires cosign)
8787
cosign verify \
8888
--certificate-oidc-issuer https://token.actions.githubusercontent.com \
89-
--certificate-identity 'https://github.com/KitStream/initium/.github/workflows/release.yml@refs/tags/v*' \
89+
--certificate-identity 'https://github.com/KitStream/initium/.github/workflows/release.yml@refs/tags/v2.0.0' \
9090
ghcr.io/kitstream/initium:2.0.0
9191
9292
# Or use the Makefile target (also supports IMAGE=ghcr.io/kitstream/initium-jyq)
@@ -99,7 +99,7 @@ make verify-image VERSION=2.0.0
9999
cosign verify-attestation \
100100
--type spdx \
101101
--certificate-oidc-issuer https://token.actions.githubusercontent.com \
102-
--certificate-identity 'https://github.com/KitStream/initium/.github/workflows/release.yml@refs/tags/v*' \
102+
--certificate-identity 'https://github.com/KitStream/initium/.github/workflows/release.yml@refs/tags/v2.0.0' \
103103
ghcr.io/kitstream/initium:2.0.0
104104
```
105105

0 commit comments

Comments
 (0)