-
Notifications
You must be signed in to change notification settings - Fork 16
/
test.rego
23 lines (19 loc) · 908 Bytes
/
test.rego
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package compliance.cis_aws.rules.cis_4_11
import data.cis_aws.test_data
import data.compliance.cis_aws.data_adapter
import data.lib.test
test_pass {
eval_pass with input as rule_input([{
"TrailInfo": {
"Trail": {"IsMultiRegionTrail": true},
"Status": {"IsLogging": true},
"EventSelectors": [{"IncludeManagementEvents": true, "ReadWriteType": "All"}],
},
"MetricFilters": [{"FilterName": "filter_1", "FilterPattern": "{ ($.eventName = CreateNetworkAcl) || ($.eventName = CreateNetworkAclEntry) || ($.eventName = DeleteNetworkAcl) || ($.eventName = DeleteNetworkAclEntry) || ($.eventName = ReplaceNetworkAclEntry) || ($.eventName = ReplaceNetworkAclAssociation) }"}],
"MetricTopicBinding": {"filter_1": ["arn:aws:...sns"]},
}])
}
rule_input(entry) = test_data.generate_monitoring_resources(entry)
eval_pass {
test.assert_pass(finding) with data.benchmark_data_adapter as data_adapter
}