OpenSSF Secure Coding Guide for Python

The OpenSSF Secure Coding One Stop Shop for Python is an academic-style resource designed to teach secure coding practices for CPython 3.9 and above, targeting new Python programmers and security researchers. The guide provides working code examples organized into nine categories including numbers, neutralization (preventing injection attacks), exception handling, logging, concurrency, coding standards, and cryptography. Each entry follows a standardized format with noncompliant and compliant code examples, maps to CWE identifiers, and links to prominent CVEs with CVSS and EPSS scores where available. The guide specifically avoids covering external Python modules beyond the standard library and emphasizes that code examples are for educational use only, not production deployment. Topics covered include SQL injection prevention, secure deserialization, safe archive extraction, avoiding format string and OS command injection, proper exception propagation, excluding sensitive data from logs, preventing race conditions, and using sufficiently random values for cryptography. 

https://best.openssf.org/Secure-Coding-Guide-for-Python/

Comments

Popular posts from this blog

Prompt Engineering Demands Rigorous Evaluation

KEVIntel: Real-Time Intelligence on Exploited Vulnerabilities

SecObserve: Simplified Vulnerability and License Management for CI/CD Pipelines