Skip to content

Commit 499d864

Browse files
committed
feat: Checking policies for bad statements
1 parent ca95394 commit 499d864

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

cis-oci-benchmark/cis_iam_rules.rego

+6-6
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,16 @@ import input as tfplan
77
bad_combo := {"allow group to manage" , "all-resources"}
88

99
bad_pairs := {
10-
"Allow": "manage",
11-
"group": "v3-app-admin-group"
10+
"com-admin": "to read all-resources",
11+
# "groups": "to manage groups in tenancy"
1212
}
1313

1414
bad_combination_policies contains bad_policy.address if {
1515
bad_policy := tfplan.resource_changes[_]
1616
bad_policy.type == "oci_identity_policy"
1717
statements := bad_policy.change.after.statements
18-
some statement in statements
19-
some key, value in bad_pairs
20-
contains(statement, key)
21-
contains(statement, value)
18+
some statement in statements
19+
some key, value in bad_pairs
20+
contains(statement, value)
21+
# contains(statement, value)
2222
}

0 commit comments

Comments
 (0)