
This course contains the use of artificial intelligence.
One leaked API key or one poisoned dependency can compromise your entire Python application, and most of these mistakes take minutes to prevent once you know where to look.
Who this course is for
Python developers who want to write secure code without becoming security specialists
Backend and web developers (Flask, Django, FastAPI) shipping apps to production
DevOps and platform engineers who maintain Python CI/CD pipelines
Tech leads who need a repeatable security baseline for their team
Junior developers preparing for security-aware code reviews
What you will learn
Build a one-page threat model for any Python application
Move every secret out of your code with environment variables and secret managers
Scan your full Git history for leaked credentials with gitleaks
Replace eval, pickle, yaml.load, shell=True and string-built SQL with safe alternatives
Find risky code automatically with bandit and pre-commit hooks
Hash and verify passwords with Argon2id and generate safe tokens
Lock dependencies with hashes and audit them with pip-audit
Detect typosquatting and dependency confusion before you install
Harden GitHub Actions and Docker builds with least privilege
Apply a complete security checklist and a 14-day action plan to your own repo
Requirements
Working knowledge of Python 3 (functions, classes, packages)
Basic Git and command-line familiarity
Python 3.10+ and a code editor installed
No security experience required
Final project
You audit a real Python repository of your choice (or the provided sample app). You scan for secrets, run bandit, fix at least 8 dangerous patterns, migrate password hashing to Argon2id, generate a hashed and audited dependency lock file, and harden the CI workflow. You finish by scoring the project against the checklist and completing your 14-day action plan, so you leave with a safer codebase and a repeatable process.