Open sfzylad opened 2 years ago
The current issue is that k8s will set the SGID on volumes when the fsGroup
field is set on a container - which is set at the pod securityContext level in build pods. The lifecycle will not modify the permissions and will publish the SGID bit to the registry.
Possible mitigations include updating the cnb lifecycle to remove this permission.
posed the question in lifecycle: https://github.com/buildpacks/lifecycle/issues/934
The images created with the
kpack
all have the SGID set on the/layers
directory:drwxrwsrwx 1 root cnb 4096 Jan 1 1980 /layers/
However there's no need to do that because executables inside of the image are running as the
cnb
user anyway:Is there any specific reason for the SGID? If not can it be dropped?