P
💻DeveloppementAdvancedClaude

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

Adapt this prompt

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:

  1. Injection: SQL injection, NoSQL injection, command injection, LDAP injection. Identify unescaped parameters.
  2. Authentication and sessions: weak tokens, sessions that are never invalidated, plaintext passwords, misconfigured JWTs.
  3. Exposure of sensitive data: logs containing personal data, secrets in the code, insufficient encryption.
  4. Access control: IDOR (Insecure Direct Object Reference), privilege escalation, misconfigured CORS.
  5. XSS and client-side injection: unsanitized user input, unprotected innerHTML.
  6. Security misconfiguration: missing headers, debug modes enabled, overly verbose errors.
  7. 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

Pre-production security auditGDPR compliance and data securityApplication security training

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 Optimizer

Comments

Be the first to comment on this prompt.

📬 Get new prompts every week

Join our newsletter and never miss a prompt.

Go further

Similar Prompts

💻DeveloppementIntermediateClaude

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.

1681
💻DeveloppementIntermediateClaude

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.

640
💻DeveloppementAdvancedAll AIs

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.

411
💻DeveloppementIntermediateAll AIs

Generate Storybook Stories for UI Components

Generate Storybook stories for a UI component, with visual variants, interactive controls, interaction tests, and MDX documentation.

474