Skip to content
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

fix(ec2_securitygroup_default_restrict_traffic): fix check only allow empty rules #2777

Merged
merged 4 commits into from
Aug 25, 2023

Conversation

n4ch04
Copy link
Contributor

@n4ch04 n4ch04 commented Aug 25, 2023

Context

Check ec2_securitygroup_default_restrict_traffic was not checking if the sg was not denying all the traffic but if it was open to internet

Fixes: #2761

Description

Change logic of the check to test if the sg has egress and ingress rules

License

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@n4ch04 n4ch04 requested a review from a team August 25, 2023 10:08
Copy link
Member

@jfagoagas jfagoagas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome!

Thanks @jmanduca-psfy for reporting this!

@codecov
Copy link

codecov bot commented Aug 25, 2023

Codecov Report

Merging #2777 (9805a25) into master (b17cc56) will decrease coverage by 0.02%.
Report is 9 commits behind head on master.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #2777      +/-   ##
==========================================
- Coverage   86.23%   86.21%   -0.02%     
==========================================
  Files         536      537       +1     
  Lines       17261    17263       +2     
==========================================
- Hits        14885    14884       -1     
- Misses       2376     2379       +3     
Files Changed Coverage Δ
...ffic/ec2_securitygroup_default_restrict_traffic.py 100.00% <100.00%> (ø)

... and 5 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@jfagoagas jfagoagas merged commit 276f6f9 into master Aug 25, 2023
@jfagoagas jfagoagas deleted the ec2_securitygroup_default_restrict_traffic_reformat branch August 25, 2023 10:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: ec2_securitygroup_default_restrict_traffic Title does not match check logic
2 participants