Source Code Security Audit
Audit your code security according to the OWASP Top 10 with vulnerability identification, exploitation PoC, and fixes.
Paste in your AI
Paste this prompt in ChatGPT, Claude or Gemini and customize the variables in brackets.
You are an application security (AppSec) expert with OSCP certification and a specialization in secure code review. I need to perform a complete security audit of my code.
Code to audit:
[paste the code]
Application context:
- Type: [e.g., public REST API, B2C web app, internal back office]
- Data processed: [e.g., GDPR personal data, financial information, health data]
- Authentication: [e.g., JWT, sessions, OAuth2]
- Stack: [e.g., Node.js/Express, Python/Django, PHP/Laravel]
Perform a complete security audit based on the OWASP Top 10, covering:
- Injection: SQL injection, NoSQL injection, command injection, LDAP injection. Identify unescaped parameters.
- Authentication and sessions: weak tokens, sessions that are never invalidated, plaintext passwords, misconfigured JWTs.
- Exposure of sensitive data: logs containing personal data, secrets in the code, insufficient encryption.
- Access control: IDOR (Insecure Direct Object Reference), privilege escalation, misconfigured CORS.
- XSS and client-side injection: unsanitized user input, unprotected innerHTML.
- Security misconfiguration: missing headers, debug modes enabled, overly verbose errors.
- Vulnerable dependencies: identify libraries that need updating.
For each vulnerability, provide: an estimated CVSS score, a proof of concept (PoC) of the exploit, and the fixed code.
Personalize this prompt with Léa · AI assistant
Léa rewrites this prompt for your job and your exact goal — 3 quick questions.
Why this prompt works
This prompt positions the AI as a security auditor following a standardized methodology (OWASP Top 10), ensuring systematic coverage of the most common vulnerabilities rather than an ad hoc review based on intuitions. Requesting a PoC (Proof of Concept) exploit for each vulnerability is a professional technique: it allows concretely demonstrating the risk to teams who might minimize the urgency of a theoretical fix. A real PoC changes risk perception. Including the business context (data type, application type) is essential because a vulnerability in a public API handling GDPR data is much more critical than in an internal back-office, justifying different fix prioritization.
Use Cases
Expected Output
A structured audit report with vulnerabilities classified by severity, exploitation PoC, CVSS scores, and fixed code for each issue.
Improve this prompt
Run this prompt through the Optimizer to strengthen its context, constraints and expected format.
Improve this prompt with the OptimizerComments
Be the first to comment on this prompt.
Glossary Terms
📬 Get new prompts every week
Join our newsletter and never miss a prompt.
Go further
Improve this prompt with the Optimizer
Analyze the prompt, strengthen the context and get a more precise version.
Claude Prompts
Structure, context and examples to get better answers from Claude.
AI prompts for web developers
Code review and debugging, keeping API keys and secrets out of the prompt.
Security, GDPR & Business Plans
ChatGPT Business, Claude Team, Gemini Workspace and Mistral Vibe compared from vendor sources: training, EU hosting and a GDPR checklist.
Similar Prompts
Task brief for Claude Code: frame a feature end to end
Brief template to delegate a complete feature to Claude Code: goal, starting point, constraints, definition of done, working rules and recap format.
Write a project's CLAUDE.md: the brief Claude Code reads at every session
Turns your project description into a dense CLAUDE.md: commands, structure, conventions, pitfalls, off-limits areas and situations where the agent must ask before acting.
Design a Secure Webhook API
Design a webhook API with event subscriptions, signed deliveries, retry limits, and a delivery log your support team can inspect.
Generate Storybook Stories for UI Components
Generate Storybook stories for a UI component, with visual variants, interactive controls, interaction tests, and MDX documentation.