Investigate why -o secret_push_protection.skip_all wasn't respected for merge-train project

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Problem Description

The merge-train project is used by several pipelines across different projects in gitlab-org group to sync and mirror between the canonical repository and the security and FOSS mirrors. This project encapsulates a shell script into a docker image that gets executed in CI jobs.

As part of the sync/mirror process, a few git push commands are executed. When those push commands are executed, secret push protection is invoked. In https://gitlab.com/gitlab-com/gl-infra/delivery/-/issues/20491, the groupsecret detection and grouprelease-and-deploy had discussed the need to skip secret push protection scans in similar automated workflows (please see the discussion for more details on the why).

One of the skip options available is to pass a git push option, i.e. -o secret_push_protection.skip_all to the git push command. The grouprelease-and-deploy team had updated the shell script to use the push option, but Secret Push Protection was still being executed in CI jobs (see example).

This issue aims to investigate why the push option was not respected in the merge-train project. Please note that, most of the CI jobs were running on the merge-train project in the https://ops.gitlab.net instance and not the https://gitlab.com instance. We have confirmed the project in both instances had the latest code changes.

Timeline

Below is a brief timeline of the incident, and how it was resolved.

NOTE: The skip option via the commit message was never tested. The team asked grouprelease-and-deploy to test this whenever they could, so we can identify the root cause and understand if this only affects push options or the entire Secret Push Protection functionality.

Screenshots

Below are a few screenshots that were used in debugging during the incident.

Screenshot 1

Screenshot_2025-09-22_at_2.32.44_PM

Screenshot 2

Screenshot_2025-09-22_at_2.59.50_PM

Screenshot 3

Screenshot_2025-09-22_at_3.47.53_PM

References

Failing CI jobs (on https://ops.gitlab.net) can be found below:

And the associated correlation IDs (can be checked via the support dashboard):

  • 01K5RHY6NBP388F0AWB6CGCTAX
  • 01K5RHY2MS1TC53AN4PR4HX0SZ
Edited by 🤖 GitLab Bot 🤖