GitLab Runner 15.10.0 breaks the git safe directory context
My Ubuntu based gitlab-runner systems got updated to 15.10.0 over the weekend and pipelines are failing ever since with the error message
Fetching changes...
Reinitialized existing Git repository in /builds/NAMESPACE/.git/
fatal: detected dubious ownership in repository at '/builds/NAMESPACE'
To add an exception for this directory, call:
git config --global --add safe.directory /builds/NAMESPACE
Couldn't figure out any settings to work around this, but when downgrading to 15.9.0 everything works as before and as expected.
This may be related to #29022 (closed) but I started a fresh one as this is clearly introduced by the updated version.