AI Security & Guardrails Cheat Sheet

By Syncfusion®, Inc. · Last updated

Every attack, control, OWASP entry, linter rule and coding-agent setting from the AI Security course on one page.

What you will learn

  • Look up the control for any OWASP LLM or ASI entry
  • Find the coding-agent setting for each control

AI Security Cheat Sheet

Every attack, control and setting from the course on one page. Use it as a lookup when you review an AI feature or a coding agent's settings.

The One Rule

You cannot prompt your way to security. Rank defences from strongest to weakest:

  1. Architecture: the capability is not there (no secret in the prompt, no email tool on the reader agent).
  2. Permissions: least privilege, scoped to the signed-in user, approvals for exceptions.
  3. Deterministic checks outside the model: encoding, schemas, allow-lists, caps.
  4. Classifiers: useful signals with false positives.
  5. Prompt instructions: speed bumps, never enough alone.

The lethal trifecta test: private data + untrusted content + a way out, in one agent. Remove a leg.

OWASP Map

EntryNameLessonStrongest control in the course
LLM01Prompt Injection2, 3, 12, 14Controls outside the model; break the trifecta; hooks
LLM02Sensitive Information Disclosure4Tool-layer scoping; PII filter; log redaction
LLM03Supply Chain10, 14Pinned MCP allow-list; dependency check
LLM04Data and Model Poisoning9Ingestion check and quarantine
LLM05Improper Output Handling5Encoding; validated filter + parameters
LLM06Excessive Agency6, 13Minimal tools; scoped tools; refund gate; agent lock-down
LLM07System Prompt Leakage2No secrets in the prompt; output check
LLM08Vector and Embedding Weaknesses9Tenant filter in the query
LLM09Misinformation9Approved sources only; citations
LLM10Unbounded Consumption11Per-user rate, token, spend and step caps; alerts
ASI01, ASI06Goal Hijack; Memory and Context Poisoning8Memory provenance
ASI03, ASI07Identity and Privilege Abuse; Inter-Agent Communication8Caller's permissions; handoffs are data
ASI04Agentic Supply Chain10Pinned MCP allow-list
ASI08Cascading Failures8, 11Step cap

Pipeline Stages

StageControls
1. InputInjection classifier (signal); your checkInput
2. ModelSecrets out; reader agent; minimal tools; memory provenance; handoff check; labels
3. OutputcheckOutput; PII filter (others only); safe rendering
4. ActionsRefund gate; scoped tools; validated report filter; egress allow-list; step cap
5. DataIngestion check; tenant filter; log redaction
6. LimitsRate, tokens, spend per user; trace alerts

Linter Rules (Hints Only)

RuleFires whenFix in
unlabelled-untrustedRetrieved text goes into the prompt unlabelledLesson 3
side-effect-no-approvalA side-effect tool has no gateLesson 6
unscoped-dataTools are not scoped to the userLesson 4
unencoded-outputReplies render as raw HTML, or the model writes SQLLesson 5
no-capsNo rate, token, spend or step capsLesson 11
trifectaOne agent has all three legsLesson 3

Coding-Agent Settings

ControlClaude CodeCodexCursor
File.claude/settings.json.codex/config.toml.cursor/cli.json, .cursor/hooks.json, .cursorignore
Deny secret readspermissions.deny: ["Read(./.env)"], sandbox.filesystem.denyReadKeep secrets outside the workspace; hookdeny: ["Read(**/.env)"], .cursorignore
Sandboxsandbox.enabledsandbox_mode = "workspace-write"Container or VM
Networksandbox.network.allowedDomains[sandbox_workspace_write] network_accessdeny: ["Shell(curl)"]
Commandspermissions.allow: ["Bash(npm test)"]approval_policy = "on-request"allow: ["Shell(npm)"]
Hookshooks.PreToolUse (exit 2 blocks)[[hooks.PreToolUse]] with features.hooksbeforeShellExecution etc. (permission: deny)
Project MCPenableAllProjectMcpServers: false, enabledMcpjsonServersOnly reviewed mcp_serversbeforeMCPExecution hook

Sources: Claude Code settings, Claude Code hooks, Codex configuration reference, Cursor CLI permissions. Checked October 2026; re-check each release.

Secrets, Models and Incidents

TopicDo thisLesson
Secrets at run timeSecret store + managed identity or IAM role; cache a few minutes; rotate; never log the value2
Secret scanninggitleaks pre-commit hook + CI on every pull request; allow-list fixtures with a reason13
A committed keyRotate first, then clean the history; forks and CI logs keep it2, 13
Model weightsPin a commit, check the hash, prefer safetensors, check the licence10
Model vendorNo training on your data, stated retention, your region, SOC 2 / ISO 27001, pinned model versions10
IncidentAlert → session timeline → where the content came from; traces keep tool arguments11

Error Index

Lab messageMeaningWhere to look
Prompt-only defenceOnly prompt-level controls were onAdd a control outside the model
Over-blockingHonest requests failedLoosen the control; check its threshold or limit
Got through: FAMILY, VARIANT → EFFECTOne variant beat your defenceThat family's lesson
Your guardrail code threw an errorcheckInput or checkOutput crashed, so it let requests throughFix the code; guard with try/catch
Honest coding task blockedA lock-down setting broke build, test or installNetwork allow-list, command allow-list

Compliance Pointers

FrameworkWhat it asks forPack file
EU AI Act, Article 15 (high-risk systems)Accuracy, robustness and cybersecurity, including against data poisoning and adversarial inputsthreat-model.md, tests/attacks.test.ts
NIST AI RMF (Govern, Map, Measure, Manage)Map risks, measure them, manage with controlsthreat-model.md (Map), attack suite (Measure), guardrails (Manage)

This is a pointer, not legal advice. Ask your compliance team which obligations apply to your system.