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

Set security context for kube-hunter #394

Conversation

mlevesquedion
Copy link
Contributor

Following discussion on #163, this PR adds a security context for kube-hunter, but only if the kube-hunter version is at least 0.4.1 (or latest, because that should only point to 0.4.1 or newer). Unfortunately, this means that if the version is set using the SHA, then no security context will be used.

@codecov
Copy link

codecov bot commented Feb 15, 2021

Codecov Report

Merging #394 (78d5b42) into main (9aa35b1) will decrease coverage by 5.66%.
The diff coverage is 80.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #394      +/-   ##
==========================================
- Coverage   68.32%   62.66%   -5.67%     
==========================================
  Files          59       50       -9     
  Lines        3107     2850     -257     
==========================================
- Hits         2123     1786     -337     
- Misses        723      818      +95     
+ Partials      261      246      -15     
Impacted Files Coverage Δ
pkg/kubehunter/scanner.go 82.56% <80.00%> (-0.98%) ⬇️
pkg/vulnerabilityreport/sort.go 0.00% <0.00%> (-100.00%) ⬇️
pkg/kubebench/io.go 38.09% <0.00%> (-47.62%) ⬇️
pkg/configauditreport/io.go 44.64% <0.00%> (-42.86%) ⬇️
pkg/kube/object.go 34.37% <0.00%> (-28.13%) ⬇️
pkg/trivy/plugin.go 47.90% <0.00%> (-26.58%) ⬇️
pkg/kubehunter/writer.go 56.52% <0.00%> (-26.09%) ⬇️
pkg/kube/secrets.go 21.11% <0.00%> (-24.45%) ⬇️
pkg/vulnerabilityreport/io.go 63.51% <0.00%> (-17.57%) ⬇️
pkg/resources/resources.go 76.47% <0.00%> (-11.77%) ⬇️
... and 12 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 9aa35b1...78d5b42. Read the comment docs.

@danielpacak danielpacak self-requested a review February 16, 2021 07:25
Copy link
Contributor

@danielpacak danielpacak left a comment

Choose a reason for hiding this comment

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

Overall the code looks good, but I have noticed change in behaviour were kube-hunter does not return certain vulnerabilities.

pkg/kubehunter/scanner.go Show resolved Hide resolved
@mlevesquedion mlevesquedion force-pushed the set-security-context-for-kube-hunter branch from c3111c3 to 7aa2571 Compare February 17, 2021 04:47
@danielpacak danielpacak merged commit 776bb1e into aquasecurity:main Feb 17, 2021
@mlevesquedion mlevesquedion deleted the set-security-context-for-kube-hunter branch February 17, 2021 14:36
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

2 participants