Enable image scanning on push by turning on scanning for the repository so each new image is checked when it is pushed. Review the scan results for vulnerabilities, then decide whether to block deployment or remediate the image. Make sure your build and release process consumes the scan output, not just the image tag.
What “scan on push” changes in Amazon ECR
Enabling scan on push makes image vulnerability checks part of the repository workflow, not a separate manual step. That matters because the scan runs when a new image arrives in ECR, so the team can see security findings alongside the image that will be deployed. It is most useful when your pipeline treats scan output as a release input, not as an informational report.
When the setting is on, the operational question shifts from “Did we push the image?” to “Did this pushed image pass the review gate?” That gives security and platform teams a consistent control point for identifying known package and component issues before the image is promoted further.
For container image security, use the repository scan as an early signal, then pair it with image provenance, signing, and registry access controls so the same workflow also addresses tampering and trust. The broader control pattern is well covered in the Container Image Security Guide, which treats scanning as one part of a larger image assurance process.
How to turn it on in practice
At the repository level, enable scan on push in the Amazon ECR repository configuration. The practical objective is to make every new pushed image eligible for an automated scan without relying on a developer or operator to remember a separate action. That gives you a repeatable default for new artifacts, which is the main value of the setting.
Use the setting where the repository is the trust boundary, not just the build job. If the same repository feeds multiple deployment environments, the scan results should be visible to the release process that consumes the image. A repository-level scan is only useful if the pipeline checks the findings before promotion or deployment.
For teams managing many images, this is really a lifecycle control, not just a registry feature. The same discipline used for NHI Lifecycle Management Guide applies here: discovery, visibility, and policy decisions only matter if the result is wired into the process that decides what is allowed to move forward.
What the scan results should drive
The scan output should inform an explicit release decision. A low-friction setup that only records findings but never changes deployment behaviour usually becomes a reporting feature, not a control. The best pattern is to decide which findings block promotion, which require exceptions, and which are accepted for a limited period with tracking.
Also make sure the pipeline consumes the scan result itself, not only the image tag. Tags can be mutable, and a tag alone does not prove that the exact artifact you reviewed is the one moving through later stages. Checking the scan output against the image digest gives you a stronger control over artifact integrity and over whether the vulnerability state you approved is still the one being deployed.
If a scan shows vulnerabilities that cannot be fixed immediately, the fallback should be bounded and explicit: document the exception, scope the exposure, and time-box the release decision. That is especially important for public-facing services or images that run with broad permissions, because a vulnerable image becomes more consequential once it is deployed into a reachable runtime environment.
Risk and Threat Considerations
image scanning on push reduces the window in which a vulnerable container image can move unchecked into staging or production, but it does not remove the risk of already-published images, repushed tags, or vulnerable dependencies that were not yet known when the image was built. The control is strongest when the scan result is used as a deployment gate, not just a notification.
Failure mechanism: An image is accepted into the repository, later reused by a deployment pipeline, and the scan findings are ignored, delayed, or separated from the release decision. Attackers do not need to defeat the scan itself if the organisation never acts on the result or if a mutable tag points at a different artifact than the one reviewed.
Impact: Known vulnerabilities can reach running workloads, which increases the chance of compromise, lateral movement, or service disruption. In a CI/CD chain, the practical harm is often not the vulnerable image alone, but the false sense of safety created when the scan exists yet is not tied to enforcement.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
CIS Controls v8, NIST SP 800-53 Rev 5, OWASP ASVS and SLSA set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| CIS Controls v8 | CIS-4 — Secure Configuration of Enterprise Assets and Software | Scan-on-push supports secure software configuration and release gating for container images. |
| Recommendation — Enable container image scanning and block promotion of images that fail policy. | ||
| NIST SP 800-53 Rev 5 | SI-2 — Flaw Remediation | The question centers on detecting known flaws in pushed images so they can be remediated before use. |
| CM-8 — System Component Inventory | Image scanning is only useful when teams know which artifacts were pushed and are in scope. | |
| Recommendation — Use scan results to drive timely remediation of vulnerable image components. Maintain an accurate image inventory so scans map to the correct deployable artifact. | ||
| OWASP ASVS | V14 — Data Protection | Container image scanning helps reduce exposure from vulnerable software components before deployment. |
| Recommendation — Verify deployed images are checked for known vulnerabilities before release. | ||
| SLSA | Build provenance | The answer emphasizes consuming scan output for the exact artifact, which depends on release integrity. |
| Recommendation — Tie scan decisions to immutable artifact provenance before promoting an image. | ||
Practitioner Guidance
What to verify: Confirm that the repository scan is enabled where images are actually promoted, and verify that the pipeline checks the scan result for the exact digest being released. If your process only checks “latest” or trusts the tag, you do not yet have a reliable control.
Decision rule: If a finding is exploitable in the target environment, treat it as a release blocker until you have either remediated the image or formally accepted the exception with expiry. If the image is already in production, prioritise blast-radius assessment and replacement over cosmetic fixes to the build record.
Practitioner takeaway: Scan-on-push is valuable only when the organisation turns vulnerability data into a release decision, because the control exists to prevent risky artifacts from progressing, not merely to document that they were risky.
Related resources from NHI Mgmt Group
Deepen Your Knowledge
Free weekly newsletter
Subscribe to the NHI & AI Identity Journal
The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.
Bonus 33% off our NHI Course when you subscribe.
Reviewed and updated by the NHIMG editorial team on October 20, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org