CLOUD CONCEPT

Security Quality Gates

Security quality gates are enforced checkpoints that allow software changes to advance only when defined security acceptance criteria are satisfied.

Cloud Concepts Hub →

What is Security Quality Gates

A security quality gate turns vulnerability findings and security policy checks into an explicit decision to permit, block, or require approval for a change. In cloud delivery pipelines, it helps prevent vulnerable code, dependencies, container images, and infrastructure configurations from reaching production while preserving an auditable exception process.

Security quality gates connect security testing to delivery decisions. A scanner produces evidence; a gate evaluates that evidence against a policy and controls whether a change can advance. Simply running a vulnerability scan, publishing a report, or sending a notification does not create a gate. The pipeline must actually prevent promotion when the acceptance criteria are not met.

Gates can operate at pull request, build, artifact publication, staging, and production promotion boundaries. Common inputs include static application security testing, dependency analysis, secret detection, container vulnerability scanning, infrastructure-as-code checks, and dynamic testing against a deployed test environment. These checks cover different risks: inspecting application source does not establish that its operating-system packages or deployment permissions are safe.

A practical policy might reject newly introduced critical vulnerabilities, reject exposed credentials regardless of severity, and require approval for specified high-severity findings. Severity alone is often insufficient. Exploitability, workload exposure, affected component usage, fix availability, and organizational requirements can influence the decision. Teams can baseline existing findings to avoid stopping every release immediately, but inherited vulnerabilities still need owners, remediation deadlines, and tracking.

For example, a container delivery pipeline can test source code, build an image, push it to a registry, and wait for vulnerability scanning to complete. A policy step then evaluates findings for the exact image digest and fails the build if disallowed vulnerabilities remain. Deployment must use that same digest rather than a mutable tag; otherwise, a different image could be deployed after the gate passes. A successful image upload is not evidence that its security scan completed or passed.

On AWS, AWS CodeBuild can run supported scanners and policy evaluation scripts, while AWS CodePipeline uses action results to control subsequent deployment stages. Amazon Inspector can supply vulnerability analysis for supported artifacts and workloads. When an exam names Amazon Q Developer or Amazon CodeGuru Security, distinguish code-level vulnerability discovery from pipeline enforcement: developer feedback and remediation suggestions do not, by themselves, establish a mandatory release gate.

Remediation closes the loop. Findings should identify the affected artifact, responsible team, recommended correction, and required completion date. A dependency update, base-image rebuild, or code fix should trigger another scan and the relevant functional tests before promotion. Automated fixes can reduce repetitive work, but they still require validation because a security correction can change application behavior. Runtime vulnerability discovery should also trigger rebuilds or remediation workflows when newly disclosed vulnerabilities affect previously approved artifacts.

Operational reliability matters. A scanner timeout, permission error, unsupported artifact, or incomplete scan must not silently become a passing result. Diagnose missing findings by checking scan coverage, completion status, artifact identity, IAM permissions, network access, and result parsing. Protect gate scripts, pipeline definitions, and exception records from unauthorized changes so that developers cannot bypass controls by editing the mechanism that enforces them.

The main trade-offs are delivery latency, scanning cost, and false-positive handling. Fast checks can run on every change, with deeper tests at later boundaries. Exceptions should have documented justification, an accountable approver, compensating controls where appropriate, and an expiration date. Passing a gate means the artifact met a defined policy using available evidence; it does not prove that the workload is vulnerability-free or eliminate the need for runtime security controls.

Key aspects of Security Quality Gates

Effective gates combine explicit policy, layered evidence, immutable artifact identity, verified remediation, controlled exceptions, and reliable enforcement.

Explicit, enforceable acceptance criteria

Define which findings block delivery, which require approval, and which can be tracked without blocking. Connect the decision to a required pipeline action or protected merge check rather than relying on notifications.

Layered security evidence

Combine source, dependency, image, secret, and infrastructure checks according to the workload. Each scanner has a coverage boundary, so one passing result cannot substitute for all other checks.

Artifact-bound decisions

Associate scan evidence with a commit, package version, or immutable image digest. Promote the exact artifact that passed and repeat evaluation when its contents or relevant vulnerability intelligence changes.

Validated remediation

Route actionable findings to an owner and verify corrections through rescanning and application tests. Treat generated fixes and dependency updates as changes requiring validation, not automatic proof of safety.

Controlled exceptions

Require documented risk acceptance, authorized approval, and expiration for bypasses. Track existing vulnerabilities separately so that a baseline does not become permanent permission to ignore them.

Reliable and protected enforcement

Distinguish a clean scan from an unavailable, incomplete, or failed scan. Apply least-privilege permissions and change protection to pipeline definitions, policy scripts, and approval mechanisms.

Cloud services for Security Quality Gates

Amazon Q Developer can help engineers identify and correct code issues before submission. AWS CodePipeline coordinates the delivery workflow, while AWS CodeBuild runs security checks and evaluates their results against release policy. For containers, Amazon ECR stores the image, and its scanning capabilities, including enhanced scanning through Amazon Inspector, provide vulnerability evidence. The gate must check scan completion and the exact image digest before allowing promotion. Findings that violate policy stop delivery or enter a controlled approval process; fixes trigger new builds, tests, and scans. These services provide feedback, execution, storage, and findings, but the organization must define and enforce the acceptance criteria.

AWS CodePipeline image AWS CodePipeline

Orchestrates delivery stages and prevents progression when a required security action fails. Manual approval actions can support authorized risk acceptance, but finding-specific decisions and exception validation must be implemented explicitly.

Open AWS CodePipeline →
AWS CodeBuild image AWS CodeBuild

Runs scanner commands and policy evaluation code in build jobs. A gate can return a nonzero exit status for disallowed findings or incomplete scans, provided the build configuration does not suppress the failure.

Open AWS CodeBuild →
Amazon Inspector image Amazon Inspector

Provides vulnerability findings for supported compute workloads and integrates with supported CI/CD workflows for container image assessment. Pipeline logic must evaluate the results and enforce the release policy; finding generation alone does not block deployment.

Open Amazon Inspector →
Amazon Q

Provides developer-facing code security analysis and remediation assistance in supported development workflows. Use this feedback to correct problems early, while retaining an independently enforced release gate rather than assuming an IDE review controls deployment.

Open Amazon Q →