Python Web Security: OWASP Top 10 with Agentic AI Course

Python Web Security: OWASP Top 10 with Agentic AI
When Mozilla recently ran Claude over the Firefox JavaScript runtime, the AI uncovered more than 100 bugs, 14 of them serious enough to become CVEs. 🔥 That kind of agentic security review used to be the exclusive domain of expensive pen-testing firms. Not anymore.

This course shows you how to do the same thing for your own Python web apps. We start by working through every category of the OWASP Top 10 (2025 edition) with real vulnerable-and-fixed examples in Flask, Django, and FastAPI. Then we build the Security Lead, a custom Claude Code agent specifically tuned for Python and SaaS security, that audits any codebase in minutes for roughly the cost of a fancy coffee. We turn it loose on three popular open source apps (Apache Superset, Paperless-ngx, and Kibitzr) and find genuine issues in each one.

What students are saying

I just got my dream job thanks to you and your courses. I can not tell you what this means to me, it's not a job for me, it's much more than that, ... I already had a great job, but this is exceptional. I still can not believe it, that I will be joining [cool tech company], working for a dream team, dream role, and most importantly, from now on, I will be working on Python till I die... You have changed my life Michael. I just hope one day I can meet you in person.
-- S

What's this course about and how is it different?

This course teaches you to find and fix the OWASP Top 10 security vulnerabilities, not as an abstract checklist, but as concrete, fixable problems in real Python web apps built with Flask, Django, and FastAPI. For every category you'll see vulnerable code, why it's dangerous, and exactly how to fix it. Then we go further and build the Security Lead, a custom Claude Code agent that brings that same OWASP-aware perspective to any Python codebase, with the discipline a pen-testing firm would apply. Think of it as pair programming with a security specialist who lives in your repo, never gets tired, and never skips a step.

Why this course is different from other Python security tutorials

  • The brand-new OWASP 2025 edition – Covers the freshly released 2025 list including the new "mishandling of exceptional conditions" category, so you're studying current threat priorities, not 2021's. For background, hear OWASP committee member Tanya Janca walk through the new list on Talk Python episode 545.
  • A reusable AI security agent you keep forever – Walk away with the Security Lead, a custom Claude Code agent definition tuned for Python and SaaS security that you can drop into any future project.
  • Real, named, live audits – Unscripted and unstaged. Michael picks three popular open source apps (Apache Superset, Paperless-ngx, and Kibitzr) and runs the audits live on camera, discovering the genuine issues in each one for the first time as you watch.
  • Vulnerable and fixed code, side by side – Every OWASP category includes the broken version, exactly why an attacker can exploit it, and the secure fix using current Python practices.
  • Flask, Django, and FastAPI together – Examples span all three major Python web frameworks, so you see how the same vulnerability looks (and gets fixed) across the stack you actually use.
  • Built for SaaS multi-tenancy concerns – Dedicated focus on user data isolation, IDOR risks, and cross-tenant data leaks, the things that keep SaaS builders up at night.
  • Practical AI workflow, not vibe coding – Learn how to point an agent at a real codebase, prompt it for an OWASP-aligned report, and apply fixes responsibly using careful engineering practices.
  • Honest costs and time spent – See exactly what a million-line audit consumes (roughly $3 to $5 in Claude Code compute) and how to keep audit spend predictable.
  • Modern Python security toolbox – Argon2 password hashing, MultiFernet key rotation, slowapi rate limiting, loguru audit logging, pip-audit for supply chain, Have I Been Pwned checks, and more.
  • Ethics built in – Closing guidance on how to apply these techniques responsibly, including why not to flood open source maintainers with low-signal AI-generated PRs.

What will you learn about OWASP Top 10 and Python security?

