Git's file transport should be restricted during recursive submodule fetches in CI
A Git superproject can define submodule URLs in its .gitmodules file, which Git may follow automatically during recursive clones or updates. Local file: URLs are a concern because they can reach the runner's filesystem, cached data, or other repositories present on the host. Such automatic fetches can run with the runner's local privileges, which can blur the separation between checking out the main project and fetching its dependencies. Git's protocol policy settings can restrict these transports, and the article recommends that the execution environment enforce them rather than relying on repository-local configuration. Teams should audit CI jobs that recurse submodules, pin expected submodule commits, and fail builds when submodule URLs change unexpectedly.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in