-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
bug(misconf): False positives for ksv116 and ksv104 #4922
Comments
I get a similar problem due to rule trivy command executed:
Examples:
Another minor detail, the link recommended for additional details -> https://avd.aquasec.com/misconfig/ksv116 is broken, I get HTTP 404 back. |
I have also the same issue. Can anyone from the contributors look into that issue deeper? @simar7 |
Is there any progress on this and in the meantime is there a way to disable Kubernetes scanning (when running |
This also pops up on service and service-account objects, when they also cannot have a |
I'm seeing it on |
We have #4901 but it is currently not being worked on. |
I've just noticed that if you set a |
Bumping this since we have the same problem. Has anyone managed to solve this without ignore? trivy 0.46.0 - latest db (2023-10-26)
deployment:
tried using different uids between spec.securityContext and containers[].securityContext |
@simar7 @chen-keinan any recommendations here? the only workaround to at least continue using trivy to scan k8s YAML files is to avoid priority LOW findings, which correspond to the priority assigned to ksv116 and ksv104 tickets. Any details about a potential fix is highly appreciated, thanks |
@chen-keinan do you have any update? |
@simar7 nope, I think it will be the best for @mjshastha to have a look as it come from his PR. @mjshastha could you please have a look on this issue? |
I just want to add that issue #5679 may be a duplicate of this. It originates from a discussion I created where I was seeing similar false positives on Helm chart misconfig scanning. |
reported in aquasecurity/trivy#4922 since the failRootGroupId rule is given a default value, it doesn't fail the deny rule and results in a false detection. added an explicit check for the failRootGropuId truthiness to resolve.
reported in aquasecurity/trivy#4922 since the failRootGroupId rule is given a default value, it doesn't fail the deny rule and results in a false detection. added an explicit check for the failRootGropuId truthiness to resolve. also fixed the sad path test
created a fix for the first issue (ksv116) here aquasecurity/trivy-checks#53 |
Fixed via aquasecurity/trivy-checks#53 and will be in next release. |
@simar7 what about the second issue (ksv104)? |
Sorry didn't realize we hadn't fixed that one yet in your PR. Reopening. |
This should be fixed in the next release with aquasecurity/trivy-checks#71 |
Describe the bug
Trivy started reporting many false positives 3 hours ago after aquasecurity/defsec#1386 was merged into
main
.To Reproduce ksv116
Steps to reproduce the behavior:
clusterrole.yaml
file with these contents:Expected behavior
Trivy doesn't report any failures.
Output of your tfsec command with --debug flag
Trivy reports the cluster role is missing a
securityContext
, which doesn't make sense because cluster roles can't have asecurityContext
:To Reproduce ksv104
Steps to reproduce the behavior:
pod.yaml
file with these contents:Expected behavior
Trivy doesn't report any failures.
Output of your tfsec command with --debug flag
Trivy reports the pod cannot set a seccomp profile to Unconfined but the pod already sets a seccomp profile to RuntimeDefault:
System Info
The text was updated successfully, but these errors were encountered: