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

Refactor file hierarchy #326

Merged
merged 7 commits into from Apr 10, 2019
Merged

Refactor file hierarchy #326

merged 7 commits into from Apr 10, 2019

Conversation

x4v13r64
Copy link
Collaborator

@x4v13r64 x4v13r64 commented Apr 10, 2019

What this PR changes:

  • Rename Scout.py to scout.py (PEP8)
  • Move content of ScoutSuite/scout.py to ScoutSuite/__main__.py
  • Move main() function from Scout.py to ScoutSuite/__main__.py and rename it as run_from_cli()
  • Update setup.py to execute __main__:run_from_cli

The only thing I'm still a bit unhappy with is the uppercases in the module name (ScoutSuite) as it goes against PEP8 (https://www.python.org/dev/peps/pep-0008/#package-and-module-names), but changing it would be death.

@x4v13r64 x4v13r64 requested a review from zer0x64 April 10, 2019 08:37
@x4v13r64
Copy link
Collaborator Author

@zer0x64 if this looks good to you I'll fix the tests [and merge]

@zer0x64
Copy link
Contributor

zer0x64 commented Apr 10, 2019

Just need to fix the tests, but it looks good! I'll test it today

@x4v13r64
Copy link
Collaborator Author

@zer0x64 fixed 😄

@codecov-io
Copy link

codecov-io commented Apr 10, 2019

Codecov Report

Merging #326 into develop will increase coverage by <.01%.
The diff coverage is 42.85%.

Impacted file tree graph

@@            Coverage Diff             @@
##           develop    #326      +/-   ##
==========================================
+ Coverage    34.29%   34.3%   +<.01%     
==========================================
  Files          179     179              
  Lines         5974    6040      +66     
==========================================
+ Hits          2049    2072      +23     
- Misses        3925    3968      +43
Impacted Files Coverage Δ
ScoutSuite/__main__.py 21.34% <42.85%> (ø)
ScoutSuite/providers/aws/facade/emr.py 38.88% <0%> (-3.97%) ⬇️
...uite/providers/aws/resources/iam/passwordpolicy.py 25% <0%> (-1.32%) ⬇️
ScoutSuite/core/cli_parser.py 13.25% <0%> (+0.09%) ⬆️
ScoutSuite/providers/aws/facade/iam.py 15.73% <0%> (+1.35%) ⬆️
ScoutSuite/providers/aws/resources/vpcs.py 30.43% <0%> (+1.86%) ⬆️
ScoutSuite/output/result_encoder.py 26.16% <0%> (+2.16%) ⬆️
ScoutSuite/providers/aws/resources/ec2/ami.py 35.71% <0%> (+2.38%) ⬆️
ScoutSuite/providers/utils.py 26.82% <0%> (+2.69%) ⬆️
...uite/providers/aws/resources/directconnect/base.py 57.14% <0%> (+7.14%) ⬆️

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 a8373cc...68a9197. Read the comment docs.

Copy link
Contributor

@zer0x64 zer0x64 left a comment

Choose a reason for hiding this comment

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

I just changed the command line tool from Scout to scout, but everything else seems fine and works when I try it!

@x4v13r64
Copy link
Collaborator Author

I just changed the command line tool from Scout to scout,

Great 😄

What do you have to put when running through pip? ScoutSuite, scout?

@zer0x64
Copy link
Contributor

zer0x64 commented Apr 10, 2019

I think it's still ScoutSuite? It would work like this:

pip install ScoutSuite
scout aws -f

@x4v13r64
Copy link
Collaborator Author

I think it's still ScoutSuite? It would work like this:

Yep you're right, I've updated the README 😄

@x4v13r64 x4v13r64 merged commit 47cbe1c into develop Apr 10, 2019
@Aboisier Aboisier deleted the refactor/hierarchy branch April 10, 2019 17:14
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.

None yet

3 participants