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 configuration #283

Merged
merged 5 commits into from
Dec 29, 2019
Merged

Refactor configuration #283

merged 5 commits into from
Dec 29, 2019

Conversation

iyehuda
Copy link
Contributor

@iyehuda iyehuda commented Dec 3, 2019

Description

Moved configuration into a separate package and break dependencies of __main__ module.
This way we can run external tools on kube-hunter (e.g., pytest, profiling, etc.).
runtest.py may now be deprecated and removed.

Contribution Guidelines

Please Read through the Contribution Guidelines.

Fixed Issues

Fixes #234

Contribution checklist

  • I have read the Contributing Guidelines.
  • The commits refer to an active issue in the repository.

Notes

This PR was initiated by @RaitoBezarius, thank you for your work!

RaitoBezarius and others added 2 commits December 4, 2019 01:26
Making conf module standalone enables using it without previous
initialization (e.g, from main script).
This way, we can run `pytest` directly without conf init via
`runtest.py`, which now can be deprecated.

Resolves #234
@iyehuda iyehuda added the awesome Pull request that makes life better label Dec 3, 2019
@iyehuda iyehuda added this to the v0.2.1 milestone Dec 3, 2019
@iyehuda iyehuda requested a review from itaysk December 3, 2019 23:43
@codecov-io
Copy link

codecov-io commented Dec 3, 2019

Codecov Report

Merging #283 into master will increase coverage by 0.8%.
The diff coverage is 81.93%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master     #283     +/-   ##
=========================================
+ Coverage   58.07%   58.87%   +0.8%     
=========================================
  Files          38       39      +1     
  Lines        1994     2011     +17     
=========================================
+ Hits         1158     1184     +26     
+ Misses        836      827      -9
Impacted Files Coverage Δ
kube_hunter/core/__init__.py 100% <ø> (ø)
kube_hunter/core/events/__init__.py 100% <ø> (ø)
kube_hunter/modules/hunting/__init__.py 100% <ø> (ø)
kube_hunter/core/events/types/__init__.py 100% <ø> (ø)
kube_hunter/modules/report/__init__.py 100% <ø> (ø)
kube_hunter/modules/__init__.py 100% <ø> (ø)
kube_hunter/__init__.py 100% <ø> (ø)
kube_hunter/core/types.py 81.39% <ø> (ø)
kube_hunter/modules/discovery/__init__.py 100% <ø> (ø)
kube_hunter/modules/discovery/ports.py 75% <100%> (ø)
... and 37 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 fd4d79a...fa5375d. Read the comment docs.

@iyehuda iyehuda requested a review from lizrice December 14, 2019 16:58
The `install_imports.py` script was made to find 3rd party libs
dynamically and pip install them.
Now that we have well declared requirements*.txt files, we dont need
this script.
The previous src root package name was too generic and not unique,
so it can be used as external name.
Change `src` to `kube_hunter` so it can be referenced in a clear way.
Addtional changes made on the way:
* Make imports absolute
* Formatting

Relates to #185
runtest.py Show resolved Hide resolved
kube-hunter.py Outdated Show resolved Hide resolved
@itaysk itaysk mentioned this pull request Dec 16, 2019
2 tasks
@itaysk itaysk mentioned this pull request Dec 29, 2019
3 tasks
@itaysk itaysk requested review from knqyf263 and removed request for lizrice December 29, 2019 12:13
@itaysk itaysk merged commit fe3dba9 into master Dec 29, 2019
invidian added a commit to kinvolk/kube-hunter that referenced this pull request Jan 21, 2020
@iyehuda iyehuda mentioned this pull request Feb 16, 2020
@iyehuda iyehuda deleted the raito/quality_improvements branch February 17, 2020 23:01
py-go pushed a commit to py-go/kube-hunter that referenced this pull request Aug 29, 2021
Signed-off-by: Daniel Pacak <pacak.daniel@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awesome Pull request that makes life better
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Profiling is impossible on the script
5 participants