Skip to content

Commit cce33c8

Browse files
chore: translate Spanish comments to English in query.rego
1 parent c700e5b commit cce33c8

1 file changed

Lines changed: 42 additions & 42 deletions

File tree

  • assets/queries/terraform/oci/oci_idp_change_event_rule_missing
Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,44 @@
1-
package Cx
2-
3-
expected_event := "com.oraclecloud.identitycontrolplane.updateidentityprovider"
4-
5-
# REGLA 1: Missing (Global)
6-
# No existe NINGUNA regla en el proyecto que monitoree el evento de Identity Provider.
7-
CxPolicy[result] {
8-
doc := input.document[i]
9-
_ := doc.provider.oci
10-
11-
any_idp_rule := [rule |
12-
rule := input.document[_].resource.oci_events_rule[_]
13-
contains(rule.condition, expected_event)
14-
]
15-
16-
count(any_idp_rule) == 0
17-
18-
result := {
19-
"documentId": doc.id,
1+
package Cx
2+
3+
expected_event := "com.oraclecloud.identitycontrolplane.updateidentityprovider"
4+
5+
# RULE 1: Missing (Global)
6+
# No rule exists in the project monitoring el evento de Identity Provider.
7+
CxPolicy[result] {
8+
doc := input.document[i]
9+
_ := doc.provider.oci
10+
11+
any_idp_rule := [rule |
12+
rule := input.document[_].resource.oci_events_rule[_]
13+
contains(rule.condition, expected_event)
14+
]
15+
16+
count(any_idp_rule) == 0
17+
18+
result := {
19+
"documentId": doc.id,
2020
"searchKey": "provider.oci",
21-
"searchLine": common_lib.build_search_line(["provider", "oci"], []),
22-
"issueType": "MissingAttribute",
23-
"keyExpectedValue": "An 'oci_events_rule' for Identity Provider changes should exist",
24-
"keyActualValue": "No 'oci_events_rule' found for Identity Provider changes",
25-
}
26-
}
27-
28-
# REGLA 2: Disabled (Local)
29-
# La regla existe y monitorea IdP, pero está deshabilitada.
30-
CxPolicy[result] {
31-
rule := input.document[i].resource.oci_events_rule[name]
32-
33-
contains(rule.condition, expected_event)
34-
35-
rule.is_enabled == false
36-
37-
result := {
38-
"documentId": input.document[i].id,
39-
"searchKey": sprintf("resource.oci_events_rule.%s.is_enabled", [name]),
40-
"issueType": "IncorrectValue",
41-
"keyExpectedValue": "'is_enabled' should be true",
42-
"keyActualValue": "'is_enabled' is false",
43-
}
21+
"searchLine": common_lib.build_search_line(["provider", "oci"], []),
22+
"issueType": "MissingAttribute",
23+
"keyExpectedValue": "An 'oci_events_rule' for Identity Provider changes should exist",
24+
"keyActualValue": "No 'oci_events_rule' found for Identity Provider changes",
25+
}
26+
}
27+
28+
# RULE 2: Disabled (Local)
29+
# The rule Exists y monitorea IdP, but is disabled.
30+
CxPolicy[result] {
31+
rule := input.document[i].resource.oci_events_rule[name]
32+
33+
contains(rule.condition, expected_event)
34+
35+
rule.is_enabled == false
36+
37+
result := {
38+
"documentId": input.document[i].id,
39+
"searchKey": sprintf("resource.oci_events_rule.%s.is_enabled", [name]),
40+
"issueType": "IncorrectValue",
41+
"keyExpectedValue": "'is_enabled' should be true",
42+
"keyActualValue": "'is_enabled' is false",
43+
}
4444
}

0 commit comments

Comments
 (0)