AIP-C01 · D3 · 20%

AI Safety, Security, and Governance

Defend inputs, outputs, identities, data, models, tools, and decisions while operationalizing privacy, compliance, responsible AI, and human oversight.

Provider facts checked 2026-08-03

Objective coverage

Objective 3.1 · high

Implement input and output safety

Layer validation, prompt-injection defenses, content controls, output schemas, grounding, policy checks, and safe failure behavior.

Lesson
d3-lesson
Practice pool
d3-questions
Application
aip-l05
Objective 3.2 · high

Protect data security and privacy

Apply identity, encryption, private connectivity, tenancy boundaries, minimization, masking, retention, and traceable access.

Lesson
d3-lesson
Practice pool
d3-questions
Application
aip-l02, aip-l05
Objective 3.3 · high

Implement AI governance and compliance

Define ownership, inventory, approval, evidence, monitoring, change control, exception handling, and regulatory mapping.

Lesson
d3-lesson
Practice pool
d3-questions
Application
aip-l05, aip-l06
Objective 3.4 · high

Apply responsible AI

Evaluate fairness, harmful behavior, transparency, explainability, human oversight, misuse, and affected-user consequences.

Lesson
d3-lesson
Practice pool
d3-questions
Application
aip-l05, aip-l06

Decision frame

The model is not a security boundary. It can interpret instructions and produce useful classifications or drafts, but deterministic systems must enforce identity, authorization, data access, transaction rules, budgets, and prohibited actions. Safety is a layered system spanning the user interface, input processing, retrieval, prompt construction, model, tools, output validation, monitoring, governance, and incident response.

Threat-model the entire data and action flow. Identify trusted and untrusted inputs, tenant boundaries, privileged tools, external content, data stores, model providers, logs, reviewers, and downstream consumers. Then assign each control to the layer that can actually enforce it.

Objective map

ObjectiveRequired judgmentProof
3.1 Implement input and output safetyCombine validation, injection defenses, content controls, grounding, schemas, policy, and safe failureA representative attack set cannot trigger prohibited disclosure or action
3.2 Protect data security and privacyApply identity, encryption, private paths, minimization, masking, tenancy, retention, and access evidenceProtected data is unavailable across unauthorized identities and tenants
3.3 Implement AI governance and complianceEstablish inventory, owners, approvals, evidence, monitoring, change, incidents, exceptions, and mappingEach production use case has accountable lifecycle records and current controls
3.4 Apply responsible AIEvaluate fairness, harmful behavior, transparency, explainability, oversight, misuse, and affected usersKnown impact groups and failure modes have tests, thresholds, and response owners

Input and context safety

Classify inputs by origin and trust. User text, uploaded files, retrieved documents, websites, emails, tool results, and memory can all contain direct or indirect prompt injection. Delimit untrusted content and instruct the model to treat it as data, but do not rely on prompt wording alone. Limit what content is retrieved, which tools are available, what identities they use, and which actions require approval.

Validate file type, size, encoding, structure, malware where applicable, and extraction behavior. Remove or mask unnecessary sensitive data before model invocation. Use an allowlist for supported content and reject ambiguous parser states. Track provenance so output can be connected to its input and source version.

Amazon Bedrock Guardrails can apply supported content, denied-topic, sensitive-information, and grounding-related policies in designed flows. A guardrail does not replace IAM, tenant filtering, tool authorization, or application-specific correctness checks. Test guardrail versions on representative normal and adversarial traffic, measure both misses and false positives, and define behavior when the guardrail intervenes or is unavailable.

Output and action safety

Validate structure before using generated output. Parse into an explicit schema; reject extra fields, invalid values, unsupported citations, and malformed tool requests. Apply business rules and authorization after parsing. For factual answers, require supported evidence or a clear uncertainty response. For code, configuration, or security guidance, use review and testing appropriate to impact.

Separate content safety from action safety. A polite response can still request an unauthorized refund or data export. A harmful-looking string may be legitimate evidence in a security workflow. Evaluate the task, authenticated user, target resource, policy, and consequence in deterministic code. Require human approval for irreversible or high-impact changes and show reviewers enough context to make an informed decision.

