You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
result := deny_dynamodb_unencrypted with input as {"resource": {"aws_dynamodb_table": {"unencrypted": [{"server_side_encryption": false}]}}}
7
+
count(result) == 1
8
+
}
9
+
10
+
test_dynamodb_encrypted_allowed if {
11
+
result := deny_dynamodb_unencrypted with input as {"resource": {"aws_dynamodb_table": {"encrypted": [{"server_side_encryption": true}]}}}
12
+
count(result) == 0
13
+
}
14
+
15
+
test_dynamodb_pitr_disabled_denied if {
16
+
result := deny_dynamodb_pitr_disabled with input as {"resource": {"aws_dynamodb_table": {"no_pitr": [{"point_in_time_recovery": false}]}}}
17
+
count(result) == 1
18
+
}
19
+
20
+
test_dynamodb_pitr_enabled_allowed if {
21
+
result := deny_dynamodb_pitr_disabled with input as {"resource": {"aws_dynamodb_table": {"with_pitr": [{"point_in_time_recovery": true}]}}}
22
+
count(result) == 0
23
+
}
24
+
25
+
test_dynamodb_replica_missing_warning if {
26
+
result := deny_dynamodb_replica_missing with input as {"resource": {"aws_dynamodb_table": {"single_region": [{"billing_mode": "PAY_PER_REQUEST"}]}}}
27
+
count(result) == 1
28
+
}
29
+
30
+
test_dynamodb_with_replica_allowed if {
31
+
result := deny_dynamodb_replica_missing with input as {"resource": {"aws_dynamodb_table": {"multi_region": [{"billing_mode": "PAY_PER_REQUEST", "replica": [{"region_name": "us-east-1"}]}]}}}
32
+
count(result) == 0
33
+
}
34
+
35
+
test_dynamodb_provisioned_without_replica_allowed if {
36
+
result := deny_dynamodb_replica_missing with input as {"resource": {"aws_dynamodb_table": {"provisioned": [{"billing_mode": "PROVISIONED"}]}}}
result := deny_s3_public_access with input as {"resource": {"aws_s3_bucket": {"public": [{"acl": "public-read"}]}}}
7
+
count(result) == 1
8
+
}
9
+
10
+
test_s3_bucket_private_acl_allowed if {
11
+
result := deny_s3_public_access with input as {"resource": {"aws_s3_bucket": {"private": [{"acl": "private"}]}}}
12
+
count(result) == 0
13
+
}
14
+
15
+
test_s3_bucket_log_delivery_acl_allowed if {
16
+
result := deny_s3_public_access with input as {"resource": {"aws_s3_bucket": {"logs": [{"acl": "log_delivery_write"}]}}}
17
+
count(result) == 0
18
+
}
19
+
20
+
test_s3_public_access_block_disabled_denied if {
21
+
result := deny_s3_public_access_block_disabled with input as {"resource": {"aws_s3_bucket_public_access_block": {"bad": [{"block_public_acls": false}]}}}
22
+
count(result) == 1
23
+
}
24
+
25
+
test_s3_public_access_block_enabled_allowed if {
26
+
result := deny_s3_public_access_block_disabled with input as {"resource": {"aws_s3_bucket_public_access_block": {"good": [{"block_public_acls": true, "block_public_policy": true, "ignore_public_acls": true, "restrict_public_buckets": true}]}}}
27
+
count(result) == 0
28
+
}
29
+
30
+
test_s3_public_access_block_partial_allowed if {
31
+
result := deny_s3_public_access_block_disabled with input as {"resource": {"aws_s3_bucket_public_access_block": {"partial": [{"block_public_acls": true, "block_public_policy": false}]}}}
result := deny_insecure_security_group_ingress with input as {"resource": {"aws_security_group": {"bad": [{"ingress": [{"cidr_blocks": ["0.0.0.0/0"]}]}]}}}
7
+
count(result) == 1
8
+
}
9
+
10
+
test_sg_ingress_specific_ip_allowed if {
11
+
result := deny_insecure_security_group_ingress with input as {"resource": {"aws_security_group": {"good": [{"ingress": [{"cidr_blocks": ["10.0.0.0/8"]}]}]}}}
12
+
count(result) == 0
13
+
}
14
+
15
+
test_sg_ingress_ipv6_all_denied if {
16
+
result := deny_insecure_security_group_ingress with input as {"resource": {"aws_security_group": {"bad_ipv6": [{"ingress": [{"ipv6_cidr_blocks": ["::/0"]}]}]}}}
17
+
count(result) == 1
18
+
}
19
+
20
+
test_sg_egress_0_0_0_0_denied if {
21
+
result := deny_insecure_security_group_egress with input as {"resource": {"aws_security_group": {"bad": [{"egress": [{"cidr_blocks": ["0.0.0.0/0"]}]}]}}}
22
+
count(result) == 1
23
+
}
24
+
25
+
test_sg_egress_specific_ip_allowed if {
26
+
result := deny_insecure_security_group_egress with input as {"resource": {"aws_security_group": {"good": [{"egress": [{"cidr_blocks": ["10.0.0.0/8"]}]}]}}}
27
+
count(result) == 0
28
+
}
29
+
30
+
test_sg_without_description_denied if {
31
+
result := deny_security_group_without_description with input as {"resource": {"aws_security_group": {"no_desc": [{}]}}}
32
+
count(result) == 1
33
+
}
34
+
35
+
test_sg_with_description_allowed if {
36
+
result := deny_security_group_without_description with input as {"resource": {"aws_security_group": {"with_desc": [{"description": "Security group"}]}}}
37
+
count(result) == 0
38
+
}
39
+
40
+
test_sg_rule_without_description_denied if {
41
+
result := deny_security_group_rule_without_description with input as {"resource": {"aws_security_group": {"bad": [{"ingress": [{"description": ""}]}]}}}
42
+
count(result) == 1
43
+
}
44
+
45
+
test_sg_rule_with_description_allowed if {
46
+
result := deny_security_group_rule_without_description with input as {"resource": {"aws_security_group": {"good": [{"ingress": [{"description": "Allow HTTP"}]}]}}}
0 commit comments