Cloud concept · Updated

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

In short

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.

Cloud Concepts Hub →

6 key aspects of Security Quality Gates

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

01
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.

02
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.

03
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.

04
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.

05
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.

06
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 CodePipelineAWS 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.

AWS CodeBuildAWS 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.

Amazon InspectorAmazon 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.

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.

Security Quality Gates exam questions

Real practice exam questions on Security Quality Gates, with the correct answer and its explanation. Answer them with every option in the exam simulator.

MLA-C02 (beta)

An ML team uses AWS CodePipeline to release inference containers. Amazon Inspector findings for each candidate image are available before production deployment, and deployment uses the assessed image digest. Company policy prohibits all CRITICAL findings and permits HIGH findings only when covered by an unexpired security-team exception. Each exception identifies the approved image digest and finding, an owner, and an expiration time.

The security team has approved a seven-day exception for one HIGH finding. The team must allow eligible releases without weakening checks for other findings and must retain evidence of each release decision. Which pipeline change meets these requirements?

Show answerCORRECT ANSWER

Add a predeployment policy action that blocks every CRITICAL finding and every HIGH finding without a matching, unexpired exception. Block promotion if exception validation fails, and retain the findings, exception references, and decision with the pipeline execution.

This action turns scan results and the exception policy into an enforced release decision. Matching exceptions to the image digest and finding prevents broader reuse, checking expiration prevents stale approvals, and retaining the evaluation provides audit evidence.

SAP-C03

A company uses a custom container build pipeline with Amazon Inspector CI/CD scanning. The pipeline builds an intermediate image, runs the Amazon Inspector SBOM Generator against that image, and submits the generated SBOM to the Inspector Scan API. A security gate evaluates the returned vulnerability report.

A subsequent packaging step installs additional operating-system packages and a monitoring agent, then publishes the final image to a third-party registry. During an audit, the security team discovers that a package installed during packaging has a known CRITICAL vulnerability, but the pipeline's vulnerability report does not list that package. All affected package types are supported by Inspector.

The company requires the gate to assess all packages in the final image by using Inspector CI/CD scanning. The pipeline must retain the report associated with the published release and block publication if assessment fails or reports CRITICAL vulnerabilities.

Which change should a solutions architect recommend?

Show answerCORRECT ANSWER

Move SBOM generation and the Scan API call after the final packaging step. Generate the SBOM from the completed image, evaluate and retain the returned report, and publish that same image only if the assessment succeeds without CRITICAL findings.

The Inspector SBOM Generator inventories the supplied image, and the Scan API scans that SBOM rather than the original image. Generating a fresh SBOM after all package installations gives Inspector the final image's package inventory. Evaluating the resulting report before publication and publishing the assessed image implements the required release gate.

AIP-C01

A financial services company uses AWS CodePipeline to release a containerized generative AI gateway. An AWS CodeBuild project runs adapter tests, builds a container image, and pushes it to Amazon ECR. ECR basic scan-on-push is enabled for the supported image. Concurrent pipeline executions currently push to the same mutable candidate tag. Scans can finish after the build completes.

Compliance requires that production images have no critical vulnerabilities, that scan evidence correspond to the exact image deployed, and that releases stop if a scan fails or does not complete within the allowed time. The company wants an automated predeployment control.

Which implementation best meets these requirements?

Show answerCORRECT ANSWER

Have CodeBuild capture the image digest returned by its push and poll ECR scan status for that digest with a bounded timeout. After successful scan completion, evaluate the findings and exit with a nonzero status for critical vulnerabilities, scan failure, or timeout. Pass an image reference containing the validated digest to the deployment stage.

This implements a fail-closed security gate for the exact image produced by the execution. Waiting for successful scan completion prevents incomplete results from being treated as approval. A nonzero build exit status fails the CodePipeline action, and deploying by the validated digest prevents concurrent tag updates from substituting a different image.

Practice Security Quality Gates in a full exam

Questions on Security Quality Gates in each practice exam, with every answer option and an explanation for each:

Start a free practice exam

What is Security Quality Gates

3 min read

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.

Learn Security Quality Gates in lessons

6 short lessons on Security Quality Gates in 4 certification courses.

Open the lessons