Security teams should scan every merge request by default, run full scans on merges, and reserve manual scans for exceptional cases. The practical goal is to keep feedback close to the code change, then let security tune severity thresholds and rulesets centrally. That balance gives developers immediate context while preserving governance over what gets ignored, reopened, or escalated.
Why Merge-Request Scanning Beats Ad Hoc Review for GitLab
Security teams get better outcomes when scanning is tied to the merge request, because that is where code intent, change scope, and developer context are still visible. Ad hoc review usually arrives too late to shape the fix, while merge-request scanning can surface issues before they spread into shared branches. The governance value is not just speed; it is consistency, because the same rules can be applied to every change while exceptions remain visible and auditable. For a control-based view of that balance, NIST’s NIST SP 800-53 Rev 5 Security and Privacy Controls remains a useful reference point for defining repeatable oversight rather than one-off intervention.
In practice, many security teams discover the real cost of loose scanning only after exceptions, missed findings, and inconsistent thresholds have already become normalised.
How GitLab Scanning Should Be Staged Across the Delivery Flow
The most effective structure is layered. Merge-request scans give fast, localised feedback on the exact change set. Merge scans then provide a broader checkpoint before code becomes part of the main line. This separation matters because not every finding should be treated the same way at every stage. A low-severity issue that informs developer refactoring may be useful in a merge request, while the same issue can be set to a different disposition once it is entering a release path.
That is why central policy should control what is scanned, which detectors are enabled, how findings are grouped, and which severities block progress. Teams often try to optimise speed by weakening policy at the edge, but that creates drift: one project starts ignoring a rule that another team still treats as actionable. A better model is to keep the pipeline automatic and let security own the policy surface, including exceptions, reopen conditions, and escalation triggers. Developer teams get rapid context, but they do not each invent their own risk standard.
- Scan merge requests by default so the feedback loop stays close to the code change.
- Run a broader scan on merge or pre-merge gates so central oversight still covers the integrated state.
- Treat manual scans as an exception path for unusual workflows, not as the normal operating mode.
- Keep thresholds and ignore rules central so teams do not silently diverge in how findings are handled.
This approach breaks down when teams use the scanner as a compliance checkbox rather than a control, because then findings are processed after the fact instead of shaping the change itself.
Where Fast Feedback Starts to Weaken Oversight
Tighter pipeline feedback often increases process complexity, requiring organisations to balance developer speed against the risk of fragmented policy enforcement. The main edge case is temporary suppression: if teams can dismiss or ignore findings too easily, fast feedback becomes fast bypass. Another common exception is highly bespoke pipelines, where one repository cannot use the same scan cadence as the rest of the estate without causing false confidence or excessive noise. In those cases, the issue is not whether scanning is fast, but whether the exception path is documented and reviewable.
There is also a genuine guidance-versus-consensus distinction here. Most teams agree that developer-facing feedback should happen early, but there is no universal consensus on the exact severity threshold that should block a merge. That choice depends on the application’s business criticality, the maturity of the codebase, and how much follow-up security capacity the organisation can sustain. What matters is that the threshold is deliberate, not accidental, and that it can be changed centrally rather than by local convenience.
One overlooked problem is scan fatigue. When developers see too many low-value alerts, they stop trusting the pipeline, and once that happens the organisation has effectively traded oversight for noise.
Risk and Threat Considerations
The material risk is not scanning itself, but uneven scanning governance. If merge-request checks are bypassed, deferred, or tuned differently across projects, teams can introduce insecure code paths without a consistent review signal. That creates exposure in both the development lifecycle and the production change pipeline, especially when findings are ignored locally but still relevant centrally.
Failure mechanism: Weak oversight usually appears through one of three recognised patterns: suppressed findings that never resurface, manual scans used as a substitute for repeatable gates, or inconsistent severity rules that allow one repository to drift away from the policy applied elsewhere.
Impact: The consequence is not just missed vulnerabilities. It is loss of auditability, inconsistent enforcement, and a slower ability to prove which changes were reviewed under what standard. Over time, that weakens both security posture and release governance.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
MITRE ATT&CK address the attack and risk surface, while CIS Controls v8 and NIST CSF 2.0 set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| CIS Controls v8 | 16 — Application Software Security | GitLab scanning is a secure SDLC control for finding issues early. |
| Recommendation — Use automated scanning in the SDLC to catch weaknesses before code is merged. | ||
| NIST CSF 2.0 | PR.IP — Information Protection Processes and Procedures | Central scan policy and exception handling are process controls. |
| DE.CM — Security Continuous Monitoring | Continuous pipeline scanning provides ongoing detection on code changes. | |
| RS.AN — Analysis | Findings need triage and severity decisions before they become release blockers. | |
| Recommendation — Define and enforce a standard scanning policy with controlled exceptions. Continuously monitor merge requests and branches for security findings. Triage scan results consistently and escalate material findings promptly. | ||
| MITRE ATT&CK | T1195 — Supply Chain Compromise | Scanning helps detect malicious or vulnerable code introduced through delivery paths. |
| Recommendation — Map suspicious code changes to supply-chain risk and investigate staging activity. | ||
Practitioner Guidance
Decision rule: Use merge-request scans as the default control, and treat any departure from that model as an exception that needs explicit ownership and review. If a team wants to exempt a project, ask whether the exception is about pipeline constraints, tooling limits, or a real business need, because those cases should not be handled the same way.
What to verify: Confirm that central policy governs severity thresholds, ignore rules, and reopen behaviour, while project teams can only consume that policy rather than redefine it. Also verify that merge scans and merge-request scans are producing distinct value, not duplicating the same signal in two places without improving decision quality.
Common mistake: Teams often chase faster builds by turning off the noisiest checks first, but that usually removes the findings that would have driven the most useful early fixes. A better choice is to tune signal quality before reducing coverage.
Practitioner takeaway: Fast feedback is only safe when the organisation can still answer who set the scanning rule, who approved the exception, and who owns the finding after it appears.
Related resources from NHI Mgmt Group
- How should security teams use AI in the SOC without weakening human oversight?
- How should security teams keep large repository scans fast without weakening ignore rules?
- How should security teams integrate Java source scanning into CI pipelines without slowing developers down?
- How should security teams implement supply chain checks in GitLab CI without slowing developers down?