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

Paste this prompt in ChatGPT, Claude or Gemini and customize the variables in brackets.

Tu es un expert en cybersécurité applicative (AppSec) certifié OSCP avec une spécialisation en revue de code sécuritaire. Je dois effectuer un audit de sécurité complet de mon code.

Code à auditer :

[COLLER_LE_CODE]

Contexte de l'application :

  • Type : [EX: API REST publique, application web B2C, back-office interne]
  • Données traitées : [EX: données personnelles RGPD, informations financières, données de santé]
  • Authentification : [EX: JWT, sessions, OAuth2]
  • Stack : [EX: Node.js/Express, Python/Django, PHP/Laravel]

Effectue un audit de sécurité complet basé sur l'OWASP Top 10 et couvrant :

  1. Injection : SQL injection, NoSQL injection, command injection, LDAP injection. Identifie les paramètres non échappés.
  2. Authentification et sessions : tokens faibles, sessions non invalidées, mots de passe en clair, JWT mal configurés.
  3. Exposition de données sensibles : logs contenant des données personnelles, secrets dans le code, chiffrement insuffisant.
  4. Contrôle d'accès : IDOR (Insecure Direct Object Reference), escalade de privilèges, CORS mal configuré.
  5. XSS et injection côté client : entrées utilisateur non sanitisées, innerHTML non protégé.
  6. Mauvaise configuration de sécurité : headers manquants, modes debug activés, erreurs trop verboses.
  7. Dépendances vulnérables : identifie les librairies à mettre à jour.

Pour chaque vulnérabilité, fournis : CVSS score estimé, preuve de concept (PoC) de l'exploitation, et le code corrigé.

100% found this useful

Personalize this prompt with Léa

Léa rewrites this prompt for your job and your exact goal — 3 quick questions.

Why this prompt works

<p>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.</p><p>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.</p><p>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.</p>

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

💻DeveloppementBeginnerAll AIs

Brand Comment Responses

Consistent and fast social media community management

0219
💻DeveloppementIntermediateClaude

Complete Code Review for Pull Requests

Get an exhaustive code review covering quality, performance, security, and maintainability for any language.

34561
💻DeveloppementAdvancedChatGPT

Master Advanced TypeScript Types

Strengthen your code's type safety with advanced generics, utility types, and discriminated unions.

39548
💻DeveloppementIntermediateAll AIs

Perplexity Prompt for Generating Python Code

Perplexity AI stands out from other AI assistants with its unique ability to combine real-time web search and code generation. When it comes to producing Python code, this advantage is significant: Perplexity can rely on the latest official documentation, current best practices, and up-to-date libraries to generate reliable and modern code. Unlike a classic LLM whose knowledge is frozen at a cutoff date, Perplexity verifies its sources in real time, drastically reducing the risk of obsolete code or deprecated functions. Whether you are a developer looking to speed up your workflow, a data scientist wanting to prototype quickly, or a beginner learning Python, a well-structured prompt turns Perplexity into a true development assistant. The key lies in the precision of your request: by specifying the technical context, constraints, and expected output format, you get production-ready code rather than a generic snippet. This guide offers optimized prompts to get the most out of Perplexity in your Python projects.

0204