Add new flag to support skipping image signature checks#3122
Add new flag to support skipping image signature checks#3122simonbaird merged 3 commits intoconforma:mainfrom
Conversation
Review Summary by QodoAdd flag to skip image signature validation checks
WalkthroughsDescription• Add --skip-image-sig-check flag to skip image signature validation • Implement conditional image signature check based on flag setting • Add comprehensive unit and acceptance tests for new functionality • Update policy structures to support skip image signature option Diagramflowchart LR
CLI["CLI Flag<br/>--skip-image-sig-check"]
CMD["Command Handler<br/>cmd/validate/image.go"]
POLICY["Policy Options<br/>SkipImageSigCheck"]
VALIDATE["ValidateImage<br/>internal/image/validate.go"]
RESULT["Conditional<br/>Image Sig Check"]
CLI -->|"Sets flag"| CMD
CMD -->|"Passes to Options"| POLICY
POLICY -->|"Reads from SigstoreOpts"| VALIDATE
VALIDATE -->|"Skips if enabled"| RESULT
File Changes1. cmd/validate/image.go
|
Code Review by Qodo
1. SigstoreOpts() error ignored
|
7c8bfbe to
e8a8e10
Compare
e8a8e10 to
48959b1
Compare
Codecov Report✅ All modified and coverable lines are covered by tests.
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Not related to, but done in the PR for... Ref: https://issues.redhat.com/browse/EC-1647
48959b1 to
b17215c
Compare
This adds a --skip-image-sig-check flag to ec validate image. It defaults to false currently so we're not changing the default behavior. Motivation: It's been suggested that the image signing that Tekton Chains does is low value, since it will sign whatever image ref is found in a task or pipeline result. See tektoncd/chains#1346 which suggests it should stop doing it. (Attestation signing remains crucial though since Chains is the thing creating those.) Additionally, we need to support verifying "keyless" signatures in our Tekton task, which IIUC will require providing different oidc identities for each component image, since in Konflux the service account is different for different components, and a different identity to verify the attestation signature. Conforma doesn't support this currently. We could implement support for providing multiple oidc identities, but being able to skip the image signature check means we can more quickly support verifying keylessly signed attestations. Ref: https://issues.redhat.com/browse/EC-1647 Co-authored-by: Claude Code <noreply@anthropic.com>
Covers scenarios where the image sig is valid, and also when it is invalid. Ref: https://issues.redhat.com/browse/EC-1647
b17215c to
4ec25dd
Compare
|
New revision to reverse bool check nitpick. No change otherwise. |
|
The previous review is not considered current. I'll merge if someone gives a fresh approve. |
See commit messages for more explanation.
Ref: https://issues.redhat.com/browse/EC-1647