Security Gates

Define objective, documented criteria that a release must meet before it can progress.

IntermediateSecurity GatesGovernanceApplication

Where it fits in the lifecycle

  1. Plan
  2. Code
  3. Build
  4. Test
  5. Release
  6. Deploy
  7. Operate
  8. Monitor
  • Test Dynamic testing, integration security tests and security gates.
  • Release Approval controls, artefact promotion and provenance.

Overview

A gate turns scan output into a pass/fail decision using thresholds the team agreed to: severity, fix availability, age of finding and asset criticality.

Why it matters

Without explicit criteria, every release becomes a negotiation and scan results are ignored.

How it works

  1. 01Scanners emit machine-readable reports.
  2. 02A policy evaluates reports against thresholds.
  3. 03Failures block promotion; documented exceptions expire automatically.

Common tools

Open Policy AgentGitLabGitHubGitLabGitHubJenkins

Implementation examples

bashThreshold gate
trivy image --exit-code 1 \  --severity CRITICAL \  --ignore-unfixed \  "$IMAGE"
Blocks only on fixable critical issues so the gate stays actionable. Tighten thresholds as backlog shrinks.

Best practices

  • Start narrow and tighten.
  • Give every exception an owner and expiry.
  • Make gate criteria visible to developers.

Common mistakes

  • Blocking on all severities immediately, which leads to blanket bypasses.

Hands-on labs