概念 · 基于 AIF-C01
AI and ML security risks
Know the attacks by name, what each damages, and the control that stops it.
本课尚未翻译,暂以英文显示。
你在AI Practitioner中已学过
- Prompt injection hides instructions in input to override the rules.
- Data leakage reveals private data in answers. Poisoned training data bends a model.
- Defend in layers: check inputs and outputs, encrypt, use least privilege, keep an audit trail.
Data poisoning
- What it does
- Teaches wrong behaviour
- Main defence
- Write control, versioning, validation
Model theft
- What it does
- Copies the model
- Main defence
- Least privilege, throttling
Inversion
- What it does
- Recovers training data
- Main defence
- Less personal data in training
Adversarial input
- What it does
- Fools the model
- Main defence
- Input validation, testing
Prompt injection
- What it does
- Overrides instructions
- Main defence
- Guardrails, narrow permissions
Supply chain
- What it does
- Brings in bad code
- Main defence
- Scan, pin, private repository
Excessive agency
- What it does
- Agent acts too widely
- Main defence
- Narrow roles, human approval
| Risk | What it does | Main defence |
|---|---|---|
| Data poisoning | Teaches wrong behaviour | Write control, versioning, validation |
| Model theft | Copies the model | Least privilege, throttling |
| Inversion | Recovers training data | Less personal data in training |
| Adversarial input | Fools the model | Input validation, testing |
| Prompt injection | Overrides instructions | Guardrails, narrow permissions |
| Supply chain | Brings in bad code | Scan, pin, private repository |
| Excessive agency | Agent acts too widely | Narrow roles, human approval |
1 / 3
Data poisoning
- What it does
- Teaches wrong behaviour
- Main defence
- Write control, versioning, validation
Model theft
- What it does
- Copies the model
- Main defence
- Least privilege, throttling
Inversion
- What it does
- Recovers training data
- Main defence
- Less personal data in training
| Risk | What it does | Main defence |
|---|---|---|
| Data poisoning | Teaches wrong behaviour | Write control, versioning, validation |
| Model theft | Copies the model | Least privilege, throttling |
| Inversion | Recovers training data | Less personal data in training |
2 / 3
Adversarial input
- What it does
- Fools the model
- Main defence
- Input validation, testing
Prompt injection
- What it does
- Overrides instructions
- Main defence
- Guardrails, narrow permissions
Supply chain
- What it does
- Brings in bad code
- Main defence
- Scan, pin, private repository
| Risk | What it does | Main defence |
|---|---|---|
| Adversarial input | Fools the model | Input validation, testing |
| Prompt injection | Overrides instructions | Guardrails, narrow permissions |
| Supply chain | Brings in bad code | Scan, pin, private repository |
3 / 3
Excessive agency
- What it does
- Agent acts too widely
- Main defence
- Narrow roles, human approval
| Risk | What it does | Main defence |
|---|---|---|
| Excessive agency | Agent acts too widely | Narrow roles, human approval |
是什么
Data poisoning puts bad examples in training data. Limit who can write to it, turn on S3 versioning and Object Lock, validate data before training, and keep lineage. Model theft copies a model, by stealing files or by asking so many questions that a copy can be trained: use least privilege and encryption, and throttle and monitor calls. Model inversion and membership inference try to recover training data from outputs: keep personal data out of training, return less detail, and test for leakage.
是什么
Adversarial inputs are changed slightly so the model errs: validate inputs, test with adversarial examples and monitor for odd traffic. Prompt injection and jailbreaks target generative AI: use guardrail prompt attack filters, keep trusted instructions apart from untrusted content, and give the model no more access than the user has.
是什么
The supply chain matters too: base images, packages and downloaded models. Scan images, use a private package repository, pin versions and load models only from trusted sources, because some model file formats run code when loaded. An agent with broad permissions turns an injection into real damage: give each tool a narrow role, limit its actions, and require human approval for actions that cannot be undone.
要记住
- Poisoning: control write access, version and validate data.
- Prompt injection: guardrails, separate trusted and untrusted text, narrow permissions.
- Supply chain: scan, pin, trusted sources. Agents: narrow roles and approvals.
考试中
- “Attacker adds bad records to training data” points to data poisoning, stopped by access control and validation.
- “Hidden instructions in a document change the model’s behavior” points to prompt injection and a guardrail prompt attack filter.
- “Agent deleted records it was never meant to touch” points to excessive permissions: narrow roles and human approval.
- “Downloaded model file runs code on load” points to a supply chain risk.
别和这些弄混
- Scanning code and images in CI/CDScan code, dependencies and container images in the pipeline, and stop the release when findings are too severe.
Amazon Bedrock GuardrailsSet content filter strengths, topics, words, PII handling and grounding thresholds, and call the guardrail on any model.
- Least privilege for ML artifactsGive each role the smallest S3 prefix, key, registry and data permission it needs, and use tags to scale the rules.
本任务内容 · 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