Closed jonkerw85 closed 2 years ago
@wjonkerhulst thanks for using steampipe, appreciate raising this. Taking a look to take action. Happy to see in case you want to purpose an update as well.
@rajlearner17 After looking at the source (https://github.com/turbot/steampipe-mod-aws-compliance/blob/main/query/vpc/vpc_network_acl_remote_administration.sql) I can conclude two things. 1) Both UDP and TCP are checked in the query. I had only TCP in the ruleset. I have now added UDP. 2) For SQL it is not possible to determine the ACL rule order. I think because of this it does not allow the '0.0.0.0/0 allow' rule.
Updated ACL to include UDP
@wjonkerhulst thanks for the input, rightly mentioned #1
both TCP and UDP checked right now, here I guess we can stick to TCP as tightly for CIS, as it only indicates ports 22 & 3389. If you can raise PR we will be able to make it to the mod. Else we will make a change in the next release.
On #2
as you mentioned rightly, finding the Rule number
order with ports 22 & 3389 if denied in earlier precedence, then allow All traffic - All protocol - All Port with source 0.0.0.0/0
will be a bit complex. We can make an attempt using views, but it may have some edge cases fall out of that. Let us know in case you made any attempt to proceed, else I will share my query here for your reference once ready.
@rajlearner17
@wjonkerhulst sorry for catching up late on this. Could not experiment with this to help on 2nd one. Let me know if you found your own way or expecting an alternative on it. This will help to invest some dedicated time on it.
Will recheck based on need. Thanks!!
Describe the bug 1) Run steampipe check aws_compliance.benchmark.cis_v140 2) Results in acl-0efe4b9c1c44a2b59 contains 1 rule(s) allowing ingress to port 22 or 3389 from 0.0.0.0/0 or ::/0. 3) See attachment for screenshot ACL. This ACL blocks port 22 and 3889 for ipv4 and ipv6 network
Steampipe version (
steampipe -v
) Example: v0.7.3Plugin version (
steampipe plugin list
) hub.steampipe.io/plugins/turbot/aws@latest 0.31.0 | hub.steampipe.io/plugins/turbot/steampipe@latest 0.1.3To reproduce 1) Create ACL as shown in the screenshot 2) Run steampipe check aws_compliance.benchmark.cis_v140
Expected behavior This ACL should pass the rule 'Ensure no Network ACLs allow ingress from 0.0.0.0/0 to remote server administration ports'
Additional context