SkillHack

How to become an AI Security Engineer

Step by step and free: 12 phases, 90 topics and 293 graded practice questions.

Practise this roadmap free

What is an AI Security Engineer?

An AI security engineer protects systems built on language models and agents from attack, misuse and data leakage. They threat-model AI features, design defences against prompt injection, scope agent tools and credentials, secure MCP connections and the model supply chain, and harden inference platforms. They work with product engineers, red teams and incident responders, writing controls, detection rules and security reviews that still hold after the model changes.

Who this roadmap is for

Application security engineers, cloud security engineers and backend developers who already understand authentication, authorisation and common web vulnerabilities, and now have AI features to secure. Knowing how LLM applications call tools helps. It is not for people new to security fundamentals, or for those who only want to attack systems rather than defend them.

What you will be able to do

You will be able to threat-model an LLM application, layer defences against prompt injection, scope agent tools and MCP access, protect data across prompts, logs and retrieval, vet models and datasets in the supply chain, secure training and inference infrastructure, test defences in CI, respond to AI incidents and map your controls to recognised frameworks.

The AI Security Engineer roadmap

AI Security Engineer

  1. Phase 1 Foundations of AI security

  2. Phase 2 Prompt injection and jailbreak defence

  3. Phase 3 Secure design for LLM applications

  4. Phase 4 Agent, tool and execution security

  5. Phase 5 Data protection and privacy

  6. Phase 6 AI supply chain security

  7. Phase 7 Model and training pipeline security

  8. Phase 8 AI platform and infrastructure security

  9. Phase 9 Security testing and assurance

  10. Phase 10 Detection and response

  11. Phase 11 AI in security operations

  12. Phase 12 Standards, governance and the security programme

All topics, in order

