File tree Expand file tree Collapse file tree 5 files changed +11
-11
lines changed
Expand file tree Collapse file tree 5 files changed +11
-11
lines changed Original file line number Diff line number Diff line change 5757 msg := "missing commit in attestation material"
5858 }
5959
60- has_commit {
60+ has_commit if {
6161 some sub in input.subject
6262 sub.name == "git.head"
6363 sub.digest.sha1
Original file line number Diff line number Diff line change 6161 msg:= "Container image is not approved"
6262 }
6363
64- is_approved {
64+ is_approved if {
65+ input.predicate.annotations.approval == "true"
6566 some material in input.predicate.materials
6667 material.annotations["chainloop.material.type"] == "CONTAINER_IMAGE"
67-
68- input.predicate.annotations.approval == "true"
6968 }
Original file line number Diff line number Diff line change @@ -30,12 +30,13 @@ skipped := false if valid_input
3030# #######################################
3131
3232# Validates if the input is valid and can be understood by this policy (3)
33- valid_input if {
34- # insert code here
35- }
33+ valid_input := true
34+
35+ # insert code here
3636
3737# If the input is valid, check for any policy violation here (4)
3838violations contains msg if {
39- valid_input
40- # insert code here
39+ valid_input
4140}
41+
42+ # insert code here
Original file line number Diff line number Diff line change 5858 msg := "There are errors in the SARIF report"
5959 }
6060
61- has_errors {
61+ has_errors if {
6262 some run in input.runs
6363 some result in run.results
6464 result.level == "error"
Original file line number Diff line number Diff line change 5959 msg := "CVE report has vulnerabilities with severity MEDIUM or HIGH"
6060 }
6161
62- has_vulnerabilities {
62+ has_vulnerabilities if {
6363 severities := ["HIGH", "MEDIUM"]
6464 some result in input.Results
6565 some vuln in result.Vulnerabilities
You can’t perform that action at this time.
0 commit comments