-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#409 from cfn_nag issues, add support for relationship between NACLs and egress and ingress entries. #74
Conversation
…and egress and ingress entries.
def ingress_network_acl_entries(cfn_model) | ||
network_acl_entries = cfn_model.resources_by_type 'AWS::EC2::NetworkAclEntry' | ||
network_acl_entries.select do |network_acl_entry| | ||
network_acl_entry.egress.nil? || !network_acl_entry.egress |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
beware of "weak typing" in cfn. this could be "true", true, "false", false. there should be a truthy? util in the model you can use instead of a straight boolean op
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There isn't currently a truthy? util in cfn_model, just cfn_nag, but I can add one to model as part of this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just fix the truthiness and should be good to go
…w SAM transforms templates (stelligent#64) * stelligent/cfn_nag#74 Reworking Serverless transform to more closely match how SAM transforms templates. 1. Generating an IAM role for each serverless function, if Role property not provided. 2. Parsing serverless function properties to correctly populate generated role. 3. Updating spec tests. * Updating array syntax to use ruby's %w[].
In reference to stelligent/cfn_nag#409.
This adds a relationship to be parsed between EC2 Network ACLs and Network ACL Entries separated by egress and ingress. This is primarily because the items we are checking for in this issue affect ingress and egress separately, including repeating rule numbers and reusing ports.
Planned to be used in conjunction with: https://github.com/stelligent/cfn_nag/tree/feature/409_ineffective_nacl_rules
This also adds the truthy util to cfn-model, as previously used in cfn-nag.