Securing AI-Written Software
Ship AI-generated code you can defend.
Coding agents write plausible code fast, and plausible is not secure. Learn to threat-model AI-assisted changes, write security specs and rules files agents follow, review AI pull requests like an attacker, build pipeline gates, and defend LLM features and agents against prompt injection, excessive agency and tool poisoning.
AI TEACHING PERSPECTIVES · Meet the team
Coding agents now write a large share of new code. They are fast, tireless and convincing, and research has shown again and again that a meaningful share of what they produce is exploitable. Meanwhile, LLM features and agents bring attack classes that classic checklists never covered: prompt injection, data exfiltration through tools, poisoned MCP servers and hallucinated packages.
This course teaches a practical, end-to-end approach. You move security upstream into threat models, security acceptance criteria and rules files the agent must follow; into the pipeline as gates the agent cannot talk its way past; and into the architecture of LLM features and agents, where good design limits what a successful injection can do. Every lesson works on one realistic case, Brightpath Academy, with real vulnerable code, the attack that breaks it, and the fix.
Use the controls inside the presentation to start. Scratch answers stay only while this page is open. This activity does not automatically complete a lesson or pass an assessment. If media stops after a long break, reload this page.
One step closer.
With every module.
8 modules · 48 published lessons
Open a module to explore its lessons.
01LEARNING MODULE · 3–4 hoursWhy AI-written code fails differently6 lessons · Week 1
Why plausible code from coding agents is often insecure, the new attack surface of agents, context, tools and dependencies, and how to threat-model an AI-assisted change.
What you'll learn
- How AI-generated code goes wrong, and what the research shows
- The attack surface of an agent-driven workflow
- A lightweight STRIDE threat model for a single change
You'll practise a threat model for one AI-assisted change.
02LEARNING MODULE · 3–4 hoursSecure by specification5 lessons · Week 1
Turn security into requirements an agent can follow and a test can check: ASVS-based acceptance criteria, abuse cases and rules files for coding agents.
What you'll learn
- Security acceptance criteria based on OWASP ASVS 5.0
- Misuse and abuse cases as executable expectations
- Rules files and constitutions that steer coding agents
You'll practise a security spec and an agent rules file.
03LEARNING MODULE · 3–4 hoursReviewing AI code for classic flaws7 lessons · Week 2
Review AI pull requests like an attacker: broken access control, injection, secrets, cryptography and insecure defaults, with a checklist built for agent-written code.
What you'll learn
- Find IDOR and other access-control flaws agents write most
- Spot injection in SQL, shell, templates and more
- A seven-question review checklist for AI pull requests
You'll practise a security review of an AI-generated change.
04LEARNING MODULE · 3–4 hoursGuardrails in the pipeline5 lessons · Week 2
Automate what reviewers miss: static analysis, secret scanning, dependency and new-package checks, SBOMs, provenance and signed builds.
What you'll learn
- Configure SAST, secret scanning and dependency checks as gates
- Defend against package hallucination and supply-chain attacks
- SBOMs, provenance and signed builds in practice
You'll practise a set of pipeline gates for your project.
05LEARNING MODULE · 3–4 hoursSecuring LLM features7 lessons · Week 3
Direct and indirect prompt injection, improper output handling, system prompt leakage and sensitive data, and defence in depth for LLM features.
What you'll learn
- How prompt injection works, directly and through retrieved content
- Handle model output as untrusted and stop data exfiltration
- Layered defences that limit what a successful injection can do
You'll practise a threat review of an LLM feature.
06LEARNING MODULE · 3–4 hoursAgents, tools and MCP6 lessons · Week 3
Secure agents that act: the lethal trifecta, least privilege for tools, MCP trust and tool poisoning, and human confirmation that actually works.
What you'll learn
- Recognise and break the lethal trifecta
- Design least-privilege tool permissions and confirmation steps
- Assess MCP servers for trust, poisoning and sandboxing
You'll practise a permission review for an agent.
07LEARNING MODULE · 3–4 hoursTesting, red-teaming and response6 lessons · Week 4
Prove your defences and keep proving them: security tests the agent must pass, red-teaming LLM features and agents, logging, monitoring and incident response.
What you'll learn
- Write security tests that block regressions
- Build and run a red-team set for LLM features and agents
- Log, monitor and respond to AI security incidents
You'll practise a security test suite.
08LEARNING MODULE · 4–5 hoursStandards, law and team practice6 lessons · Week 4
Map OWASP, ASVS, NIST SSDF, the EU Cyber Resilience Act, AI Act and NIS2 to your work, write a secure AI development policy, and complete the capstone.
What you'll learn
- Which standard answers which question
- What EU rules mean for teams that build software with AI
- A secure AI development policy for your team
You'll practise the capstone: secure an AI-built feature end to end.
The course,
in context.
Explore the approach, expectations and practical details. These are public course notes, separate from your learning modules.
PUBLIC COURSE GUIDEWho this is for
- Developers who use coding agents or AI assistants every day and want their code to survive a security review
- Tech leads and engineering managers who set the rules, reviews and pipelines for AI-assisted teams
- QA and security-minded engineers who test and review AI-generated changes
- Builders of LLM features and agents who need defences against prompt injection and tool misuse
You should be comfortable reading Python and know web basics (HTTP, databases, authentication). You do not need to be a security specialist.
What you will learn
- Threat-model an AI-assisted change in under an hour
- Write security acceptance criteria, abuse cases and rules files that coding agents follow
- Review AI pull requests for access control, injection, secrets and crypto flaws
- Build CI gates: static analysis, secret scanning, dependency and new-package checks, SBOMs and signing
- Defend LLM features against direct and indirect prompt injection and data exfiltration
- Secure agents and MCP tools with least privilege and real human confirmation
- Red-team LLM features and turn every finding into a regression test
- Map OWASP, ASVS, NIST SSDF and EU rules (CRA, AI Act, NIS2) to your work
How it works
Four weeks, two modules per week, about 6–8 hours a week.
- Narrated week sessions with interactive checkpoints open each week
- Readings with real vulnerable code, the attack that breaks it and the fix
- Worked examples on one running case, Brightpath Academy: a registration and payment service, an LLM course advisor and an internal support agent with tools
- Assignments that build your own security pack step by step
- A capstone that secures an AI-built feature end to end, and a final quiz
Your certificate
Complete all lessons and pass the 20-question final quiz (70 % or more, retakes allowed) to receive a verifiable AI Pioneers certificate of completion. It confirms course completion; it is not a professional security certification.
Before you begin
- Have a project where you use, or plan to use, a coding agent or LLM feature: work or personal
- Python 3.12 and a code editor are enough to run the examples
- Security examples target only our fictional company, Brightpath Academy. Never test systems you do not own or have permission to test.
Course glossary
Threat model: a structured list of what you protect, how it can be attacked and how you stop it.
Abuse case: a scenario describing how someone could misuse a feature, written so it can be tested.
Rules file: instructions in the repository (such as AGENTS.md) that a coding agent reads before it writes code.
Gate: an automated check in the pipeline that blocks a merge or deploy when it fails.
Prompt injection: input that makes an LLM follow an attacker's instructions instead of yours.
Lethal trifecta: an agent with private data, untrusted content and a way to send data out.
Least privilege: giving a tool or agent only the access it needs for its task.
Red-team set: a growing library of attacks run against your system on every release.
Teaching perspective
This course is taught through three fictional AI teaching personas: Aegis (security and responsible AI: What are we trusting, and should we?), Forge (developer: Show me the diff.) and Verity (testing and reliability: How would we notice if this were wrong?). The content is written, reviewed and decided by people. It is educational and not legal advice or a security certification.
Your effort.
Made official.
Complete the required lessons and pass any required assessments to earn your Securing AI-Written Software certificate of completion.
Download your PDF and share a public verification link. Each issued certificate has its own code and QR code. This is an AI Pioneers completion certificate, not external accreditation.
Loading certificate preview…
Generated with the same template as the awarded certificate. If the preview is unavailable on your device, use “Open sample PDF” above.
Experiences.
In their own words.
Reviews are submitted by enrolled learners and checked before publication. Ratings include approved reviews only. Critical feedback is welcome; spam, abuse and unrelated content are not.
No published reviews yet. Your experience could help the next learner.