gitlab-ci: Work around umask giving root-owned world-writable files
Explicitly call `chmod` to work around the upstream GitLab issue https://gitlab.com/gitlab-org/gitlab-runner/issues/1736 "File/directory creation umask when cloning is `0000`". To work with Docker images that run with a specific non-root user, GitLab clones git repositories with umask set to 000: that is, to make non-root users from Docker be able to write in the repositories they are made world-writable. This has nasty consequences with tools like Debos or the Docker image builders which copy files from the repository and trust the original permissions. In the case here, all the overlays resulted world-writable on the generated images, enabling trivial privilege escalations. This commit should be reverted once the GitLab issue is fixed. Signed-off-by: Emanuele Aina <emanuele.aina@collabora.com>
parent
592b4203
Loading
Loading
Pipeline
#133481
passed with warnings
with stages
in
3 hours, 27 minutes, and 37 seconds
Loading
-
mentioned in commit tiny-image-recipes@11551697
-
mentioned in merge request tiny-image-recipes!62 (merged)
-
mentioned in commit tiny-image-recipes@e8419495
-
mentioned in commit tiny-image-recipes@0681d317
Please register or sign in to comment