概念 · 基于 AIF-C01
Scanning code and images in CI/CD
Scan code, dependencies and container images in the pipeline, and stop the release when findings are too severe.
本课尚未翻译,暂以英文显示。
你在AI Practitioner中已学过
- Amazon Inspector scans EC2 instances, container images in Amazon ECR and Lambda functions for known flaws.
- It ranks each finding by severity so you fix the worst first.
- Inspector scans software. Macie scans data.
Packages, build, scan, then a severity gate before deploy.
Container images in ECR
- Inspector
Lambda code and packages
- Inspector
Repository code
- Inspector code security
Package sources
- CodeArtifact
Data with personal information
- Macie
| Check | Tool |
|---|---|
| Container images in ECR | Inspector |
| Lambda code and packages | Inspector |
| Repository code | Inspector code security |
| Package sources | CodeArtifact |
| Data with personal information | Macie |
是什么
A secure ML pipeline checks three things before a model or image ships. Code: your training and serving code. Dependencies: the Python packages and base images it pulls in. Images: the container that runs on SageMaker AI or another compute service. Inspector covers images and Lambda functions. For images in Amazon ECR, it can scan when you push an image and keep scanning as new vulnerabilities are published. For Lambda, it scans dependencies and can also scan your function code. Findings carry a severity, and Inspector sends them to Amazon EventBridge.
是什么
To block a deploy on severity, put a gate in the pipeline. An AWS CodeBuild step or a Lambda function in AWS CodePipeline reads the scan result and fails the stage when findings of Critical or High severity exist, so the next stage never runs. A manual approval can sit after the gate for the rest.
AWS CodeArtifact is a private package repository. It can pull from public registries such as PyPI and npm through an upstream link, and your builds then install only from CodeArtifact. That gives you one place to control and audit which package versions get in, and it helps against dependency confusion.
是什么
Status: Amazon CodeGuru Reviewer has accepted no new repository associations since November 7, 2025, and Amazon CodeGuru Security ended on November 20, 2025. It scanned code for defects, security flaws and secrets. AWS points to Amazon Inspector code security for scanning repositories.
要记住
- Inspector: ECR images (on push and continuous), Lambda, EC2.
- Findings have a severity. Send them to EventBridge.
- Block a deploy: a pipeline step fails on Critical or High findings.
- CodeArtifact: private package repository with upstream links to PyPI or npm.
- CodeGuru Reviewer: no new associations since November 7, 2025.
要记住
- CodeGuru Security: ended November 20, 2025.
考试中
- “Scan container images for known vulnerabilities when pushed to ECR” points to Amazon Inspector.
- “Do not deploy if Critical findings exist” points to a pipeline gate that fails on severity.
- “Control which Python packages builds may install” points to AWS CodeArtifact.
- “Find sensitive data in a training bucket” points to Macie, not Inspector.
别和这些弄混
- AI and ML security risksKnow the attacks by name, what each damages, and the control that stops it.
AWS CodePipelineStages and actions that take a change from source to deployment, with approvals and triggers.
- Encryption and data protection for MLEncrypt data at rest with KMS in each place ML touches it, encrypt traffic in transit, and keep secrets out of code.
本任务内容 · 4.3
- Scanning code and images in CI/CD
- Least privilege for ML artifacts
- IAM roles for SageMaker and ML workloads
- Bedrock access control
- Credential types for Bedrock
- Auditing, logging and compliance for ML
- Troubleshooting ML security issues
- Isolating ML systems with VPCs
- Encryption and data protection for ML
- AI and ML security risks
Guardrails