-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: image verification policy CRD #70
base: main
Are you sure you want to change the base?
Conversation
) object map[string]interface{} | ||
``` | ||
|
||
### ParseImageReference |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you provide examples of its usage?
#### VerifyImageSignatures | ||
```go | ||
verifyImageSignatures( | ||
image string, # must be a valid image, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can this be a list?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think if the user wants to use a list, they can do it using CEL's map function
```yaml | ||
verifications: | ||
- expression: >- | ||
verifyImageSignatures(images.initContainers[0], attestors.kms) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typically users will want to verify all images in a pod are signed with an attestor and may want to exclude a certain references e.g. docker.io/istio*
.
How would they do that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
they can run the map
CEL function on images.all
, and define docker.io/istio*
in the matchRules
. The policy skips all the images that do not match the matchImages
block.
All the images in the images.all
array, that do not match the glob docker.io/istio*
will be skipped
- expression: >- | ||
payload(images.initContainers[0], attestations.sbom).builderId == "foo" | ||
&& | ||
payload(images.initContainers[0], attestations.slsa).version == "0.2" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you provide a more detailed example? Something similar to:
https://github.com/kyverno/demos/blob/main/image_verification/check_attestations.yaml
Signed-off-by: Vishal Choudhary <[email protected]>
This document proposes the new design for image verification policies.