A team's CI/CD pipeline builds inference container images, and security requires that images with known vulnerabilities never reach production. What should the pipeline include?
- Exam domain
- Operating, Monitoring, and Securing ML and AI Solutions24% of the exam
- Difficulty
- Medium
- In this mock
- 21 questions on this domainPractise this domain
Why the exam asks this
Task 4.3: Secure ML and AI workloads and model endpoints.
Objective in the exam guide: Skill 4.3.1: Secure CI/CD pipelines by checking for code and image vulnerabilities (for example, by using Amazon CodeGuru, Amazon Inspector).
ML containers carry many dependencies, each a possible vulnerability. Automated scanning is the standard control.
Why D is the answer
Image vulnerability scanning, for example with Amazon Inspector on Amazon ECR, with the pipeline blocking failed images
Automated vulnerability scanning with a blocking gate keeps vulnerable images out of production.
Remember: Scan images in the pipeline and block vulnerable ones.
How it works
Container images include operating system packages and libraries that can have known vulnerabilities.
Amazon Inspector scans images in Amazon ECR and reports vulnerabilities by severity.
The pipeline checks the findings and blocks promotion when they exceed the allowed level.
Clues in the question
The words that point to the answer, and what each one tells you.
- Known vulnerabilities never reach production
- Automated scanning with a gate.
In detail
- Amazon Inspector can scan container images in ECR for software vulnerabilities.
- Code scanning tools can check application code in the same pipeline.
Side by side with look-alikes
| Control | Finds vulnerabilities? |
|---|---|
| Inspector scan with blocking gate | Yes |
| Senior-only pushes | No |
| Yearly review | Too late |
Every option, checked
Knowing why each wrong option fails is how you rule it out on exam day.
A. A rule that only senior engineers may push imagesWrongMost tempting
Seniority does not detect vulnerabilities.
Why it tempts: Limiting access sounds like security. But it does not detect vulnerable libraries.
B. Manual review of the Dockerfile once a yearWrong
A yearly review misses new vulnerabilities.
C. Larger container imagesWrong
Image size is unrelated to security.
D. Image vulnerability scanning, for example with Amazon Inspector on Amazon ECR, with the pipeline blocking failed imagesRight
Scan images in the pipeline and block vulnerable ones.
In practice
- Rebuild images regularly so patched packages are picked up.
Use case
An illustrative scenario, not a real incident.
A pipeline blocks an image after Inspector flags a critical vulnerability in an old library, and the team updates it.
See how it works
flowchart LR
B["Build image"] --> P["Push to ECR"]
P --> S["Inspector scan"]
S --> G{"Critical findings?"}
G -->|"No"| D["Deploy"]
G -->|"Yes"| X["Block and fix"]How to read this chart
- "Build image" leads to "Push to ECR".
- "Push to ECR" leads to "Inspector scan".
- "Inspector scan" leads to "Critical findings?".
- At "Critical findings?": if "No", go to "Deploy"; if "Yes", go to "Block and fix".