By the end of this course, you'll be able to:

  • Recognize and fix all ten OWASP Top 10 2025 vulnerability categories in real Python web apps
  • Diagnose broken access control vulnerabilities including IDOR, path traversal, and missing function-level access checks
  • Configure Docker Compose, Django settings, and security headers to avoid the most common production misconfigurations
  • Pin Python dependencies safely with uv pip compile and exclude-newer-than to defend against fresh supply chain attacks
  • Run pip-audit in CI and Docker builds so a CVE never ships unnoticed
  • Replace weak password hashing with Argon2 and rotate encryption keys with MultiFernet without downtime
  • Defend against SQL, NoSQL, and stored XSS injection with parameterized queries and proper template escaping
  • Apply server-side validation with Pydantic field validators so client-side checks can never be the only gate
  • Enforce strong password policies including Have I Been Pwned breach checks and a top-10k common-passwords list
  • Build a secure password reset flow with hashed tokens, short expirations, and no user enumeration
  • Prevent mass-assignment attacks with strict serializer fields and read-only flags
  • Vendor third-party JavaScript and CSS into your own infrastructure instead of trusting external CDNs
  • Implement structured security audit logging with loguru and threshold-based alerts to Slack, PagerDuty, or Sentry
  • Return safe, generic error responses to users while logging full context server-side with a traceable reference ID
  • Use SQLAlchemy transaction context managers to prevent partial writes and money-disappearance bugs
  • Audit multi-tenant SaaS applications for cross-tenant data leaks and identity isolation gaps
  • Write a custom Claude Code agent persona definition tuned for your stack and threat model
  • Wire OWASP markdown sources directly into your agent so it cites canonical references instead of hallucinating
  • Run a complete agentic security audit on any Python codebase and turn the report into a prioritized fix list
  • Apply fixes with AI assistance while keeping a clear audit trail of what changed, why, and how it was tested
  • Estimate and control the cost of agentic security audits so they remain practical for routine use

Who is this OWASP Python security course for?

