Skip to content
AI Skills Central

Type to search Agent Skills, workflows, tutorials, tools and the glossary.

Safety and governance

AI security

Defending against prompt injection, data leakage and over-permissioned agents.

Intermediate
Bookmark

Bookmarks are kept in your free account, so you can find this page again on any device.

Sign in to bookmark
On this page

Overview

AI security deals with the new ways AI systems can be attacked or misused. The central problem is prompt injection: instructions hidden in a web page, email, document or tool result that the model follows as if they came from you. Combined with access to private data and the ability to send data out, it can lead to real leaks.

Defences are layered: give agents the least privilege they need, keep untrusted content away from powerful tools, require approval for sensitive actions, sandbox code execution, review third-party skills and MCP servers before installing them, and red-team your own application. The OWASP Top 10 for LLM Applications is a useful checklist.

What you will practise

  • Recognise direct and indirect prompt injection
  • Remove one leg of the lethal trifecta from risky agents
  • Apply least privilege to tools, tokens and data
  • Red-team your own application and keep the findings as tests

Learning paths

  • Agent Skills essentials

    A free Agent Skills course: learn what SKILL.md packages are, write and share your own, port it across agents and review third-party skills before installing.

    Beginner2 h9 steps

  • Agents and MCP

    An AI agents and MCP course for developers: build a tool-using agent with a clear stop condition, then expose your own data and actions with an MCP server.

    Intermediate10 h13 steps

  • AI foundations

    A free AI foundations course: the working vocabulary of modern AI, from prompting and structured output to retrieval, MCP, Agent Skills and prompt injection.

    Beginner3 h9 steps

  • AI governance for team leads

    An AI governance course for team leads: what the EU AI Act expects, the main LLM security risks, a team AI usage policy and a review of third-party skills.

    Beginner6 h9 steps

  • Evals and safety for LLM features

    Learn LLM evals and safety: catch regressions and attacks before users do, with error analysis, code-based evals, calibrated judges and prompt-injection tests.

    Intermediate9 h9 steps

  • MCP in production

    An MCP course for production use: connect clients, build and test servers for a team, secure remote servers and keep up with changes to the MCP specification.

    Advanced6 h9 steps

  • Production AI agents: approval, multi-agent and evals

    For engineers moving past single-agent demos: add code-level approval gates, context isolation, multi-agent patterns and automated evals you can trust in CI.

    Intermediate9 h10 steps

  • Rolling out coding agents to a team

    Roll out coding agents to a team: shared instruction files, permissions and hooks, spec-first work, agent review in CI and vetted Agent Skills for everyone.

    Intermediate14 h16 steps

Tutorials

  • Add input and output guardrails to an LLM app

    Length, topic and PII checks on input, schema and policy checks on output, then measure false positives and latency on a test set.

    Intermediate50 min

  • Run AI-generated code in a sandbox

    Run model-written Python in a throwaway Docker container, then in an E2B sandbox, with time, memory, network and file limits, and a test suite of hostile code.

    Intermediate1 h

  • Add human approval to agent actions

    Pause risky tool calls, show the exact arguments, resume on approve or reject, then log and test it.

    Intermediate1 h

  • Claude Code hooks: run checks around every tool call

    Write Claude Code PreToolUse and PostToolUse hooks that block destructive shell commands, format every file Claude edits and log each command for later audit.

    Intermediate40 min

  • Permissions and sandboxing for coding agents

    Set up Claude Code permission modes and rules, the Codex sandbox and approvals, and a dev container, so an agent can work without free rein.

    Intermediate45 min

  • Run coding agents headless in CI

    Run claude -p and codex exec in GitHub Actions with pinned versions, narrow permissions, scoped secrets and separate jobs for writing back to the pull request.

    Advanced1 h

  • Secure a remote MCP server with OAuth

    Protect a Streamable HTTP MCP server with OAuth 2.1 as the 2026-07-28 spec requires: resource metadata, audience checks, per-tool scopes and Inspector tests.

    Advanced1 h 15 min

  • Prompt injection basics for builders

    How direct and indirect prompt injection work, why agents with tools raise the stakes, and the design choices that limit the damage when no complete fix exists.

    Beginner30 min

Workflow recipes

Articles

Tools for this skill

9 of 11 tools tagged with this skill.

  • Cisco Skill Scanner

    Open-source Agent Skills scanner using rules, dataflow analysis and an LLM judge.

    Safety and securityOpen sourceCisco AI Defense

  • E2B

    Open-source cloud sandboxes for code that agents run.

    Safety and securityUsage-based, open sourceE2B

  • garak

    Scanner that probes LLMs for vulnerabilities such as prompt injection.

    Safety and securityOpen sourceNVIDIA

  • Guardrails AI

    Python framework of validators that check and correct LLM inputs and outputs.

    Safety and securityOpen sourceGuardrails AI

  • Inspect

    The UK AI Security Institute's open-source framework for LLM and agent evals.

    Evals and observabilityOpen sourceUK AI Security Institute

  • Lakera

    Runtime protection against prompt injection and data leakage, now part of Check Point.

    Safety and securityPaidCheck Point

  • NeMo Guardrails

    NVIDIA's toolkit for programmable input, output and dialogue rails in LLM apps.

    Safety and securityOpen sourceNVIDIA

  • OpenClaw

    Open-source personal agent you message from chat apps.

    AssistantsOpen sourceOpenClaw Foundation

  • promptfoo

    CLI for YAML-defined prompt and model evals, plus red-team scans for injection.

    Evals and observabilityOpen sourceOpenAI

Show 2 more

Key terms

Words you will meet while learning this, defined in the glossary.

Full glossary
  • AI alignment

    The work of making AI systems pursue the goals and values their developers and users intend, and avoid harmful behaviour nobody asked for.

  • Data poisoning

    Tampering with the data used to train a model or build its retrieval index, so that it learns false, biased or hidden behaviour.

  • Deepfake

    AI-generated or altered image, audio or video that shows real people, places or events in a way that could be mistaken for authentic.

  • Dev container

    A container defined by a devcontainer.json file that gives a project a reproducible environment, often used to sandbox agents.

  • Excessive agency

    The risk that an AI system has more permissions, tools or autonomy than is safe, so a mistake or manipulation causes real harm.

  • Jailbreak

    A prompt crafted to get a model to bypass its safety training and produce content it would normally refuse to write, often by role-play.

  • Least privilege

    Granting an agent or tool only the permissions and data access its task requires, and nothing more, so a mistake does less damage.

  • Lethal trifecta

    Access to private data, exposure to untrusted content and a way to send data out: together they make data theft by prompt injection possible.

  • OWASP Top 10 for LLM Applications

    OWASP's list of the most critical security risks in LLM applications, such as prompt injection and excessive agency.

  • Permission mode

    A setting in a coding agent that decides which actions it may take on its own, such as edits or shell commands, and which need approval.

  • Prompt injection

    Input that overrides or subverts a model's instructions, either typed in directly or hidden in content the model reads while it works.

  • Red-teaming

    Deliberately attacking an AI system to find harmful, insecure or embarrassing behaviour before real users or attackers can find it.

  • Sandbox

    An isolated environment that limits what an agent or its code can read, write or reach on the network, so any mistakes stay contained.

  • System prompt leakage

    Exposure of the hidden instructions an app gives its model, usually because a user coaxes the model into repeating them.

  • Tool poisoning

    Malicious instructions hidden in a tool's description, parameters or output that manipulate the agent using it without the user seeing them.

  • Zero data retention

    An arrangement where a model provider does not store your prompts and outputs after responding, apart from contractual exceptions.