08 / 16

Security, Safety & Governance

The model proposes; deterministic systems authorize.

0/13 studied
01Prompt injection (direct & indirect)

LLMs can't reliably tell instructions from data, so any text in context can hijack them. No complete fix exists: limit what a hijacked model can do. The model proposes; deterministic code authorizes.

Core◇ Diagram</> Code
02The lethal trifecta

An agent with private data, exposure to untrusted content and a way to communicate externally can be tricked into leaking that data. Injection can't be prevented, so remove at least one leg.

Core◇ Diagram</> Code
03Jailbreaks

A jailbreak gets a model to violate its own safety policy; the attacker is usually the user. Unlike prompt injection, it attacks the model's training, not your app. Defend in layers: model, classifiers, monitoring.

Core◇ Diagram</> Code
04OWASP Top 10 for LLM apps

OWASP's community list of the ten most critical risks in LLM applications (2026 edition, LLM01–LLM10). Use it as a design-review checklist: for each item, name the control in your architecture or the accepted risk.

Core◇ Diagram</> Code
05Guardrails: input, output, action

Independent checks on what goes into the model, what comes out, and which actions it may take: useful layers that cut risk, while the real boundary is deterministic permissions on actions.

Core◇ Diagram</> Code
06PII & data privacy

Detect and redact or pseudonymize personal data before it reaches the model, logs or indexes; pick providers with no training and short or zero retention; and make deletion reach every copy, vectors and caches included.

Core◇ Diagram</> Code
07Multi-tenant isolation in AI apps

Tenant A must never reach tenant B's data through any path (retrieval, cache, memory, fine-tuned weights, logs): derive the tenant from auth, enforce it server-side at every layer, and prove it with tests.

Advanced◇ Diagram</> Code
08Red teaming AI systems

Attack your own AI system, with expert humans and automated tools, before launch and on every change; rate findings by severity and turn each one into a regression eval.

Advanced◇ Diagram</> Code
09Model & data supply chain

Every model file, dataset, package and MCP server you pull is code or influence you didn't write: load weights as safetensors, pin hashes, scan and sign artifacts, serve only from a vetted internal registry.

Advanced◇ Diagram</> Code
10Alignment & Constitutional AI

Alignment is the post-training that makes a model helpful, honest and harmless; it's statistical, vendor-controlled and shifts between versions, so treat it as a soft layer and re-run your evals on every upgrade.

Advanced◇ Diagram
11Responsible AI: bias, fairness, transparency

Measure quality per user group, not just on average; document what the system is for and where it fails; keep humans able to intervene; and keep monitoring after launch.

Core◇ Diagram</> Code
12EU AI Act

The EU regulates AI by risk tier: some uses are banned, high-risk uses need risk management, logging, human oversight and conformity assessment, chatbots and deepfakes need disclosure, and fines reach €35M or 7% of turnover.

Advanced◇ Diagram</> Code
13NIST AI RMF & ISO/IEC 42001

NIST AI RMF is a voluntary playbook (Govern, Map, Measure, Manage) for finding and treating AI risks; ISO/IEC 42001 is a certifiable management system proving you do it consistently. Run both off one risk register.

Staff+◇ Diagram</> Code