-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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/azure/network #242
Conversation
060bb81
to
a2a7d27
Compare
Codecov Report
@@ Coverage Diff @@
## refactoring/resource-configs #242 +/- ##
===============================================================
+ Coverage 29.69% 30.09% +0.4%
===============================================================
Files 104 110 +6
Lines 5415 5542 +127
===============================================================
+ Hits 1608 1668 +60
- Misses 3807 3874 +67
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## refactoring/resource-configs #242 +/- ##
================================================================
+ Coverage 30.18% 30.34% +0.15%
================================================================
Files 115 118 +3
Lines 5585 5612 +27
================================================================
+ Hits 1686 1703 +17
- Misses 3899 3909 +10
Continue to review full report at Codecov.
|
ScoutSuite/providers/azure/resources/network/network_security_groups.py
Outdated
Show resolved
Hide resolved
ScoutSuite/providers/azure/resources/network/network_security_groups.py
Outdated
Show resolved
Hide resolved
port_ranges.append(port_range) | ||
return port_ranges | ||
|
||
def _format_ports(self, ports): |
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.
I feel like it would be worth writing one or two unit tests for this method, _parse_exposed_ports
and _parse_ports
. It should be pretty quick since they won't require any mocking or setup. It's a bit hard to see what the methods do, having basic unit tests would be a good way of documenting them.
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.
Would you mind if I create an issue to do that and postpone it? I didn't write the _format_ports
myself and this PR is just about moving the current code to the new architecture...
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.
Of course 👍 !
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.
Thanks, done! (#255 )
This PR aims to migrate Azure Network service to the new architecture, as part of #183.