Skip to content
Commit 9fe735bb authored by Emanuele Aina's avatar Emanuele Aina
Browse files

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's avatarEmanuele Aina <emanuele.aina@collabora.com>
parent 592b4203
Loading
Loading
Loading
Pipeline #133481 passed with warnings with stages
in 3 hours, 27 minutes, and 37 seconds
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment