Last active
July 29, 2022 18:56
-
-
Save knqyf263/2f1fe2c83bcab353e0271c4dddb87a61 to your computer and use it in GitHub Desktop.
Kyverno Vulnerability Attestation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: kyverno.io/v1 | |
kind: ClusterPolicy | |
metadata: | |
name: check-vulnerabilities | |
spec: | |
validationFailureAction: enforce | |
webhookTimeoutSeconds: 10 | |
failurePolicy: Fail | |
rules: | |
- name: no-critical-vuln | |
match: | |
any: | |
- resources: | |
kinds: | |
- Pod | |
verifyImages: | |
- imageReferences: | |
- "*" | |
attestors: | |
- entries: | |
- keyless: | |
subject: "[email protected]" | |
issuer: "https://github.com/login/oauth" | |
attestations: | |
- predicateType: cosign.sigstore.dev/attestation/vuln/v1 | |
conditions: | |
- all: | |
- key: "{{scanner.uri}}" | |
operator: Equals | |
value: "pkg:github/aquasecurity/trivy@*" | |
- key: "{{scanner.result.Results[].Vulnerabilities[].Severity | (contains(@, 'HIGH') || contains(@, 'CRITICAL'))}}" | |
operator: Equals | |
value: false |
Looks like this capability only in main
currently.
Yes, it will be included in the next release.
https://github.com/aquasecurity/trivy/milestone/8
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://aquasecurity.github.io/trivy/dev/docs/attestation/vuln/
NOTE:
keyless.subject
andkeyless.issuer
should be updated accordingly.