-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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(aws): handle none type attributes #5216
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #5216 +/- ##
==========================================
- Coverage 89.11% 89.10% -0.01%
==========================================
Files 986 989 +3
Lines 30290 30400 +110
==========================================
+ Hits 26992 27087 +95
- Misses 3298 3313 +15 ☔ View full report in Codecov by Sentry. |
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.
Could you please add tests for the following lines:
- 74
- 82 to 85
- 88 to 90
If we are changing the logic of the check we should cover those scenarios.
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.
@jfagoagas the logic of the check was not changed, only the following line was added:
if org.policies is not None: # Access denied to list policies
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.
Yes but even with that I think those lines are not being tested, you should add a test to verify when org.policies is None
, don't you?
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.
Yes, test was added!
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.
Great one, thanks @sergargar 🚀
Description
Handle
None
type attributes in checks:organizations_scp_check_deny_regions
ecr_repositories_not_publicly_accessible
Also, fix typo in work
accessible
.Checklist
License
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.