seaweedfs / seaweedfs-operator

seaweedfs kubernetes operator
Apache License 2.0
174 stars 42 forks source link

Use numeric user id for nonroot verification #88

Closed scrayos closed 1 year ago

scrayos commented 1 year ago

The numeric ID of nonroot user and group should be used, so that spec.template.spec.containers.securityContext.runAsNonRoot of the Kubernetes deployment can be set and verified. This check only supports numeric users at the moment.

Here can be seen, that the user and group ID of nonroot is 65532: https://github.com/GoogleContainerTools/distroless/blob/main/base/base.bzl#L8

And here is the problem: https://stackoverflow.com/a/49729786