Skip to content

Commit 287aa65

Browse files
committed
update example template
Signed-off-by: Sylwester Piskozub <sylwesterpiskozub@gmail.com>
1 parent 0f4d5e1 commit 287aa65

1 file changed

Lines changed: 11 additions & 6 deletions

File tree

app/cli/internal/policydevel/templates/example-policy.rego

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ result := {
1010
"skipped": skipped,
1111
"violations": violations,
1212
"skip_reason": skip_reason,
13+
"ignore": ignore,
1314
}
1415

1516
default skip_reason := ""
@@ -23,17 +24,21 @@ default skipped := true
2324

2425
skipped := false if valid_input
2526

27+
default ignore := false
28+
2629
########################################
2730
# EO Common section, custom code below #
2831
########################################
29-
3032
# Validates if the input is valid and can be understood by this policy
3133
valid_input if {
32-
# insert code here
34+
true
35+
# insert code here
3336
}
3437

3538
# If the input is valid, check for any policy violation here
36-
violations contains msg if {
37-
valid_input
38-
# insert code here
39-
}
39+
default violations := []
40+
#violations contains msg if {
41+
# valid_input
42+
# insert code here
43+
#}
44+

0 commit comments

Comments
 (0)