An open API service indexing awesome lists of open source software.

https://github.com/nocomplexity/pythonsecurity

The Python Security Handbook
https://github.com/nocomplexity/pythonsecurity

handbook jupyterbook python python-security python-security-tools sast security security-by-design

Last synced: 14 days ago
JSON representation

The Python Security Handbook

Awesome Lists containing this project

README

          

# Python Security Handbook

**A practical, no-nonsense guide to writing secure Python code in 2026 and beyond.**

[![PythonCodeAudit Badge](https://img.shields.io/badge/Python%20Code%20Audit-Security%20Verified-FF0000?style=flat-square)](https://github.com/nocomplexity/codeaudit)
[![License: CC BY-SA 4.0](https://img.shields.io/badge/License-CC%20BY--SA%204.0-blue.svg)](https://creativecommons.org/licenses/by-sa/4.0/)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](http://makeapullrequest.com)
[![Jupyter Book](https://img.shields.io/badge/Built%20with-Jupyter%20Book-blue)](https://jupyterbook.org/)

![bookcover](images/bookcover_small.png)

This open-source book covers **Python Security Fundamentals** with a strong focus on real-world practices, essential security tools, and actionable security recipes.

## What You'll Learn

- Core security principles every Python developer should know
- How to secure common Python patterns and libraries
- Secure coding techniques
- Essential open-source security tools for Python
- Practical **security recipes** – step-by-step solutions to common security challenges
- Dependency management, supply chain security, and runtime protection
- Static Application Security Testing (SAST) and Software Composition Analysis (SCA)

## Key Features

- **Fundamentals First** – Clear explanations of specific Python weaknesses, vulnerabilities, and threats
- **Secure Coding Guidelines** - The best maintained collection of guidelines to create secure Python applications
- **Practical Recipes** – Ready-to-use, secure code patterns
- **Tool Recommendations** – Focused on using the best Free and Open Source (FOSS) tools
- **Realistic Advice** – Balanced between theory and production reality
- **Regularly Updated** – Keeping pace with the evolving Python and security landscape

## Tools Featured

- **[Python Code Audit](https://github.com/nocomplexity/codeaudit)** – Best-in-class open-source Python SAST scanner
- Dependency scanners (pip-audit, Open Source Insights , etc.)
- And other essential security tools

## How to Read This Book

You can read the book online at:
👉 **[https://nocomplexity.github.io/pythonsecurity/](https://nocomplexity.github.io/pythonsecurity/)**

## Contributing

Contributions are welcome! See [CONTRIBUTING](CONTRIBUTING.md) for details.

Simple ways to help:
- Star the repository
- Share with fellow Python developers
- Report issues or suggest improvements
- Submit pull requests for new recipes or corrections

## License

This book is licensed under [**CC-BY 4.0**](license.md) – you are free to share and adapt with attribution.

---

**Made with ❤️ to [Simplify Cyber Security](https://nocomplexity.com/simplifysecurity-manifesto/) Challenges**

Want to support the project? Consider [sponsoring](sponsors.md) or making a [donation](contribute.md).