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

Trivy misconfig : Use High Uid #86

Open
padmankosalaram opened this issue May 3, 2024 · 1 comment
Open

Trivy misconfig : Use High Uid #86

padmankosalaram opened this issue May 3, 2024 · 1 comment
Assignees

Comments

@padmankosalaram
Copy link
Contributor

padmankosalaram commented May 3, 2024

Issue: https://avd.aquasec.com/misconfig/kubernetes/general/avd-ksv-0020/

Runs with UID <= 10000
Force the container to run with user ID > 10000 to avoid conflicts with the host’s user table.

Links : https://kubesec.io/basics/containers-securitycontext-runasuser/


Check: CKV_K8S_40: "Containers should run as a high UID to avoid host conflict"

FAILED for resource: Job.mas-inst1-pipelines.mas-deploy-job
File: /chart/deploy-mas/mas-deploy/templates/01-deploy-mas.yaml:95-327

Guide: https://docs.prismacloud.io/en/enterprise-edition/policy-reference/kubernetes-policies/kubernetes-policy-index/bc-k8s-37

@padmankosalaram
Copy link
Contributor Author

This violation can not be fixed, please find the details below

Eventhough we didn’t set UID in helm template of the Job yaml (which creates the pod), the pod which actually gets created will get the runAsUser injected via the Openshift default SecurityContextConstraints.

Please find the pod YAML which has the runAsUser https://ibm.box.com/s/cio2il1xsz6e0j2ymegchiuc4k0r6wm9

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

No branches or pull requests

1 participant