Repository navigation
Add cosigning and provenance attestation to image builds - #645
Conversation
📝 WalkthroughWalkthroughThe ChangesImage Signing and Attestation
Estimated code review effort: 2 (Simple) | ~10 minutes Sequence Diagram(s)sequenceDiagram
participant merge as merge job
participant cosign as Cosign
participant attest as actions/attest
participant registry as registry
merge->>merge: inspect image and capture manifest digest
merge->>cosign: install and sign image by digest
merge->>attest: create build provenance attestation
attest->>registry: push attestation for subject digest
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Signed-off-by: averevki <sandyverevkin@gmail.com>
40c5a45 to
87f9c03
Compare
There was a problem hiding this comment.
🧹 Nitpick comments (1)
.github/workflows/build-images.yaml (1)
137-149: 🔒 Security & Privacy | 🔵 Trivial | 💤 Low valueQuote the image ref in these
runsteps. Moving the expression intoenvand quoting the shell variable avoids shell-parsing edge cases.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/build-images.yaml around lines 137 - 149, The image reference in the workflow’s inspect and cosign sign run steps should be quoted to avoid shell parsing issues. Move the full image ref expression used in the `inspect` step and the `cosign sign` step into shell variables or `env`, then use those quoted variables in the `run` commands. Keep the fix localized to the workflow job around `inspect` and `Sign image with cosign`.Source: Linters/SAST tools
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In @.github/workflows/build-images.yaml:
- Around line 137-149: The image reference in the workflow’s inspect and cosign
sign run steps should be quoted to avoid shell parsing issues. Move the full
image ref expression used in the `inspect` step and the `cosign sign` step into
shell variables or `env`, then use those quoted variables in the `run` commands.
Keep the fix localized to the workflow job around `inspect` and `Sign image with
cosign`.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 7411979a-a90f-4960-b365-9df2f960078d
📒 Files selected for processing (1)
.github/workflows/build-images.yaml

Summary
signing using the GitHub OIDC identity
provenance: true)Part of the work on Kuadrant/kuadrant-operator#2038
Context
This improves the Signed-Releases (https://github.com/ossf/scorecard/blob/main/docs/checks.md#signed-releases) check from the OpenSSF Scorecard (https://scorecard.dev/). Merging this should bring this section score from current 0 to 10.
Verification
Image builds cosigning and attestation was verified with the kuadrant-operator image builds (Kuadrant/kuadrant-operator#2073), the successful run of which can be found here, with the images pushed here.
Summary by CodeRabbit