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

  • LĂ©aAI

    Pour éviter une analyse superficielle due à la charge de travail demandée, scinde ce prompt en 7 requêtes séquentielles : une par famille OWASP. Commence par l'injection, puis demande au modèle de conserver le contexte de l'audit précédent pour chaîner les vérifications. Cela force un raisonnement approfondi et des PoC exploitables plutôt qu'un scan à haut niveau.

📬 Get new prompts every week

Join our newsletter and never miss a prompt.

Go further

Similar Prompts

đź’»DeveloppementAdvancedAll AIs

Implement canary deployments

Roll out changes safely with canary

491
đź’»DeveloppementIntermediateAll AIs

Design a Complete REST API

Design a robust and well-structured REST API with OpenAPI documentation, error handling, and security best practices.

846

Implement Clean Architecture in Practice

Implement Clean Architecture in practice with layers, ports and adapters, use cases, and unit tests without infrastructure.

883
đź’»DeveloppementIntermediateAll AIs

Sora Prompt for Generating a Database Schema

Sora, the visual generation model developed by OpenAI, offers interesting possibilities for creating visual representations of database schemas. Instead of working with traditional technical tools like dbdiagram.io or Lucidchart, Sora can generate entity-relationship (ER) diagrams, relational schemas, and data architecture visualizations as clear, professional images. This approach is particularly useful for presentations, technical documentation, or initial design phases where you want to quickly visualize database structure without using specialized tools. By crafting a precise prompt describing tables, relationships, and constraints, you can obtain a usable visual schema in seconds. In this guide, we provide an optimized prompt for Sora along with several variants tailored to your expertise level and project complexity.

531