Why do this now
There are bots scanning the internet for breaches 24 hours a day. Most companies only discover the flaw after it's already been exploited, usually because no one ever looked closely at security, only at the next feature.
If you don't have the budget or time for a full pentest yet, you can run a first check yourself, right now, with the AI you already use to code every day. It's not ideal, but it's infinitely better than nothing.
What this prompt does, and what it doesn't
The prompt below asks an AI to review your code or architecture looking for the most common flaw types in SaaS: access control, authentication, data exposure, injection, SSRF, exposed secrets, and outdated dependencies. It's the same kind of check an automated scanner would run, just explained in natural language so any general-purpose AI can understand your product's context.
Before you paste anything into an AI
Never paste an API key, password, token, database connection string, or real customer data into a third-party AI. Anonymize it first: rename sensitive variables, strip out secret values, use synthetic data instead of real data. The goal is to evaluate the code pattern, not expose what it protects.
The prompt
Copy the text below, paste it into an AI (ChatGPT, Claude, Gemini, or the coding assistant you already use), and replace the last line with the code snippet, route, or architecture description you want evaluated.
You are an experienced pentester reviewing the code of a multi-tenant SaaS. Analyze the code snippet, architecture, or system description I'll paste below, and point out real security risks, not style suggestions. Check specifically for: 1. ACCESS CONTROL AND TENANT ISOLATION - Does every route that receives a resource ID (user, order, file, etc.) verify that the resource belongs to the authenticated tenant or user, or does it just trust the ID sent in the request? (this is IDOR/BOLA) - Does the tenant_id come from the signed token, or can it be passed via query, body, or path by the client itself? 2. AUTHENTICATION - Is the password stored with a strong hash (bcrypt or argon2), never in plain text or a weak hash like unsalted MD5/SHA1? - Is there rate limiting on login, password recovery, and other authentication endpoints? - Does the session token expire, get invalidated on logout, and become unusable after a password reset? 3. DATA EXPOSURE - Does any API response return more fields than the frontend needs, including data from another user or tenant? - Is there a log, error message, or stack trace that leaks sensitive data, like a password, token, key, or a third party's email? 4. INJECTION AND DATA INPUT - Is all user input validated and sanitized before becoming a SQL query, a system command, or being interpreted as HTML/JS? - Does file upload validate the actual file type and size, not just the file name extension? 5. SSRF AND EXTERNAL REQUESTS - Does the system make any HTTP request to a user-supplied URL, like a webhook, image import by URL, or an integration? If so, is that URL validated against internal IP ranges or cloud metadata endpoints? 6. SECRETS AND CONFIGURATION - Is an API key, database password, or JWT secret hardcoded in the code, or in a separate environment variable? - Is there any .env file, private key, or credential committed in the Git history? 7. DEPENDENCIES - Do the libraries in use have an outdated version with a known vulnerability? If you have access, run your language's dependency audit tool. For each item above, answer: OK, RISK FOUND (saying where and why), or CANNOT ASSESS (not enough information). At the end, list the 3 most critical risks found, in order of severity. [Paste the code, architecture description, or specific route you want evaluated here]
After the AI responds
Whatever it flags becomes your initial fix list. But the more important question is what it missed. The four real cases we've already resolved (SSRF in an enterprise platform, a SAML authentication bypass, IDOR in a B2B marketplace, and a network hijack via an outdated CMS) were all found by manual testing, not by running a scanner or an AI.
Want to know what the AI doesn't see in your system?
Request a diagnostic