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

query(kubernetes): containers_run_with_low_uid >= 1000 instead of 10000 #7225

Open
MrRedHead opened this issue Aug 5, 2024 · 0 comments
Open
Labels
community Community contribution kubernetes Kubernetes query query New query feature

Comments

@MrRedHead
Copy link

Platform

Kubernetes

Description

https://github.com/Checkmarx/kics/blob/master/assets/queries/k8s/containers_run_with_low_uid/query.rego
securityContext.runAsUser should be set to a UID >= 10000

This seems a typo, de UID must be equal or higher dan 1000
There is no expliciet reason that the UID must be higher dan >= 10000

The reason is that UID < 1000 are reserved for system users.

External references:
https://www.redhat.com/sysadmin/user-account-gid-uid
"By default, Linux systems automatically assign UIDs and GIDs to new user accounts in numerical order starting at 1000. In other words, if you create a new user account during installation"

https://wiki.archlinux.org/title/Users_and_groups
"UID is the numerical user ID. In Arch, the first login name (after root) for a so called normal user, as opposed to services, is UID 1000 by default; subsequent UID entries for users should be greater than 1000."

Wat is de reason that the UID >= 10000 please give a reference!

@MrRedHead MrRedHead added community Community contribution query New query feature labels Aug 5, 2024
@github-actions github-actions bot added the kubernetes Kubernetes query label Aug 5, 2024
@MrRedHead MrRedHead changed the title query(k8s): containers_run_with_low_uid >= 1000 instead of 10000 query(kubernetes): containers_run_with_low_uid >= 1000 instead of 10000 Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Community contribution kubernetes Kubernetes query query New query feature
Projects
None yet
Development

No branches or pull requests

1 participant