Design safe failure. Do not expose system prompts, hidden context, credentials, policy internals, or another tenant's data in an error. Do not silently proceed when output validation fails. Give users a bounded explanation and a next safe step. Preserve privacy-safe evidence for investigation.

Data security and privacy

Use least-privilege service and workload roles. Restrict model invocation, knowledge-base access, data sources, vector stores, prompt resources, agents, tools, keys, logs, and deployment actions separately. Use private connectivity where the requirement warrants it and verify DNS and endpoint policies. Encrypt data in transit and at rest, but also minimize collection and access.

Partition tenant data before context assembly. Test cross-tenant retrieval, cache, memory, log, and tool paths. Decide whether prompts and model invocations may be logged; invocation logging can be valuable but may capture sensitive data. Redact or omit sensitive values and scope telemetry access. Define retention and deletion for prompts, outputs, embeddings, feedback, evaluation records, and backups.

Governance and responsible AI

Maintain an inventory of production AI use cases, owners, models, data sources, purposes, impacted users, risk tier, controls, evaluations, approvals, Regions, dependencies, and review dates. Record provider and model changes. Separate experimental access from production approval. An exception must identify risk owner, rationale, compensating controls, expiry, and retest.

Responsible AI is context-specific. Assess harmful content, stereotyping, disparate quality, accessibility, transparency, explainability needs, overreliance, misuse, and consequences for people affected by the output. Use representative datasets and human review where judgment is required. Average quality can hide severe failure for a small group or critical scenario, so maintain hard thresholds for unacceptable outcomes.

Tell users when they interact with AI where appropriate, identify limitations, and provide correction or escalation paths. Human oversight must be meaningful: reviewers need time, authority, evidence, and a usable way to reject or amend output. A rubber-stamp approval does not reduce risk.

Decision patterns

RiskEnforce primarily inEvidence
Cross-tenant retrievalIdentity, data partition, metadata filters, resource policiesIsolation tests with adversarial queries
Prompt injectionContext boundaries plus authorization and tool constraintsDirect and indirect injection suite
Harmful contentGuardrails, application policy, human review where neededSafety metrics and reviewed cases
Invalid structured outputSchema parser and business validationRejected malformed and extra-field cases
Excessive agencyScoped tool roles, budgets, approvals, stop conditionsDenied mutation and bounded-loop tests
Privacy leakage through logsMinimization, redaction, access, retentionTelemetry inspection and access review

Scenario drill

A recruiting assistant summarizes résumés, ranks candidates, and drafts interview recommendations.

  1. Define the legitimate purpose, accountable owner, impacted users, prohibited uses, and human decision authority.
  2. Minimize candidate data and prevent résumé content from changing system instructions or tool access.
  3. Evaluate quality across relevant roles and groups; inspect false negative and harmful recommendation patterns.
  4. Do not let the model make the employment decision. Present evidence, limitations, and review controls.
  5. Protect prompts, résumés, embeddings, outputs, logs, and feedback with explicit retention and deletion.
  6. Monitor drift, complaints, overrides, and adverse outcomes; pause the system when a hard threshold fails.

Common traps

  • Asking the model to enforce permissions over data it has already received.
  • Treating a guardrail as a complete prompt-injection defense.
  • Logging raw prompts to improve observability without a privacy decision.
  • Measuring only mean accuracy and ignoring critical or group-specific failure.
  • Labeling a workflow human-in-the-loop when the reviewer lacks evidence or authority.
  • Publishing a responsible-AI statement without inventory, tests, owners, and incident response.
  • Blocking unsafe text while allowing unsafe tool actions.

Self-check

  1. Place each control for a tool-using RAG system at the layer that can enforce it.
  2. Design one indirect prompt-injection test and the expected denial evidence.
  3. Explain what Guardrails does not replace.
  4. Define a meaningful human approval step for a high-impact action.
  5. List the data stores that need privacy retention and deletion rules beyond the source corpus.

Primary references