Mark each topic Learning, Done or Skip, and sign in to save your place to your account. Done is your own word, not passing: a topic is passed when you score 50 or more on its questions. This order is the study plan.

  1. Phase 1 · Foundations of AI security

    1. What an AI security engineer does

      An AI security engineer makes sure an AI feature cannot be turned against its users or its owner: you threat model it before it is built, design it so one injected instruction can do little, enforce permissions outside the model and watch it in production. Red teamers find the holes and safety teams set content policy; you own the controls that close the holes and the evidence that they hold.

      Test yourself on this topic

      3 graded questions · scored out of 100 with feedback · free

      Start the 3 questions
    2. The parts of an AI system you secure

      A production AI feature is more than a model: a system prompt, retrieved documents, tools and their credentials, memory, the code that renders output, a model provider or inference server, and the logs of all of it. Each part has its own owner and its own way to fail, and real attacks usually chain two or three of them. Draw the whole data flow, including the parts nobody calls AI, before you judge any one control.

      Test yourself on this topic

      3 graded questions · scored out of 100 with feedback · free

      Start the 3 questions
    3. The LLM threat model

      A model follows instructions wherever they appear in its context, so the first question in an LLM threat model is who can put text there: the user, anyone who wrote a document it retrieves, any web page, email or tool result it reads. Treat each of those writers as a possible attacker, then ask what the model can reach and do on their behalf. A threat model that lists only the user as untrusted misses most of the real attacks.

      Test yourself on this topic

      4 graded questions · scored out of 100 with feedback · free

      Start the 4 questions
    4. Trust boundaries and untrusted input

      A trust boundary is where text from someone you do not control enters something that acts. In an AI system those boundaries sit inside the context window: your instructions on one side, user input, retrieved documents and tool results on the other. The model cannot be relied on to keep them apart, so you track provenance yourself, carry it through summaries and hand-offs, and let only trusted inputs decide what the system may do.

      Test yourself on this topic

      4 graded questions · scored out of 100 with feedback · free

      Start the 4 questions
    5. Classic security still applies

      Many failures in AI features are ordinary bugs around the model: an endpoint with no authorisation check, an exposed API key, SQL or shell commands built from model output, a URL fetch tool that can reach internal addresses. The model adds new risks without removing any old ones. Run the usual application security review first, then treat the model as one more untrusted component whose output is validated like user input.

      Test yourself on this topic

      3 graded questions · scored out of 100 with feedback · free

      Start the 3 questions
    6. The OWASP Top 10 for LLM applications

      The OWASP Top 10 for LLM Applications is the shared vocabulary for LLM risks: prompt injection, sensitive information disclosure, supply chain, data and model poisoning, improper output handling, excessive agency, leaked system prompts and hidden context, vector store weaknesses, misinformation and unbounded consumption. Use it as a coverage check in a review, never as proof of safety, and say which edition you used: as of November 2026 there is a 2025 and a 2026 edition.

      Test yourself on this topic

      4 graded questions · scored out of 100 with feedback · free

      Start the 4 questions
    7. The OWASP Top 10 for agentic applications

      Agents get their own OWASP list, the Top 10 for Agentic Applications, because autonomy changes the risks: content an agent reads can hijack its goal, tools can be misused within their permissions, delegated identity and privilege can be abused, memory can be poisoned and one agent's failure can cascade through others. The principle running through it is least agency: give an agent only the autonomy the task needs, not just the least access.

      Test yourself on this topic

      3 graded questions · scored out of 100 with feedback · free

      Start the 3 questions
    8. MITRE ATLAS and the NIST attack taxonomy

      MITRE ATLAS catalogues how attackers go after AI systems as tactics and techniques, in the style of ATT&CK, with case studies of real incidents. NIST AI 100-2 gives a matching taxonomy of attacks and mitigations, from evasion and poisoning to prompt injection and agent hijacking. Tag findings, detections and controls with these names so your team, vendors and auditors mean the same thing, and so you can see which techniques nothing covers.

      Reading

      Test yourself on this topic

      3 graded questions · scored out of 100 with feedback · free

      Start the 3 questions

    Chapter 1 lab

    Write the instruction for an assistant that reviews a pull request adding an LLM feature

    A prompt lab that closes the chapter: you write the instruction, and it is graded on a rubric.

    Start the lab
  2. Phase 2 · Prompt injection and jailbreak defence

    1. Why prompt injection has no complete fix

      Prompt injection works because a model reads instructions and data as one stream of tokens, with no enforced separation between them. Training, delimiters and classifiers lower the success rate, but adaptive attackers keep finding wordings that get through, so no filter makes it zero. The working rule is to assume some injection will succeed and to design the system so that a hijacked model cannot reach anything that matters.

      Test yourself on this topic

      3 graded questions · scored out of 100 with feedback · free

      Start the 3 questions
    2. Direct prompt injection

      Direct injection is a user typing instructions meant to override yours, from asking for the system prompt to talking the assistant into a forbidden action. Its blast radius is whatever that user can make the system do, so the defence is to give the session no more power than the user already holds and to enforce every limit in code. A prompt rule saying user text is data helps a little, and must never be the only control.

      Test yourself on this topic

      4 graded questions · scored out of 100 with feedback · free

      Start the 4 questions
    3. Indirect prompt injection

      Indirect injection hides the instruction in content the model reads later: a web page, an email, a shared document, a code comment, a tool result. The attacker never talks to your system, and the victim is whichever user's session reads the content, often with that user's data and permissions in reach. Record which untrusted sources each run read, and once a run has read one, narrow what it may still do.

      Test yourself on this topic

      4 graded questions · scored out of 100 with feedback · free

      Start the 4 questions
    4. Defending image, audio and file inputs

      Multimodal models read instructions from pixels, audio and file contents too: pale text on a pale background, words inside an image, a sentence in a transcript, metadata in a PDF. A text-only filter never sees these, and a person glancing at the file may not either. Treat every image, recording and upload as untrusted input under the same capability limits as text, and test your filters on the formats your product actually accepts.

      Test yourself on this topic

      3 graded questions · scored out of 100 with feedback · free

      Start the 3 questions
    5. Instruction hierarchy and model-level defences

      Some providers train models to rank instructions by source, system above developer above user above tool output, so a line in a retrieved page carries less weight than your system prompt. Research methods such as structured queries and preference training push the same way. This raises the cost of many attacks and is worth having, but it is a learned tendency that varies by model and version, not an enforced rule, so count it as one layer and keep hard limits in code.

      Test yourself on this topic

      3 graded questions · scored out of 100 with feedback · free

      Start the 3 questions
    6. Injection detection classifiers

      An injection classifier is a small model that scores text for instructions aimed at the AI, run on user input and on retrieved or tool content before the main model sees it; Meta's Prompt Guard is an open example and most guardrail vendors sell one. They catch known patterns cheaply, miss novel or adaptive ones and flag harmless text that only sounds like an order, so set the threshold on your own traffic and never let a pass unlock a risky action.

      Test yourself on this topic

      3 graded questions · scored out of 100 with feedback · free

      Start the 3 questions
    7. System prompt and hidden context exposure

      Assume a determined user can read back anything in the context window: the system prompt, hidden instructions, retrieved snippets the interface never shows, other tools' output. So nothing in there should be a secret or a source of authority: no API keys, no internal addresses you would not publish, no rule such as admins may skip checks that a user could simply claim. A leaked prompt is an embarrassment; leaked credentials or permission logic are an incident.

      Test yourself on this topic

      3 graded questions · scored out of 100 with feedback · free

      Start the 3 questions
    8. Jailbreak defence in depth

      A jailbreak talks the model out of its own rules, and attackers can rephrase faster than you can add blocked phrases, so a growing blocklist is a sign of the wrong defence. Hold the line with layers that fail independently: the model's own training, an input classifier, an output classifier that judges what was actually produced, and capabilities that limit what a jailbroken model can do. Measure over-blocking of real users with every tightening.

      Test yourself on this topic

      4 graded questions · scored out of 100 with feedback · free

      Start the 4 questions
    9. Guardrail layers in the request path

      Guardrails are checks that run before the model sees a request and after it answers, and where they sit decides what they can stop. For each one, decide whether it fails open or closed when it errors or times out, how much latency it adds, and how it works with streaming, since a streamed answer reaches the user before a full output check can finish. Log every block with its reason so you can tune false positives later.

      Test yourself on this topic

      3 graded questions · scored out of 100 with feedback · free

      Start the 3 questions

    Chapter 2 lab

    Write the untrusted-input framing for an email-summarising assistant

    A prompt lab that closes the chapter: you write the instruction, and it is graded on a rubric.

    Start the lab
  3. Phase 3 · Secure design for LLM applications

    1. Security requirements for an AI feature

      Write security requirements before the build, starting from abuse cases: who might misuse this feature, through which input, to reach what. Turn each one into a requirement a test can check, such as an answer never contains another tenant's records, or the agent cannot email outside the company without approval. Requirements written as outcomes survive prompt rewrites and model swaps, because they describe what must never happen, not the wording meant to prevent it.

      Test yourself on this topic

      3 graded questions · scored out of 100 with feedback · free

      Start the 3 questions
    2. The lethal trifecta and the rule of two

      An agent becomes a data theft tool when it combines three things: access to private data, exposure to untrusted content, and a way to send data out. Meta's rule of two widens the third to any action that changes state or communicates externally, and says a session should hold at most two of the three unless a human supervises. Use it as a design check: list which of the three each agent has, and remove one before you reach for a filter.

      Test yourself on this topic

      4 graded questions · scored out of 100 with feedback · free

      Start the 4 questions
    3. Design patterns that resist injection

      Several patterns limit what an injection can achieve by limiting what the model decides. An action selector only picks from fixed actions and never sees tool output; plan then execute fixes the plan before untrusted content is read; a dual LLM setup lets a quarantined model read untrusted text while a privileged one only handles references to it; map and reduce processes each untrusted item alone. Each costs flexibility, so choose the most constrained one the task can live with.

      Test yourself on this topic

      4 graded questions · scored out of 100 with feedback · free

      Start the 4 questions
    4. Capabilities and data flow control

      Data flow control tracks where each value in an agent run came from and attaches rules to it, so policy in code, not the model, decides whether an address read from an untrusted document may become the recipient of an email. Google DeepMind's CaMeL is the best known design: a privileged model writes the plan as code, a quarantined model parses untrusted data, and an interpreter enforces each value's capabilities. It gives guarantees filters cannot, at a cost in flexibility and engineering.

      Test yourself on this topic

      3 graded questions · scored out of 100 with feedback · free

      Start the 3 questions
    5. Improper output handling

      Whatever the model writes, an attacker may have chosen it, so model output is untrusted input to every system downstream. Rendered as HTML it can be cross-site scripting, passed to a database it can be SQL injection, run as a command it is remote code execution, and fetched as a URL it can be request forgery. Validate it against a schema, encode it for where it is going, and use parameterised calls, exactly as you would for user input.

      Test yourself on this topic

      4 graded questions · scored out of 100 with feedback · free

      Start the 4 questions
    6. Authorisation outside the model

      The model must never be the component that decides whether an action is allowed. Every tool call should carry the identity of the user it acts for and pass the same permission check that user's own request would, in code the model cannot argue with. If a user cannot delete a record through the normal interface, the agent acting for them cannot either, whatever its instructions say, and a denied call is logged rather than retried with other wording.

      Reading

      Test yourself on this topic

      3 graded questions · scored out of 100 with feedback · free

      Start the 3 questions
    7. Human approval that protects

      A human approval step protects only if the person sees the real action rather than the model's summary of it: the actual recipient, amount, command or diff. Ask rarely, on actions that are hard to undo, or people learn to click yes without reading. Build the gate into the system so the model cannot skip it, split one risky action into several small ones, or word the request to mislead, and log who approved what.

      Test yourself on this topic

      3 graded questions · scored out of 100 with feedback · free

      Start the 3 questions
  4. Phase 4 · Agent, tool and execution security

    1. Least-privilege tool scoping

      Excessive agency is what turns a hijacked prompt into a breach, so every tool gets the smallest credential its task needs: read-only by default, one resource type, one tenant, short-lived. Split read and write tools so a lookup agent holds no refund or delete power at all, and make each agent's access revocable in seconds. A prompt telling the model to only read is a request; a read-only token is a control.

      Test yourself on this topic

      4 graded questions · scored out of 100 with feedback · free

      Start the 4 questions
    2. Agent identity and delegated credentials

      An agent should be its own principal in your identity system, not a borrowed password or a shared admin key, so its actions can be scoped, logged and revoked on their own. When it acts for a user it should hold a short-lived token delegated by that user and limited to the task, so it can never do more than both the user and the agent are allowed. OAuth token exchange and workload identity standards supply the building blocks.

      Test yourself on this topic

      4 graded questions · scored out of 100 with feedback · free

      Start the 4 questions
    3. Securing MCP connections

      Connecting an MCP server gives it a voice in the model's context: its tool names and descriptions are read as instructions and its results are untrusted input. A malicious or compromised server can hide instructions in a tool description, change a tool's definition after you approved it, or pose as a trusted server under a similar name. Allowlist servers by verified identity, pin and review tool definitions, alert when they change, and run local servers with minimal permissions.

      Test yourself on this topic

      4 graded questions · scored out of 100 with feedback · free

      Start the 4 questions
    4. MCP authorisation

      Remote MCP servers authorise clients with OAuth: the client obtains a token for that specific server, and the server must check the token was issued for it before acting. A server must never accept a token meant for someone else or pass the client's token through to an upstream API, because that makes it a confused deputy acting with authority it was never granted. Review each server's consent, audience and scope handling before it goes live.

      Reading

      Test yourself on this topic

      3 graded questions · scored out of 100 with feedback · free

      Start the 3 questions
    5. Sandboxing execution

      When an agent runs code or commands it wrote, the sandbox is the control that matters, and the runtime must enforce it; asking the model to be careful is not isolation. A real sandbox has no ambient credentials, a filesystem limited to the task, default-deny network egress with an allowlist, and limits on time, memory and processes. Containers share the host kernel, so for untrusted code at scale a user-space kernel such as gVisor or a microVM gives a stronger boundary.

      Reading

      Test yourself on this topic

      4 graded questions · scored out of 100 with feedback · free

      Start the 4 questions
    6. Protecting agent memory

      Persistent memory lets an agent carry facts between sessions, which also lets an attacker who injects once stay for good: a planted memory such as always copy reports to this address comes back as trusted context in every later run. Write to memory only from trusted sources or with the user's confirmation, store where each memory came from, let users see and delete them, and treat recalled memories as untrusted when deciding on risky actions.

      Test yourself on this topic

      3 graded questions · scored out of 100 with feedback · free

      Start the 3 questions
    7. Trust between agents

      When agents call other agents, each message is natural language written by a model that may itself be hijacked, so a peer's request is untrusted input, not an order from a colleague. Authenticate every agent you accept work from, give each the narrowest set of things it may ask of you, and never let one agent's request carry another's privileges. Protocols such as A2A define identity and authentication fields, but your code still has to check them.

      Test yourself on this topic

      3 graded questions · scored out of 100 with feedback · free

      Start the 3 questions
    8. Securing browser and computer-use agents

      A browser or computer-use agent reads every page it visits as input and can click, type and submit with your session, so any site it lands on can try to steer it. Run it in an isolated browser profile without logins it does not need, limit it to sites the task requires, require confirmation before purchases, sign-ins, downloads and form submissions, and log where it goes. Expect injected instructions in page text, images and ads.

      Test yourself on this topic

      3 graded questions · scored out of 100 with feedback · free

      Start the 3 questions
    9. Coding agents and developer machines

      A coding agent reads repository files, issues, pull request comments and package docs, any of which an outsider may have written, while holding a shell and often your credentials. That makes a hostile README or issue a route to running commands on a developer laptop or in CI. Run coding agents with scoped tokens, a sandboxed shell, network allowlists and approval for commands outside a safe list, and give a CI agent only the secrets that one job needs.

      Test yourself on this topic

      3 graded questions · scored out of 100 with feedback · free

      Start the 3 questions

    Chapter 4 lab

    Write the prompt for a tool-permission scope reviewer

    A prompt lab that closes the chapter: you write the instruction, and it is graded on a rubric.

    Start the lab
  5. Phase 5 · Data protection and privacy

    1. Sensitive data in prompts and logs

      Every prompt you log, trace you keep and eval set you build from real traffic is a new copy of user data, often readable by more people than the production database. Treat it like any other store: log only the fields an investigation needs, redact personal data before it is written rather than in a nightly job, restrict who can read traces, and set a retention period that actually deletes them.

      Test yourself on this topic

      4 graded questions · scored out of 100 with feedback · free

      Start the 4 questions
    2. Output channels and exfiltration

      An injected model needs no network access to leak data: it only has to write a link or an image whose address carries the secret, and the user's browser fetches it on render. Treat model output as untrusted, load images only from domains you allow, show links as text or behind a click, and block tool calls that send data somewhere the task never needed. Filters that hunt for secrets in output are a backstop, not the control.

      Test yourself on this topic

      4 graded questions · scored out of 100 with feedback · free

      Start the 4 questions
    3. Multi-tenant data isolation

      In a shared assistant the worst leak is one customer's data in another customer's answer, and it usually comes through a shared index, a shared memory or a cache keyed without the tenant. Put the tenant on every key and apply it as a filter the server takes from the authenticated session, never from the prompt, and give high-value tenants separate indexes. Prove it with a test that plants data as tenant A and searches for it as tenant B.

      Test yourself on this topic

      4 graded questions · scored out of 100 with feedback · free

      Start the 4 questions
    4. Permission-aware retrieval

      A retrieval system that indexes a whole document store will hand a junior employee the board minutes, because the model cannot tell who may read what. Copy each document's access list into the index, filter every search by the asking user's identity at query time, and keep those lists in sync when permissions change or files are deleted. Never ask the model to withhold what it was given: if a chunk reached the context, assume it can reach the user.

      Test yourself on this topic

      4 graded questions · scored out of 100 with feedback · free

      Start the 4 questions
    5. Vector stores and embeddings

      Embeddings look like meaningless numbers, but research shows they can be inverted to recover much of the original text, so an index of customer documents is as sensitive as the documents. Access-control and encrypt the vector store like a database, keep it off the public internet and log who queries it. Guard the write side too: anyone who can add documents to the corpus can plant text that retrieval will surface for the right question.

      Test yourself on this topic

      3 graded questions · scored out of 100 with feedback · free

      Start the 3 questions
    6. Model provider data handling

      Sending a prompt to a hosted model hands that data to another company, so find out what it does with it: how long inputs and outputs are kept, whether they are used for training, who can review them for abuse and in which region they are processed. API terms usually differ from consumer app terms, and zero-retention options often need approval and can exclude features. Record the answers per provider and recheck them when you add a feature.

      Test yourself on this topic

      3 graded questions · scored out of 100 with feedback · free

      Start the 3 questions
    7. Secrets in prompts, context and code

      Anything placed in a model's context can come back out in an answer, a log or a tool call, so a key in a system prompt or a retrieved config file is a key you have half published. Keep credentials in the tool layer, where code attaches them to the outbound request after the model has decided, and scan prompts, traces and indexed documents for secrets before they are stored. When one leaks, rotate it: deleting the log line revokes nothing.

      Test yourself on this topic

      3 graded questions · scored out of 100 with feedback · free

      Start the 3 questions
    8. Staff AI use and data leakage

      Staff paste source code, contracts and customer records into whichever AI tool is quickest, so your job is to make the sanctioned path the easy one and to see the rest. Offer approved tools under business terms, put them behind single sign-on or a gateway so use is logged, and use data loss prevention and browser controls to flag sensitive data heading to unapproved AI sites. Blocking everything mostly moves use to personal phones, where you see nothing.

      Test yourself on this topic

      3 graded questions · scored out of 100 with feedback · free

      Start the 3 questions

    Chapter 5 lab

    Write the instruction for an agent that reviews a service's prompt logging

    A prompt lab that closes the chapter: you write the instruction, and it is graded on a rubric.

    Start the lab
  6. Phase 6 · AI supply chain security

    1. The AI supply chain

      Every model, dataset, plugin, MCP server and AI library you adopt runs with your application's trust, and public registries have already served malicious models and lookalike packages. Treat each as a dependency: check who publishes it, pin an exact version or hash, review what it can reach, run it with the least access that works, and take updates through review rather than automatically. Keep a list of what you use, so a compromise elsewhere becomes a lookup, not a hunt.

      Test yourself on this topic

      4 graded questions · scored out of 100 with feedback · free

      Start the 4 questions
    2. Unsafe model files and deserialisation

      Many model files are Python pickles, and loading a pickle runs whatever code its author put inside, so opening an untrusted checkpoint is the same as running an untrusted program. Prefer formats that hold only tensors, such as safetensors, convert third-party weights in an isolated environment, and use your framework's safe loading options, like weights-only loading in PyTorch. Treat any flag that allows remote or custom code as a code review, not a setting.

      Test yourself on this topic

      3 graded questions · scored out of 100 with feedback · free

      Start the 3 questions
    3. Scanning models before use

      Model scanners open a file without running it and look for the imports and code paths a malicious payload needs, and the large hubs scan uploads too. Make scanning a gate in the pipeline that brings models in, but know its limits: it finds unsafe constructs in serialised files, not a backdoor trained into the weights or a model that misbehaves on cue. A clean scan means the file is probably safe to load, not that the model is safe to trust.

      Test yourself on this topic

      3 graded questions · scored out of 100 with feedback · free

      Start the 3 questions
    4. Model signing and provenance

      A hash tells you a file has not changed; a signature tells you who produced it, which is what you need before deploying a model someone else trained or tuned. Sign model artefacts when your pipeline builds them, verify the signature and the signer's identity at deploy time, and refuse unsigned models in production. The OpenSSF model signing project, built on Sigstore, signs whole model directories of any format and logs each signing publicly.

      Test yourself on this topic

      3 graded questions · scored out of 100 with feedback · free

      Start the 3 questions
    5. AI bills of materials

      When a popular model or dataset turns out to be poisoned or mislicensed, the first question is whether you use it, and an AI bill of materials answers that in minutes. It extends the software bill of materials to record each model, its version or hash, its base model, the datasets behind it and where it runs; CycloneDX and SPDX both define formats for this. Generate it from the pipeline, not by hand, or it is stale within a week.

      Test yourself on this topic

      3 graded questions · scored out of 100 with feedback · free

      Start the 3 questions
    6. Dataset provenance and integrity

      A model learns from whatever data reaches it, so knowing where each training, fine-tuning and retrieval dataset came from is a security control, not paperwork. Record each dataset's source and licence, hash every version you train on, let only the pipeline write to the buckets that hold them, and log every change. Then, when a source is found compromised, you can say which models saw it and rebuild from a known good version.

      Test yourself on this topic

      3 graded questions · scored out of 100 with feedback · free

      Start the 3 questions
    7. Vulnerabilities in AI frameworks and tools

      The libraries around a model are ordinary software with ordinary bugs: orchestration frameworks have had code execution flaws in features that evaluate model output, and inference and cluster tools have shipped with no authentication by default. Track AI packages in the same vulnerability management as the rest of your stack, follow their advisories and patch on a deadline. Be most wary of features that run model-written code or queries for convenience, because that is where these bugs cluster.

      Test yourself on this topic

      3 graded questions · scored out of 100 with feedback · free

      Start the 3 questions
  7. Phase 7 · Model and training pipeline security

    1. Defending against data poisoning and backdoors

      Poisoning plants examples in training or fine-tuning data so the model learns a wrong behaviour, sometimes one that fires only on a trigger phrase, and research suggests a small fixed number of documents can be enough at any model size. Defend at the data: prefer sources you control, deduplicate and filter, review what changed between dataset versions, and keep tests for behaviours that must not shift. Detection after training is hard, which is why the controls sit before it.

      Test yourself on this topic

      3 graded questions · scored out of 100 with feedback · free

      Start the 3 questions
    2. Adversarial examples and robustness

      Not every model you secure is an LLM: fraud scores, malware classifiers and content filters are models too, and an attacker who can probe one will search for small input changes that flip its decision. Robustness comes from not trusting one model alone, training on adversarial examples, limiting the feedback a prober gets, and backing the model with rules and human review where a miss is costly. Judge it against an attacker who adapts, not a fixed test set.

      Test yourself on this topic

      3 graded questions · scored out of 100 with feedback · free

      Start the 3 questions
    3. Memorisation and privacy attacks

      Models memorise some training data, especially text that is repeated or unusual, and an attacker can test whether a record was in the training set or coax the model into repeating it. The defences are mostly upstream: keep personal data and secrets out of training sets, deduplicate, and use differential privacy for sensitive fine-tunes where the accuracy cost is acceptable. Before release, test whether the model reproduces known sensitive strings from its own data.

      Test yourself on this topic

      3 graded questions · scored out of 100 with feedback · free

      Start the 3 questions
    4. Defending against model extraction

      Anyone who can query your model can, with enough queries, train a cheaper copy or recover details you meant to keep private, and returning full output probabilities makes it easier. Slow it down with per-account rate limits and quotas, return only what the product needs, watch for accounts whose queries look like systematic coverage rather than use, and forbid training on outputs in your terms. On a public API you can make extraction expensive and visible, not impossible.

      Test yourself on this topic

      3 graded questions · scored out of 100 with feedback · free

      Start the 3 questions
    5. Fine-tuning and safety erosion

      Research has shown that fine-tuning an aligned model on a handful of examples, even harmless looking ones, can strip much of its safety training. If you fine-tune, rerun your safety and security tests on the tuned model instead of trusting the base model's results, and screen the training data first. If you offer fine-tuning to customers, treat their uploads as untrusted: scan the data, evaluate the resulting model before serving it, and keep the right to refuse.

      Test yourself on this topic

      3 graded questions · scored out of 100 with feedback · free

      Start the 3 questions
    6. Protecting model weights

      For a company that trained its own model, the weights are the product: whoever copies them gets the capability without the cost and without your safety controls. Protect them like signing keys: few people with access, use through audited services rather than direct downloads, encryption at rest, limits on outbound traffic from the hosts that hold them, and insider threat controls. RAND's work on securing model weights matches security levels to how capable an attacker you must stop.

      Test yourself on this topic

      3 graded questions · scored out of 100 with feedback · free

      Start the 3 questions
    7. Securing the training pipeline

      The pipeline that builds a model is a privileged system: it reads sensitive data, holds cloud credentials and writes the artefact you will deploy, so whoever can change it can change the model. Give training jobs their own narrow identities, make data, code and artefact stores writable only by the pipeline, build from reviewed code, and record which data, code and settings produced each model. That record is what lets you trust, reproduce or recall a model later.

      Test yourself on this topic

      3 graded questions · scored out of 100 with feedback · free

      Start the 3 questions
  8. Phase 8 · AI platform and infrastructure security

    1. The AI gateway

      An AI gateway is one service that every model call in the company passes through, so provider keys, logging, data rules, rate limits and model allowlists are enforced in one place instead of in every team's code. It is where you redact before data leaves, attach the right key per team, cap spend and switch providers in an incident. Make it the only path that works, by keeping provider keys inside it and blocking direct egress to model APIs, or teams will route around it.

      Reading

      Test yourself on this topic

      4 graded questions · scored out of 100 with feedback · free

      Start the 4 questions
    2. Model API keys and secrets

      A model provider key is a spending card and a data channel at once: whoever holds it can run up your bill and, on some platforms, read your files, fine-tunes or stored responses. Keep keys on servers, never in an app or browser bundle; issue separate keys per service and environment with the narrowest permissions offered; hold them in a secrets manager; rotate on a schedule and on any leak. Per-key spend alerts turn a stolen key into an hours-long problem.

      Test yourself on this topic

      3 graded questions · scored out of 100 with feedback · free

      Start the 3 questions
    3. Hardening self-hosted inference

      Inference servers and local model runners are often built for a developer's laptop, listening on a port with no authentication, and internet scans keep finding them exposed, letting anyone use the GPU, pull models or reach admin endpoints. Bind them to private networks, put authentication and TLS in front, turn off model download, upload and management endpoints you do not need, and run them as unprivileged containers. Treat a model server like a database: never on a public address.

      Test yourself on this topic

      3 graded questions · scored out of 100 with feedback · free

      Start the 3 questions
    4. Notebooks and ML platforms

      Notebook servers, experiment trackers, model registries and distributed compute frameworks sit next to a company's most sensitive data and credentials, and several were designed for a trusted network with weak or no authentication. Put them behind single sign-on, keep them off the internet, give notebooks short-lived credentials instead of long-lived keys in environment variables, and patch them like production. A compromised notebook is a compromised data platform.

      Reading

      Test yourself on this topic

      3 graded questions · scored out of 100 with feedback · free

      Start the 3 questions
    5. GPU clusters and tenant isolation

      Accelerators were built for speed, not for sharing between workloads that distrust each other, so GPU memory, drivers and shared nodes are weaker boundaries than CPU virtualisation; researchers have shown leftover GPU memory leaking one process's model output to another. Run untrusted or customer workloads on dedicated GPUs or nodes, rely on hardware partitioning only where the vendor documents it as isolation, patch drivers and container toolkits, and never let jobs mount the host.

      Test yourself on this topic

      3 graded questions · scored out of 100 with feedback · free

      Start the 3 questions
    6. Unbounded consumption and denial of wallet

      Every model call costs money and compute, so an attacker, a runaway agent loop or a scraper can turn your feature into an outage or a large bill without breaking anything. Set limits at every layer: token caps per request, request rates per user and key, step and spend budgets per agent run, and spend alerts per tenant that page someone. Decide ahead what happens at a limit, a clear error or a cheaper model, so the cap never fails silently.

      Reading

      Test yourself on this topic

      3 graded questions · scored out of 100 with feedback · free

      Start the 3 questions
    7. Confidential computing for AI

      Confidential computing runs a workload in a hardware enclave whose memory the host operator cannot read, and recent GPUs extend this to accelerators, so prompts and weights stay protected even from the cloud running them. What makes it useful is attestation: a signed statement of exactly what code is running, which a client checks before sending data. It protects against the operator and other tenants, not against bugs or a leaky application inside the enclave.

      Test yourself on this topic

      3 graded questions · scored out of 100 with feedback · free

      Start the 3 questions
  9. Phase 9 · Security testing and assurance

    1. Security review of an LLM feature

      A design review is where AI security work pays off most, because moving a capability or a data source is cheap on paper and expensive after launch. Walk the data flow: every input the model reads and who could have written it, every tool and what it can change, every place output goes. Wherever untrusted text meets a sensitive action, require a control that still holds if the model obeys the attacker, and write it down as a testable requirement.

      Test yourself on this topic

      4 graded questions · scored out of 100 with feedback · free

      Start the 4 questions
    2. Red-team findings to durable controls

      A red-team exercise is worth only what you change afterwards. Before it starts, agree the scope, the systems and accounts in play, what testers may touch and the questions it must answer. Afterwards, fix each finding at the layer that stops the whole class, such as a permission or a rendering rule rather than one more blocked phrase, and turn the exact attack into a regression test so the fix cannot quietly come undone in the next release.

      Test yourself on this topic

      4 graded questions · scored out of 100 with feedback · free

      Start the 4 questions
    3. Automated security tests in CI

      Prompts, models, tools and retrieval sources all change how a system behaves under attack, so the security suite has to run on every one of those changes, not once before launch. Keep a versioned set of injection, leak and tool misuse cases drawn from your threat model and past findings, run them with a scanner such as promptfoo, garak or PyRIT, and fail the build on a regression. Outputs vary, so run each case several times and gate on the rate.

      Reading

      Test yourself on this topic

      3 graded questions · scored out of 100 with feedback · free

      Start the 3 questions
    4. Measuring a defence

      A defence is measured by two numbers together: how often attacks still succeed, and how much legitimate work it breaks. Test against adaptive attacks that know the defence is there, because fixed prompt lists overstate protection, and many published defences fell to attackers who tuned against them. Report attack success, naming the attack set, beside task success on benign traffic.

      Test yourself on this topic

      3 graded questions · scored out of 100 with feedback · free

      Start the 3 questions
    5. Re-testing after a model change

      Injection resistance, refusal behaviour and tool calling habits belong to a model version, so a model upgrade is a security change even when no code moves. Pin exact model versions, and before switching, rerun the whole security suite and compare case by case against the old model, reading the new failures rather than only the totals. An alias that silently moves to a new model is the same change without the test, so keep production off aliases.

      Reading

      Test yourself on this topic

      3 graded questions · scored out of 100 with feedback · free

      Start the 3 questions
    6. Evaluating guardrail products

      Guardrail products and guard models score prompts and responses for injection, jailbreaks and leaks, and the accuracy a vendor quotes was measured on someone else's traffic. Test a candidate on a sample of your own real requests plus your attack set, and look at the false positive rate first, because a filter that blocks one real customer in fifty gets switched off. Then check added latency, behaviour when it is down, and where scanned data goes.

      Test yourself on this topic

      3 graded questions · scored out of 100 with feedback · free

      Start the 3 questions
    7. Running an AI vulnerability disclosure programme

      Researchers will report findings on a public AI product, and many will be a jailbreak in their own session rather than a security bug. Publish a scope that says what counts: another user's data, actions taken without authorisation, exposed credentials, a bypass of a control you rely on. Route content policy reports to the safety team, and fix accepted reports at the root, since paying for each new wording of one injection teaches you nothing.

      Test yourself on this topic

      3 graded questions · scored out of 100 with feedback · free

      Start the 3 questions
  10. Phase 10 · Detection and response

    1. Security telemetry for AI systems

      An investigation needs to know what the model saw and what it did: the request, the system prompt version, each retrieved source and where it came from, every tool call with its arguments and result, and the user and agent identity behind them. Record these as linked spans on one trace in a shared schema such as the OpenTelemetry GenAI conventions. Store prompt content with the access rules and retention of the data inside it.

      Test yourself on this topic

      3 graded questions · scored out of 100 with feedback · free

      Start the 3 questions
    2. Monitoring and abuse detection

      Detection works when it watches signals an attacker cannot avoid producing. Tool calls to new destinations, retrieval outside a user's usual scope, sudden volume from one account and bursts of near-identical requests tell you more than a keyword match on the word ignore, which attackers drop and ordinary users trip. Tune each alert until on-call can act on it, and protect the conversation logs your detection reads, since they hold user data too.

      Test yourself on this topic

      4 graded questions · scored out of 100 with feedback · free

      Start the 4 questions
    3. Detection rules for agent actions

      Agents act through tools, so the most reliable detections watch actions rather than words. Baseline what each agent normally does, then alert on a tool it rarely uses, a write straight after reading untrusted content, a new outbound domain, a burst of reads across many records, or a privilege used outside its task. Send these events to your SIEM tagged with the agent and the user it acted for.

      Test yourself on this topic

      3 graded questions · scored out of 100 with feedback · free

      Start the 3 questions
    4. Abuse, fraud and automated misuse

      A public AI product draws the abuse any valuable free resource does: account farms draining free tiers, stolen cloud and API keys used to run models on someone else's bill, resold access and scripted spam. The controls are fraud controls applied to tokens: verification in proportion to what an account can spend, rate and spend limits per account and per key, anomaly detection on usage and payments, and fast revocation.

      Test yourself on this topic

      3 graded questions · scored out of 100 with feedback · free

      Start the 3 questions
    5. Incident response for AI

      When an AI flaw is actively leaking data or taking bad actions, contain first: switch off the capability, connector or tool that carries the harm, even before you know the root cause. Then preserve traces and logs, scope which users, tenants and records were touched, fix the cause at the layer that stops the class, and close only once the original exploit is replayed against the fix and fails.

      Test yourself on this topic

      4 graded questions · scored out of 100 with feedback · free

      Start the 4 questions
    6. Kill switches and containment levers

      In an AI incident the time that matters is how fast you can stop the harmful path, and a code change plus redeploy is too slow. Build the levers in advance: a flag per tool and connector, a way to drop an agent to read-only, revocation of an agent's credentials, a route to a fallback model and a pause for scheduled runs. Practise each lever in a drill, write down who may pull it, and make sure switching one off fails closed.

      Test yourself on this topic

      3 graded questions · scored out of 100 with feedback · free

      Start the 3 questions
    7. Investigating an AI incident

      Investigating an AI incident means rebuilding what the model saw and did, which is impossible if traces were sampled away or prompts never logged. Start from the harmful action, walk back through the trace to the tool results and documents that came before it, find the content that carried the instruction, then search for every other run that read the same content. That last search is what tells you how many users and records were affected.

      Test yourself on this topic

      3 graded questions · scored out of 100 with feedback · free

      Start the 3 questions
    8. Threat intelligence on AI misuse

      Model providers publish regular reports on how real attackers use and abuse AI, from influence operations to criminals using models in intrusions and fraud. Read them for what you can act on: techniques, account behaviour and infrastructure, mapped to MITRE ATLAS or ATT&CK, then check whether your own logs would have caught the same pattern. Treat each report as one source among several, since every vendor sees only its own platform.

      Test yourself on this topic

      3 graded questions · scored out of 100 with feedback · free

      Start the 3 questions

    Chapter 10 lab

    Write the instruction for an incident status-update assistant

    A prompt lab that closes the chapter: you write the instruction, and it is graded on a rubric.

    Start the lab
  11. Phase 11 · AI in security operations

    1. AI-assisted vulnerability discovery

      Models can now read code, form a hypothesis about a bug and test it, and labs have reported real vulnerabilities found this way in widely used open source projects. Treat the output as a lead, not a finding: require a reproducing test or proof of concept before anyone files or fixes, because false positives at machine speed bury a team. Run these tools only where the code is allowed to go, and give every reported issue a human owner.

      Test yourself on this topic

      3 graded questions · scored out of 100 with feedback · free

      Start the 3 questions
    2. LLMs in detection and triage

      In a security operations centre, models help summarise an alert's context, draft search queries, group related alerts and write the first incident timeline. Keep the analyst accountable: the model recommends, a person decides on containment, and every claim the model makes cites the log line it came from so it can be checked. Measure it on real alert history and count missed true positives: closing the one alert you needed is worse than no agent.

      Test yourself on this topic

      3 graded questions · scored out of 100 with feedback · free

      Start the 3 questions
    3. Securing your own security agents

      A triage agent reads attacker-written content all day: phishing emails, malicious files, log lines with text planted in them. That makes it your most exposed agent, often with broad read access and power to close alerts or isolate hosts. Give it the least privilege of any agent, keep containment actions behind human approval, treat everything it reads as untrusted input, and watch for alerts it closed on content that told it to.

      Test yourself on this topic

      3 graded questions · scored out of 100 with feedback · free

      Start the 3 questions
    4. AI-enabled attacks

      Attackers use AI to write fluent phishing in any language, clone a voice from a short clip, fake a face on a video call and speed up malware and exploit work. Most of the defences are not AI at all: phishing-resistant sign-in such as passkeys, calling back on a known number before moving money, and out-of-band approval for sensitive changes. Teach staff that a familiar voice or face is no longer proof of who is asking.

      Test yourself on this topic

      3 graded questions · scored out of 100 with feedback · free

      Start the 3 questions
    5. Security of AI-generated code

      Code assistants produce code that looks finished, often repeat insecure patterns, and sometimes import packages that do not exist, names attackers can then register. Hold generated code to the same review, static analysis and dependency checks as human code, block new unknown packages at the lockfile, and give assistants project rules that name your secure defaults. People using assistants have been found to write less secure code while feeling surer of it.

      Test yourself on this topic

      3 graded questions · scored out of 100 with feedback · free

      Start the 3 questions
  12. Phase 12 · Standards, governance and the security programme

    1. A secure AI development lifecycle

      A secure AI lifecycle puts a security checkpoint where each decision is made: a threat model at design, data and model provenance checks at build, the security suite at release, monitoring and patching in operation, and deletion of data, weights and credentials at retirement. Size the gates to the risk: an internal summariser with no tools needs a light review, an agent that can move money needs all of it.

      Test yourself on this topic

      3 graded questions · scored out of 100 with feedback · free

      Start the 3 questions
    2. Industry frameworks: SAIF and CoSAI

      Google's Secure AI Framework (SAIF) and the Coalition for Secure AI (CoSAI), an industry group hosted by OASIS, publish risk maps and control catalogues for AI systems, from data and model risks to agent controls. Use them as a checklist against your own controls to find gaps, and as shared vocabulary with vendors and auditors. They are guidance, not certification, so map every control you adopt to evidence you can actually show.

      Reading

      Test yourself on this topic

      3 graded questions · scored out of 100 with feedback · free

      Start the 3 questions
    3. NIST frameworks for AI security

      From a security seat NIST offers three things: the AI Risk Management Framework to organise AI risk work, the adversarial machine learning taxonomy (NIST AI 100-2, 2025 edition) to name attacks and mitigations, and the Cyber AI Profile, which maps AI concerns onto Cybersecurity Framework 2.0. As of November 2026 the Cyber AI Profile is still the preliminary draft of December 2025, so cite it as direction rather than as a requirement.

      Test yourself on this topic

      3 graded questions · scored out of 100 with feedback · free

      Start the 3 questions
    4. The UK code of practice and ETSI EN 304 223

      The UK's AI Cyber Security Code of Practice set baseline security principles across the AI lifecycle: secure design, development, deployment, maintenance and end of life. It went to ETSI as TS 104 223 and became the European Standard ETSI EN 304 223, published in January 2026. For a security engineer it is a ready list of controls to evidence, such as asset inventories, a secured supply chain and end-of-life steps.

      Test yourself on this topic

      3 graded questions · scored out of 100 with feedback · free

      Start the 3 questions
    5. Cybersecurity duties in the EU AI Act

      The EU AI Act requires high-risk AI systems to reach an appropriate level of accuracy, robustness and cybersecurity, and names AI-specific attacks the provider must address: data and model poisoning, adversarial examples and attacks on confidentiality. Providers of general-purpose models with systemic risk must also protect the model and its physical infrastructure. Your part is the evidence: threat models, test results and working controls. Take the dates from your governance team.

      Test yourself on this topic

      3 graded questions · scored out of 100 with feedback · free

      Start the 3 questions
    6. ISO/IEC 27001 and 42001 for AI security

      Many companies already run an information security management system to ISO/IEC 27001, and ISO/IEC 42001 adds an AI management system covering AI risk, impact and the lifecycle. Rather than build a parallel programme, add AI assets to the existing inventory and risk register, extend current controls such as access, supplier, logging and incident to models, prompts and agents, and use 42001 for what 27001 lacks, such as AI impact assessment.

      Test yourself on this topic

      3 graded questions · scored out of 100 with feedback · free

      Start the 3 questions
    7. Security review of AI vendors

      Before company data flows to a model provider or AI product, find out where prompts and outputs are stored and for how long, whether they train models, who at the vendor can read them, which subprocessors and regions are involved, and how tenants are kept apart. Ask for evidence such as a SOC 2 report and test what you can. Watch for AI features switched on inside software you already approved, since they change the data flow without a new review.

      Test yourself on this topic

      3 graded questions · scored out of 100 with feedback · free

      Start the 3 questions
    8. Reporting AI security risk

      Leadership needs to know which AI systems carry the most risk, what is being done about it and which decisions are theirs. Keep each AI system in the risk register with an owner, its worst credible impact and the controls in place, and report a few honest measures: systems reviewed before launch, open high findings and their age, attack success on your test suite and time to contain. Name every risk you are accepting and who accepted it.

      Test yourself on this topic

      3 graded questions · scored out of 100 with feedback · free

      Start the 3 questions

Practise the AI Security Engineer roadmap

293 questions, each graded on the server out of 100. Free · no card.

All career paths