GitLab check

Git clone depth is unlimited

GL-COST-002LowCost efficiency

Trigger condition

The project's default Git clone depth (ci_default_git_depth) is 0 or unset (null) -- both of which GitLab treats as unlimited/full history.

Evidence

States the configured project default Git clone depth and that it resolves to unlimited/full history.

Impact

When this project default applies, CI jobs that obtain repository sources may fetch full history, potentially increasing network transfer, checkout duration, runner usage, and compute cost -- particularly for large or long-lived repositories. This configuration does not prove that additional cost, transfer, or delay actually occurred.

Recommendation

Set a bounded positive project default Git clone depth appropriate for the project's branching, tagging, and history requirements. Unlimited history may be intentional and legitimate for work such as versioning or changelog generation across complete tag/history information.

Important limitations

This check evaluates only the project-level default Git clone depth. It does not inspect job-level or pipeline-level GIT_DEPTH variable overrides, which can set an effectively unlimited depth when the project default is bounded, or a bounded depth when the project default is unlimited.

← Back to the check catalogue