# Security Quality Gates

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

Cloud concept. Updated 2026-10-29. Page: https://blowstack.com/tools/cloud-concepts-hub/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.

Practice exams covering Security Quality Gates: [AIP-C01 AWS Certified Generative AI Developer - Professional](https://blowstack.com/practice-exams/aws-certified-generative-ai-developer-professional), [MLA-C02 (beta) AWS Certified Machine Learning Engineer - Associate](https://blowstack.com/practice-exams/aws-certified-machine-learning-engineer-associate), [SCS-C03 AWS Certified Security - Specialty](https://blowstack.com/practice-exams/aws-certified-security-specialty), [SAP-C03 AWS Certified Solutions Architect - Professional](https://blowstack.com/practice-exams/aws-certified-solutions-architect-professional).

## 6 key aspects of Security Quality Gates

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

1. **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.
2. **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.
3. **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.
4. **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.
5. **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.
6. **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](https://blowstack.com/tools/cloud-services-hub/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.
- **[AWS CodeBuild](https://blowstack.com/tools/cloud-services-hub/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.
- **[Amazon Inspector](https://blowstack.com/tools/cloud-services-hub/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.
- **[Amazon Q](https://blowstack.com/tools/cloud-services-hub/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.

### Question 1 (MLA-C02 (beta))

**Question:**

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?

**Correct 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.

**Explanation:** 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.

### Question 2 (SAP-C03)

**Question:**

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?

**Correct 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.

**Explanation:** 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.

### Question 3 (AIP-C01)

**Question:**

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?

**Correct 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.

**Explanation:** 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.

### Question 4 (SCS-C03)

**Question:**

A company uses AWS CodePipeline and AWS CodeBuild to deliver an application. The application's repository contains a buildspec that runs a security scanner and evaluates its findings. During a security exercise, a developer changes the buildspec to skip scanning and return success. The pipeline then deploys the application.

Developers must retain permission to change application build commands, but they must not be able to change or bypass the security assessment. Only the security team can modify pipeline configuration and security-tool configuration. Every release must be blocked if the assessment fails or cannot complete.

Which solution best meets these requirements?

**Correct answer:** Create a separate CodeBuild assessment project with its buildspec and policy scripts maintained outside the application repository under security-team control. Have it scan the candidate source artifact without executing repository-provided build scripts and fail on unacceptable findings or assessment errors. Make successful completion a required CodePipeline action before deployment.

**Explanation:** This separates developer-controlled build instructions from the trusted security assessment. The assessment evaluates the candidate artifact using security-controlled commands and fails closed. Requiring the assessment action to succeed before deployment makes its result an enforceable release gate.

## 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:

- [MLA-C02 (beta)](https://blowstack.com/practice-exams/aws-certified-machine-learning-engineer-associate): 6 questions
- [SAP-C03](https://blowstack.com/practice-exams/aws-certified-solutions-architect-professional): 5 questions
- [SCS-C03](https://blowstack.com/practice-exams/aws-certified-security-specialty): 4 questions
- [AIP-C01](https://blowstack.com/practice-exams/aws-certified-generative-ai-developer-professional): 3 questions

## What is Security Quality Gates

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.

- MLA-C02 (beta): Security Quality Gates: enforcing pipeline promotion policies (Premium), https://app.blowstack.com/lessons/security-quality-gates-enforcing-pipeline-promotion-policies-mla-c02
- SAP-C03: Security Quality Gates: artifact-bound promotion policies (Premium), https://app.blowstack.com/lessons/security-quality-gates-artifact-bound-promotion-policies-sap-c03
- AIP-C01: Security Quality Gates: enforcing release policies (Premium), https://app.blowstack.com/lessons/security-quality-gates-enforcing-release-policies-aip-c01
- SCS-C03: Security Quality Gates: enforcing artifact promotion policies (Premium), https://app.blowstack.com/lessons/security-quality-gates-enforcing-artifact-promotion-policies-scs-c03
- MLA-C02 (beta): Security Quality Gates vs. Vulnerability Assessment (Premium), https://app.blowstack.com/lessons/security-quality-gates-vs-vulnerability-assessment-mla-c02
- SAP-C03: Security Quality Gates vs Vulnerability Assessment (Premium), https://app.blowstack.com/lessons/security-quality-gates-vs-vulnerability-assessment-sap-c03