This course is perfect for:

  • Python web developers who ship production apps in Flask, Django, or FastAPI without a dedicated security team backing them up
  • SaaS founders and indie hackers who run multi-tenant apps where data isolation between users is critical
  • Senior engineers and tech leads who want a systematic, OWASP-aligned approach to reviewing their team's Python web code
  • Developers facing compliance audits who need documented security practices for SOC 2, HIPAA, PCI DSS, GDPR, NIST 800-63-4, or CMMC
  • Developers already using AI tools daily who want a serious, security-focused application of agentic AI (if you'd like to build up the agentic-coding foundations first, Agentic AI Programming for Python is a natural prerequisite)
  • Anyone maintaining a legacy Python web app that hasn't had a security audit recently and wants a practical, AI-assisted way to catch up

Course chapters: from OWASP #1 to live AI security audits

Chapter Why It Matters
Welcome and Tools Setup Get oriented to the three-act structure of the course and install Claude Code with VS Code, your Pro account, and the source code repository.
Act One – OWASP #1: Broken Access Control Find and fix insecure direct object references (IDOR), path traversal attacks, and missing function-level access checks with examples in FastAPI, Flask, and Django.
OWASP #2: Security Misconfiguration Lock down Docker Compose deployments, Django settings, and HTTP security headers like HSTS, X-Frame-Options, and content security policy.
OWASP #3: Software Supply Chain Failures Pin Python dependencies with uv pip compile, defend against fresh package compromises with cooldown windows, and integrate pip-audit into CI and Docker builds.
OWASP #4: Cryptographic Failures Replace fast password hashes like SHA-256 with memory-hard Argon2, and rotate encryption keys safely with MultiFernet instead of checking secrets into source control.
OWASP #5: Injection Prevent SQL injection, NoSQL injection in MongoDB and PyMongo, and stored cross-site scripting in Jinja templates with parameterized queries and proper escaping.
OWASP #6: Insecure Design Add proper rate limiting and account lockouts with slowapi, and enforce business rules server-side with Pydantic field validators so client-side checks can't be the only gate.
OWASP #7: Authentication Failures Build strong password policies with Have I Been Pwned breach checks and a top-10k common-passwords filter, and design password reset flows with hashed tokens, short expirations, and no user enumeration.
OWASP #8: Software or Data Integrity Failures Stop mass-assignment attacks with strict serializer fields and vendor third-party JavaScript and CSS instead of trusting external CDNs.
OWASP #9: Logging and Alerting Failures Set up structured security audit logging with loguru and threshold-based alerts that fire when credential-stuffing or anomalous behavior actually starts.
OWASP #10: Mishandling of Exceptional Conditions Return safe, generic error responses while logging full context server-side with traceable reference IDs, and use SQLAlchemy transaction context managers to prevent partial writes.
Act Two: Building the Security Lead Agent Construct a 550-line Claude Code agent file tuned for Python and SaaS security, with workflows for OWASP-mapped review, user data isolation, and security logging audits.
Act Three: Choosing Our Target Applications Survey the awesome-self-hosted ecosystem and pick three real Python web apps to audit, from a small personal tool to a major Apache project.
Analyzing Kibitzr Audit a 10-year-old web monitoring tool (711 stars, 22 contributors) and fix issues like silent SMTP TLS downgrade, unbounded response bodies, and missing timeout protection live on camera.
Analyzing Superset Run the Security Lead against Apache Superset, the Foundation's 73,000-star data exploration platform, finding the JWT guest-token default-secret startup gap, missing IP and user-agent logging on failed logins, and missing row-count detail on CSV exports.
Analyzing Paperless Audit Paperless-ngx, the 38,000-star community-supported document management system, discover an unsigned pickle in the Redis cache, and close the gap by reusing the project's own already-shipped signed-pickle helpers.
Conclusion Synthesize the course workflow into a repeatable process you can apply to your own apps, with guidance on cost, model selection, and how to use these techniques responsibly with open source projects.

Money-Back Guarantee Details

We want every student to feel 100% confident enrolling. If "Python Web Security: The OWASP Top 10 with Agentic AI" doesn't meet your expectations, let us know within 15 days of purchase and we'll refund you in full, no forms, no hassle, no hard feelings.

Simply email our support team (contact@talkpython.fm) with your registered email address, and your refund will be processed within several business days. We're certain the security skills and reusable AI agent you'll come away with are worth far more than the tuition, but you get to decide.

Corporate / Team Licenses

Empower your whole engineering team to ship secure Python web apps and run AI-assisted security audits across your stack in one cohesive curriculum.

  • Volume discounts start at 5 seats and scale up for larger groups.
  • Centralized billing and a single invoice for easy reimbursement.
  • Private progress dashboard so team leads can track completion.

Interested? Email sales@talkpython.fm with the number of learners and your preferred billing currency, and we'll craft a package that fits your organization.

What do you need to follow along with the OWASP course?

  • Python: Built and tested with Python 3.14+ (techniques apply to any modern Python web stack).
  • Primary AI tool: Claude Code running inside Visual Studio Code via the official Anthropic extension.
  • Required subscription: Claude Pro at $20/month is needed to follow along, as Claude Code is not available on free plans. The course uses Claude Opus for maximum accuracy on security review work.
  • Alternative options: The transcripts and source code transfer to Codex, Gemini CLI, Cline, or other agentic coding tools, though results will vary. The step-by-step walkthroughs assume Claude Code.
  • Editor: Visual Studio Code (free at code.visualstudio.com), with the Claude Code extension from Anthropic.
  • Frameworks shown: Vulnerable-and-fixed code samples in Flask, Django, and FastAPI.
  • Environment management: uv (modern, fast Python package and environment tool).
  • Version control: git and GitHub for safe AI-assisted security review workflows.
  • Security libraries demonstrated:
  • Costs: Core Python tools and Visual Studio Code are free and open source. Claude Pro is the only paid requirement at $20/month. No other paid tools required to complete the course.

Who am I? Why should you take my course?

Who is Michael Kennedy?

My name is Michael, nice to meet you. ;) There are a couple of reasons I'm especially qualified to teach you Python.

 1. I'm the host of the #1 podcast on Python called Talk Python To Me. Over there, I've interviewed many of the leaders and creators in the Python community. I bring that perspective to all the courses I create.

 2. I've been a professional software trainer for over 10 years. I have taught literally thousands of professional developers in hundreds of courses throughout the world.

 3. Students have loved my courses. Here are just a few quotes from past students of mine.

