This repository has been archived by the owner on Oct 30, 2024. It is now read-only.
RunAsNonRoot false positive at Container level when is defined at Pod level #344
Closed
1 of 2 tasks
BUG REPORT
SUMMARY
The security settings that you specify for a Pod apply to all Containers in the Pod.
So defining:
As the container will run with the permission of user (1000) set on the Pod. The root user will not be allowed at container level.
Must not produce an error output: "RunAsNonRoot is not set in ContainerSecurityContext, which results in root user being allowed!"
ENVIRONMENT
STEPS TO REPRODUCE
Define runAsUser at Pod level and run
kubeaudit nonroot
EXPECTED RESULTS
No errors in output for the containers of the defined pod
ACTUAL RESULTS
Report results: "RunAsNonRoot is not set in ContainerSecurityContext, which results in root user being allowed!"
ADDITIONAL INFORMATION
Running the report with JSON output, all container and cluster config
kubeaudit all -a --json --kubeconfig clusterconfig
The text was updated successfully, but these errors were encountered: