AWS-0102 is triggered for NACL rule **denying** access to/from all ports #7004
majacannavo
started this conversation in
False Detection
Replies: 2 comments
-
Hi @majacannavo ! Thanks for the report. Indeed, for the following Terraform configuration the rule "AVD-AWS-0102" is triggered:
But this is only valid for terraform configuration, since in CF "all" is an invalid value for the protocol. But I'm a little confused by the steps for reproducing it. You say to create a configuration that allows traffic for a specific set of ports and give an example of a deny rule for all ports. Your configuration looks good and the rule shouldn't be triggered. cat main.json
{
"Resources": {
"MyNACL": {
"Type": "AWS::EC2::NetworkAcl",
"Properties": {
"VpcId": "vpc-1122334455aabbccd",
"Tags": [
{
"Key": "Name",
"Value": "NACLforSSHTraffic"
}
]
}
},
"InboundRule": {
"Type": "AWS::EC2::NetworkAclEntry",
"Properties": {
"NetworkAclId": {
"Ref": "MyNACL"
},
"RuleNumber": 100,
"Protocol": -1,
"RuleAction": "deny",
"CidrBlock": "0.0.0.0/0"
}
},
"OutboundRule": {
"Type": "AWS::EC2::NetworkAclEntry",
"Properties": {
"NetworkAclId": {
"Ref": "MyNACL"
},
"RuleNumber": 100,
"Protocol": -1,
"Egress": false,
"RuleAction": "deny",
"CidrBlock": "0.0.0.0/0"
}
}
}
}%
trivy conf main.json
2024-06-25T13:26:23+07:00 INFO Misconfiguration scanning is enabled
2024-06-25T13:26:24+07:00 INFO Detected config files num=1 |
Beta Was this translation helpful? Give feedback.
0 replies
-
Created #7006 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
IDs
AVD-AWS-0102
Description
When a VPC's NACL contains an entry like
that denies access from all ports, it triggers AWS-0102:
Network ACL rule allows access using ALL ports.
Reproduction Steps
Target
Filesystem
Scanner
Misconfiguration
Target OS
No response
Debug Output
Version
Checklist
-f json
that shows data sources and confirmed that the security advisory in data sources was correctBeta Was this translation helpful? Give feedback.
All reactions