"Michael is super knowledgeable, loves his craft, and he conveys it all well. I would highly recommend his training class anytime." - Robert F.
"Michael is simply an outstanding instructor." - Kevin R.
"Michael was an encyclopedia for the deep inner workings of Python. Very impressive." - Neal L.

Sleep Better at Night Knowing Your Python Web App Stands Up to the OWASP Top 10

You've shipped a Python web app. Somewhere along the way, you've had that quiet thought: who knows what subtle security problem is lurking in that code? Now discover what's actually possible when you move beyond scanners and checklists to agentic security auditing, where a specialized AI partner reads your entire codebase with the OWASP Top 10 lens and tells you exactly what to fix.

Join Python Web Security: The OWASP Top 10 with Agentic AI to work through every category with real, hands-on Python examples in Flask, Django, and FastAPI. You'll build the Security Lead, a reusable Claude Code agent that audits any codebase with the same OWASP discipline a pen-testing firm would apply, in minutes instead of weeks. We even turn it loose on three popular open source projects and find real issues in each. You'll never guarantee 100%, but you'll be way safer, and you'll know exactly where the gaps are.

Enroll today and turn the OWASP Top 10 from a vague worry into your most thorough security review ever.

Course Outline: Chapters and Lectures

8:32
transcript 3:20
transcript 1:15
transcript 2:38
transcript 1:19
7:34
transcript 4:25
transcript 1:49
transcript 1:20
26:24
transcript 1:42
transcript 3:53
transcript 2:06
transcript 1:45
transcript 2:16
transcript 2:35
transcript 1:04
transcript 1:23
transcript 2:50
transcript 2:00
transcript 0:48
transcript 0:54
transcript 1:22
transcript 1:46
23:04
transcript 2:12
transcript 3:13
transcript 1:32
transcript 1:36
transcript 2:27
transcript 1:30
transcript 1:31
transcript 1:09
transcript 2:03
transcript 1:10
transcript 1:28
transcript 1:14
transcript 1:59
14:39
transcript 2:03
transcript 1:16
transcript 1:35
transcript 0:36
transcript 2:16
transcript 1:26
transcript 1:20
transcript 4:07
12:58
transcript 2:00
transcript 1:05
transcript 1:29
transcript 0:53
transcript 1:34
transcript 1:08
transcript 1:43
transcript 0:41
transcript 2:25
12:58
transcript 1:29
transcript 1:13
transcript 2:08
transcript 0:47
transcript 1:25
transcript 1:38
transcript 1:39
transcript 0:47
transcript 1:00
transcript 0:52
13:41
transcript 1:47
transcript 2:15
transcript 1:41
transcript 0:56
transcript 2:40
transcript 1:55
transcript 0:58
transcript 1:29
16:06
transcript 1:56
transcript 1:16
transcript 0:54
transcript 1:26
transcript 3:27
transcript 1:17
transcript 1:18
transcript 1:55
transcript 2:37
13:09
transcript 0:33
transcript 2:04
transcript 0:41
transcript 1:13
transcript 0:52
transcript 1:46
transcript 1:04
transcript 1:18
transcript 3:38
12:37
transcript 0:36
transcript 1:17
transcript 1:00
transcript 1:40
transcript 2:27
transcript 1:27
transcript 0:44
transcript 1:07
transcript 2:19
13:30
transcript 0:47
transcript 1:50
transcript 0:59
transcript 1:06
transcript 1:46
transcript 1:57
transcript 0:30
transcript 1:28
transcript 3:07
14:17
transcript 2:14
transcript 1:21
transcript 5:24
transcript 5:18
8:14
transcript 5:41
transcript 2:33
55:10
transcript 5:04
transcript 13:13
transcript 13:29
transcript 8:09
transcript 15:15
38:00
transcript 5:43
transcript 2:39
transcript 11:25
transcript 2:51
transcript 6:38
transcript 8:44
25:10
transcript 5:28
transcript 13:31
transcript 6:11
11:22
transcript 11:22
Buy for $39 + tax Bundle and save 81% Team Gift

Questions? Send us an email: contact@talkpython.fm

Talk Python's Mastodon Michael Kennedy's Mastodon