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

Refactoring/aws/elbv2 #259

Merged
merged 11 commits into from
Mar 18, 2019
Merged

Conversation

misg
Copy link
Contributor

@misg misg commented Mar 17, 2019

This PR aims to migrate AWS ELBv2 service to the new architecture, as part of #183.
Please note that I removed the ssl_policies resources (defined in the metadata.json file) since they weren't used anywhere.

@misg misg requested review from Aboisier, vifor2, x4v13r64 and Remi05 March 17, 2019 03:06
@misg misg self-assigned this Mar 17, 2019
@codecov-io
Copy link

codecov-io commented Mar 17, 2019

Codecov Report

Merging #259 into refactoring/resource-configs will increase coverage by 0.18%.
The diff coverage is 41.66%.

Impacted file tree graph

@@                       Coverage Diff                       @@
##           refactoring/resource-configs    #259      +/-   ##
===============================================================
+ Coverage                         30.72%   30.9%   +0.18%     
===============================================================
  Files                               126     130       +4     
  Lines                              5601    5633      +32     
===============================================================
+ Hits                               1721    1741      +20     
- Misses                             3880    3892      +12
Impacted Files Coverage Δ
ScoutSuite/providers/aws/provider.py 9.76% <0%> (-0.41%) ⬇️
ScoutSuite/providers/aws/facade/facade.py 35.71% <33.33%> (-0.14%) ⬇️
...te/providers/aws/resources/elbv2/load_balancers.py 33.33% <33.33%> (ø)
...utSuite/providers/aws/resources/elbv2/listeners.py 33.33% <33.33%> (ø)
ScoutSuite/providers/aws/configs/services.py 49.18% <50%> (ø) ⬆️
ScoutSuite/providers/aws/facade/elbv2.py 52.17% <52.17%> (ø)
ScoutSuite/providers/aws/resources/elbv2/vpcs.py 83.33% <83.33%> (ø)
...coutSuite/providers/aws/resources/elbv2/service.py 83.33% <83.33%> (ø)
... and 3 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 152a01b...a2044e6. Read the comment docs.

@misg misg added this to the Iteration #4 milestone Mar 17, 2019
@misg misg removed the request for review from Remi05 March 17, 2019 03:07
@Aboisier Aboisier mentioned this pull request Mar 17, 2019
53 tasks
Copy link
Contributor

@vifor2 vifor2 left a comment

Choose a reason for hiding this comment

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

I apologize for the troubles this has caused you, stay strong! 💪

@@ -112,6 +111,18 @@ def _add_security_group_name_to_ec2_grants(self):
{'AWSAccountId': self.aws_account_id})

def _add_security_group_data_to_elbv2(self):
def check_security_group_rules(lb, index, traffic_type):
Copy link
Contributor

Choose a reason for hiding this comment

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

Wait what

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm so confused what is this

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's just a function that Vincent defined for his findings related to ELBv2, is only used by _add_security_group_data_to_elbv2 and was in aws/services/elbv2.py. So it wasn't really make sense to move it in aws/resources/elbv2/ directory, moving it to _add_security_group_data_to_elbv2 as a nested function where it is used makes more sense imho (at least now, waiting for a refactoring of all the post-processing logic).

Copy link
Contributor

@Aboisier Aboisier left a comment

Choose a reason for hiding this comment

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

I'm confused by the nested method though. But great work 💯

@misg misg merged commit bf974eb into refactoring/resource-configs Mar 18, 2019
@misg misg deleted the refactoring/aws/elbv2 branch March 18, 2019 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants