611 Commits

Author SHA1 Message Date
Yehuda Chikvashvili
11efbb7514 Fix Dockerfile build (#303)
* Fix Dockerfile build

The Docker build used a 2-step installation of requirements
and application.
This was broken by #272.

Fixes #300

* Add dependencies cache for docker build

Caching installation requirements saves time when building
v0.3.0
2020-02-27 14:37:25 +02:00
mormamn
ac5dd40b74 Urllib3 upgrade (#314)
* Upgrade urllib3
resolves #307
2020-02-27 00:17:08 +02:00
mormamn
bf646f5e0c Fix broken reporting (#313)
Added instance creation of reporters and dispatcher objects
Fixes #312
2020-02-26 22:40:16 +02:00
mormamn
a8128b7ea0 Cleanup conf refactor (#310)
Reorganize config files, and argparse.
Resolves #289
Resolves #292
2020-02-25 12:29:18 +02:00
Yehuda Chikvashvili
e75c0ff37b Add PyInstaller build (#302)
* Add PyInstaller build

Use PyInstaller to generate single binary.
Use staticx to generate a single static binary.

Resolves #301

* Add test Makefile target

Add test to Makefile.
Add requests_mock to dev dependencies.
2020-02-18 17:31:10 +02:00
Liz Rice
fe187bc50a Correct KB link (#299) v0.3.0-rc1 2020-02-14 17:44:58 +00:00
Yehuda Chikvashvili
77227799a4 Add Makefile (#298)
Added Makefile with some helpful utils such as build, lint and clean
2020-02-12 17:32:28 +02:00
Vipul Gupta
df12d75d6d Packaging Kube-Hunter for PyPi (#272)
* Inital Commit

Signed-off-by: Vipul Gupta (@vipulgupta2048) <vipulgupta2048@gmail.com>

* Suggestions implemented as suggested

Signed-off-by: Vipul Gupta (@vipulgupta2048) <vipulgupta2048@gmail.com>

* Package with setuptools

Use setuptools to package kube-hunter as redistributable file.
Once packages, it can be pushed to PyPi.
The package version is taken from git tags (using setuptools_scm).

Closes #185

* Ignore __main__.py script in code coverage

The entrypoint script should not be tested but rather be calling
to tested modules.
Ideally, __main__ should only make a call to single function from
another tested module.

* Update requirements files

Use install_requires from setup.cfg file as single source of truth
for dependencies.
Install regular dependencies when installing dev dependencies.

* Symlink kube-hunter.py to entry point

Support the old way to run kube-hunter via the main script by making
a link to the new kube_hunter/__main__.py script.

Co-authored-by: Yehuda Chikvashvili <yehudaac1@gmail.com>
2020-02-10 21:35:31 +02:00
Yehuda Chikvashvili
a4a8c71653 Fix empty report (#281)
* Fix empty report when active hunting

Running kube-hunter active hunting with plain report
did not show any report.
This commit changes Vulnerability.vid default value
to "None" (previously None)

Closes #280

* Improve debug and exception messages

Debugging hunters execution is hard due to lack of debug
information. No indication is made when a hunter starts.
Exceptions where printed without stack trace, which made
it difficult to follow.
2020-01-09 19:04:33 +02:00
Yehuda Chikvashvili
fe3dba90d8 Refactor configuration (#283)
* Remove __main__ references and create a top-level config module

* Move conf module into separate standalone package

* Deprecate install_imports.py script

* Rename root package to kube_hunter

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

* remove todos

Co-authored-by: Ryan Lahfa <masterancpp@gmail.com>
Co-authored-by: Itay Shakury <itay@itaysk.com>
2019-12-29 14:18:58 +02:00
Oleg Butuzov
fd4d79a853 adding codecoverage (#198) 2019-11-30 08:45:33 +00:00
Liz Rice
3326171c7a docs: clarify that job.yaml is an example (#279) 2019-11-27 18:42:35 +02:00
Liz Rice
4c82b68f48 Merges #225 (#278)
* Fix typos

* Fix review comments
2019-11-26 21:11:33 +02:00
Yehuda Chikvashvili
1d7bdd6131 Consider patched versions as not vulnerable by default (#220)
* Consider patched versions as not vulnerable by default

Change `--ignore-downstream` to `--ignore-patched-versions` and
invert it's effect.
From now on, kube-hunter will not alert patched components as default
behavior.

Resolves #194

* Rename flag --ignore-patched-versions to --include-patched-versions
v0.2.0
2019-11-26 20:28:30 +02:00
Itay Shakury
14c49922da mention KB in the readme (#276)
Co-Authored-By: Liz Rice <liz@lizrice.com>
2019-11-15 21:54:14 +02:00
Greg Jacobs
1c443eb6e4 Fixes for typos and readability in Readme.md and KB (#248) 2019-11-12 14:08:47 +02:00
Itay Shakury
12f5b75733 Refactor reporters and add KB URL to reports (#275)
* refactor reporters and add kburl

* rename json reporter file to align with other reporters
2019-11-10 15:21:36 +02:00
s-nirali
7b77945ebd Fix some linting issues (#267) 2019-11-08 13:07:37 +02:00
Ryan Lahfa
a266c9068f Locking: Use a RAII/Defensive style to prevent issues when exceptions are thrown (#269) 2019-11-07 19:10:37 +02:00
Anuj Singh
67af48fa9a Create a sitemap (#258) 2019-11-05 21:48:05 +02:00
Yehuda Chikvashvili
efd23433ff Support macOS (#273)
Upgrade scapy to version 2.4.3 and above.
This commit fixes IndexError that was raised when running
kube-hunter from macOS.

Resolves #262
2019-11-05 12:53:44 +02:00
Itay Shakury
8cc90db8f5 add kb index (#252) 2019-10-30 20:38:16 +02:00
Itay Shakury
0157ac83ce add .venv to gitignore (#256) 2019-10-28 23:40:16 +02:00
Rohith
031c4b9707 reponding to bug request https://github.com/aquasecurity/kube-hunter/issues/246 (#249)
/usr/bin/env python generally is defaulted to the version set by the linux flavour. On some distros it's python 2 and 3 on others, changing it to python3 might work
2019-10-26 19:05:13 +03:00
Raj Chowdhury
25333b201f Typo fix (#247)
Fixed Minor typos in README
2019-10-25 11:54:27 -07:00
Nithin-183
bde288ceb3 Update README.md (#237) 2019-10-25 11:42:10 -07:00
Arpit Pandey
f61f624d29 Fix typos in code comments (#227) 2019-10-23 19:10:01 +03:00
Ryan Lahfa
d424fcd7c8 Use set rather than list to test membership in O(1) (#231) 2019-10-23 18:34:19 +03:00
Itay Shakury
04fc39c810 build article titles from metadata (#238)
* rename id to vid to avoid conflict with jekyll's id

* build article title from metadata
2019-10-23 18:22:37 +03:00
Ramshah Jahangir
59543346d2 updating pul request template (#242)
* updating pul request template

* fixing typos
2019-10-23 18:12:43 +03:00
Itay Shakury
6b4f13e84a update ruby gems used for the kb website (#236) 2019-10-23 14:03:00 +03:00
michizhou
d8037434a0 Improved documentation (#201) 2019-10-23 11:16:49 +01:00
suijaa
a8428a9445 typo fix in KHV050.md 2019-10-22 09:03:07 +03:00
Sidhya Tikku
6969f02e9b Create PULL_REQUEST_TEMPLATE.md (#222) 2019-10-20 15:41:02 +03:00
Mislav Cimperšak
91e4388e53 adding multiple templates for github issues (#224) 2019-10-20 15:28:49 +03:00
Sidhya Tikku
c27bcb48de Update .gitignore (#221) 2019-10-19 15:00:25 +03:00
Soumyadeep Sinha
300fd117c9 Fixed Some typos (#199)
* Fixed some typos

* Fixed some typos
2019-10-18 18:55:47 +03:00
Manuel Rüger
195ce52111 .travis.yml: Simplify and extract dev reqs (#219)
With Xenial being default, the yaml can be simplified.

Also extract requirements for development, so users can install it easily.
2019-10-18 18:03:48 +03:00
SinithH
7f5d81e68e fixed some typos (#195)
* Update README.md

* Update README.md

* Update README.md

* Replace missing "if"

* Update README.md
2019-10-18 17:39:54 +03:00
Aayush Srivastava
6a80cdede5 Update README.md (#196)
* Update README.md

Added license details(and linked to the license page) and improved the readability of the README file.

* Update README.md

Co-Authored-By: Nikita Titov <nekit94-08@mail.ru>
2019-10-18 17:32:54 +03:00
Sumit Kharche
a877d86c13 Added license & docker image badge (#197)
* Added license badge in README.md

* Removed spaces at end of file.
2019-10-18 16:49:39 +03:00
Manuel Rüger
e145f8f4a4 Dockerfile: Use apk with --no-cache (#204)
Signed-off-by: Manuel Rüger <manuel@rueg.eu>
2019-10-18 16:32:16 +03:00
Steffin Stanly
3747b85552 Update README.md (#202) 2019-10-18 16:27:49 +03:00
Mohan Sha
4df3908772 Added table of contents for easier navigation (#211) 2019-10-18 15:58:54 +03:00
Itay Shakury
817070ea30 document api access vulnerabilities (#205)
* document apiinfodisclosure vuln

* fix relative url
2019-10-18 15:50:53 +03:00
Itay Shakury
b4029225dd document DNS spoofing vulnerability (#206)
* document dnsspoof vuln

* fix relative url
2019-10-18 15:40:39 +03:00
Manuel Rüger
1395389c62 kb: typo endoint -> endpoint (#214) 2019-10-18 15:32:34 +03:00
Itay Shakury
8602e2a603 fix navigation url when searching for kb article (#210)
* fix navigation url

* add baseurl
2019-10-18 15:16:20 +03:00
Itay Shakury
f67c437a36 document kubelet vulns (#209) 2019-10-16 18:28:34 +03:00
godaji
6ff4627f9b Rename camel var to snake style. (#182) 2019-10-15 08:51:35 +03:00