Skip to content

Fix Cosign image digest truncation in workflow#50

Merged
JoshuaAFerguson merged 1 commit into
mainfrom
claude/fix-cosign-digest-truncation-01QFjNctquT7zgFSbxfbejeU
Nov 16, 2025
Merged

Fix Cosign image digest truncation in workflow#50
JoshuaAFerguson merged 1 commit into
mainfrom
claude/fix-cosign-digest-truncation-01QFjNctquT7zgFSbxfbejeU

Conversation

@JoshuaAFerguson

Copy link
Copy Markdown
Member

Fixed an issue where container image digests were being truncated when signing with Cosign, causing parsing errors like:
"could not parse reference: ghcr.io/.../streamspace-ui@sha256:5807b1a7bfacd"

Root cause: The build output digest from docker/build-push-action can be unreliable for multi-platform builds (linux/amd64,linux/arm64), sometimes resulting in truncated or malformed digest strings when interpolated in GitHub Actions expressions.

Solution: Use 'docker buildx imagetools inspect' to reliably extract the manifest list digest after the image is pushed. This approach:

  • Works correctly for multi-platform builds
  • Gets the actual manifest digest from the registry
  • Includes better error handling and debugging output
  • Validates the full sha256 hash format

Changes:

  • Updated all 3 image signing steps (controller, API, UI)
  • Updated all 3 SBOM attestation steps
  • Added validation and error messages for debugging
  • Removed fragile digest parsing from build output

Fixes: Cosign signing failures for multi-platform container images

Fixed an issue where container image digests were being truncated when
signing with Cosign, causing parsing errors like:
"could not parse reference: ghcr.io/.../streamspace-ui@sha256:5807b1a7bfacd"

Root cause: The build output digest from docker/build-push-action can be
unreliable for multi-platform builds (linux/amd64,linux/arm64), sometimes
resulting in truncated or malformed digest strings when interpolated in
GitHub Actions expressions.

Solution: Use 'docker buildx imagetools inspect' to reliably extract the
manifest list digest after the image is pushed. This approach:
- Works correctly for multi-platform builds
- Gets the actual manifest digest from the registry
- Includes better error handling and debugging output
- Validates the full sha256 hash format

Changes:
- Updated all 3 image signing steps (controller, API, UI)
- Updated all 3 SBOM attestation steps
- Added validation and error messages for debugging
- Removed fragile digest parsing from build output

Fixes: Cosign signing failures for multi-platform container images
@JoshuaAFerguson JoshuaAFerguson merged commit 778ed60 into main Nov 16, 2025
7 of 23 checks passed
@JoshuaAFerguson JoshuaAFerguson deleted the claude/fix-cosign-digest-truncation-01QFjNctquT7zgFSbxfbejeU branch November 16, 2025 13:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants