Version audit: GitLab CE 19.0.2

What was read in the gitlab-foss source at tag v19.0.2 to build vela: the push checks it extends, the read paths it guards, and what is verified or not.

Source: gitlab-foss tag v19.0.2 (CE mirror, no ee/ dir). Gitaly 19.0.2, GitLab Shell 14.51.0. Target instance: Omnibus gitlab-ce=19.0.2-ce.0. Status legend: VERIFIED = read in source at this tag; UNVERIFIED = needs a running instance.

Write path (enforcement)

FindingStatus
Gitlab::GitAccess#check_change_access! -> Checks::ChangesAccess#validate! runs per-change + bulk checks for pushes (lib/gitlab/git_access.rb:405-433, lib/gitlab/checks/changes_access.rb).VERIFIED
Checks::DiffCheck#validate! iterates find_changed_paths(commits, merge_commit_diff_mode: :all_parents) over all newly introduced commits (not net diff) and calls validations_for_path; it is an explicit EE injection point returning [] in CE (lib/gitlab/checks/diff_check.rb:12-52).VERIFIED
Git::ChangedPath exposes status, path, old_path, old_mode, new_mode, commit_id => renames (src+dest), deletes, modes, gitlinks are all checkable.VERIFIED
DiffCheck returns early for ref deletions and non-branch/tag refs (e.g. refs/notes, custom refs) -> must be covered separately (deny unsupported namespaces).VERIFIED
API commits (Gitaly UserCommitFiles) run the same check: an API commit to a forbidden path returns HTTP 400. The web editor and Web IDE use the same commit machinery but were not tested separately.VERIFIED for API, UNTESTED for web editor
new_commits(newrev) returns nothing for an annotated tag push (newrev is the tag object). A commit smuggled in through a tag was never checked and then counted as already present. The overlay resolves the tag to its commit and checks it.VERIFIED live (bypass reproduced, then fixed)
find_changed_paths with :all_parents makes a merge commit show no paths when it lands another branch's change. A Developer could merge someone else's backend/ change onto main. The overlay also diffs old tip tree vs new tip tree on the default and protected branches.VERIFIED live (bypass reproduced, then fixed)
Git::Repository#find_changed_paths rescues Gitaly errors and returns [] (fail-open inside GitLab). The branch check treats an empty answer for differing trees as unverifiable. The per-commit check cannot tell.VERIFIED in source

Read path (hiding)

FindingStatus
Per-request controllers to guard: projects/{tree,blob,raw,blame,commit,commits,compare,find_file,network,graphs,repositories}_controller.rb, projects/merge_requests/{diffs,diffs_stream,content}_controller.rb, commit_diffs_stream_controller, compare_diffs_stream_controller.VERIFIED (exist)
API: lib/api/{files,commits,search,merge_requests,project_snapshots,project_export,branches,tags}.rb; repository.rb not found at that name - locate (likely lib/api/repositories.rb).PARTIAL
Repository model methods (tree, blob_at, commits, ls_files, search_files_by_*) have no current_user -> user-aware filtering must happen in controllers/finders/API, not the model.VERIFIED

Extension mechanisms in CE

  • prepend_mod / prepend_mod_with only load ee/ modules (config/initializers/0_inject_enterprise_edition_module.rb); no CE plugin dir.
  • config/initializers/*.rb (208 files) is auto-loaded -> an add-on can ship one initializer that Module#prepends onto GitAccess/DiffCheck/controllers. No patched source files.
  • file_hooks/ runs on system events only; not an interception point.

Settings UI

  • Route: resource :repository in config/routes/project.rb:146; view app/views/projects/settings/repository/show.html.haml; controller projects/settings/repository_controller.

Open (needs live instance)

Hook coverage for web/API/merge/squash/rebase/bot commits; Gitaly custom-hook dir path on Omnibus; DB table creation strategy vs GitLab schema checks; full endpoint matrix.

This page is built from docs/version-audit.md on GitHub.

On this page