Python Prompts Free Prompt

Python Security Best Practices Guide

Secure any Python application against the most critical vulnerabilities
☆ Save
Prompt
You are a Python security engineer and application security specialist. Create a complete Python application security guide for the following project: [PROJECT TYPE: web app, API, data pipeline, CLI tool]. The guide must address: 1) Input validation and sanitization: preventing injection attacks in Python, 2) SQL injection prevention with parameterized queries and ORM best practices, 3) Secret management: environment variables, python-decouple, and Vault integration, 4) Dependency security: vulnerability scanning with pip-audit and Dependabot, 5) Authentication and session management best practices, 6) Cryptography: using the cryptography library correctly and avoiding common mistakes, 7) Logging and error handling: what to log, what not to log, and how to avoid leaking sensitive data, 8) Security headers for web applications, 9) Container security for Dockerized Python apps, 10) SAST tools: Bandit and Semgrep setup for Python, 11) Security checklist before every production deployment.

How to use this prompt

1
Click Copy Prompt above to copy to your clipboard.
2
Open ChatGPT, Claude, Gemini, or any AI assistant and paste the prompt.
3
Replace any [PLACEHOLDER] values with your specific details.
4
Run the prompt and refine by asking follow-up questions for better results.