This is taking longer than expected.

Try againBrowse the library
AI Blocks

All AI specialists

Hire an AI-written code security reviewer

Paste AI-written app code. Get a ranked list of leaked keys, open database rules and prompt injection holes, each with the fix and a rescan list.

What you give

  • The code files to review, pasted or uploaded. Start with client-side files, API routes, and any file that calls an AI model
  • Your stack, such as Next.js with Supabase, and what sensitive data the app holds
  • The list from a past audit, if this is a rescan (optional)

What you get

  • A coverage note saying what was checked and what was not
  • Findings ranked worst first, each with file and line, how it could be abused, and the fix
  • A rotate-now list for every key that was exposed
  • A list of safe patterns that were left alone, so you know it did not miss them

An example

You built an app with Cursor, Lovable, bolt, v0 or Claude Code and want a security check before real users sign up.

You ask: “Paste AI-written app code. Use the material I attach and ask for anything essential that is missing.”

You get back:

  • Coverage. Which files were checked, what was out of reach and the stack assumed.
  • Findings. Each problem worst first, with file and line, how it could be abused, the fix and a confidence level.
  • Rotate now. Each exposed key by type and location, never its value, with where to change it.

An example, not your task.

Words used here

  • API: a way for one piece of software to talk to another

Hire this specialist

It is free and needs no account. Download the pack, give it to your AI and tell it the job. Your AI asks for anything it is missing, then does the work and checks it.

Download the specialist

Related specialists

Skills and workflows for this job: Keep your code secure

Details

Everything it can hand back

Your task sets the actual outputs. The specialist picks the methods that cover them.

  • A coverage note saying what was checked and what was not
  • Findings ranked worst first, each with file and line, how it could be abused, and the fix
  • A rotate-now list for every key that was exposed
  • A list of safe patterns that were left alone, so you know it did not miss them
  • A fix order, and a checklist to rescan after changes

How it does the job well

  • Every finding needs a file and line (or "line not given"), a plain sentence on how an attacker would use it, and one fix. If you cannot name the use, do not report it.
  • Never report a public-by-design value as a leak, such as a Supabase anon key or a Stripe publishable key. List it under Left alone.
  • A leaked secret is not closed until it is rotated at the provider. Always include the rotate step. Treat any secret in client-reachable code as already exposed.
  • Say "rules that look on but allow everyone" for a blanket allow policy. Say "needs a rule scoped to the signed-in user's ID". Authorization must never rest on a field the user can edit, such as user metadata or a role string sent from the browser.
  • Prompt injection: rate by where the input lands. User-role message with no tools is safe and not flagged. System prompt is medium. A call that also has tools is high. Always mark these heuristic and medium confidence, and tell the user to confirm by hand. Stay silent on ambiguous flows rather than guess.
  • Name the asset, the threat and the impact before recommending controls.
  • Rank findings by real risk (likelihood and impact), with evidence for each.

Mistakes it avoids

  • Crying wolf on public keys or on user text kept in its own message with no tools.
  • Printing any secret value.
  • Reporting the profile's example code as the user's finding.
  • Long lists of generic issues with no evidence they apply.
  • Testing or scanning systems without permission.
  • Presenting a legal opinion as final.

What a good result looks like

An example, not your task: You built an app with Cursor, Lovable, bolt, v0 or Claude Code and want a security check before real users sign up.

  • Coverage. Which files were checked, what was out of reach and the stack assumed.
  • Findings. Each problem worst first, with file and line, how it could be abused, the fix and a confidence level.
  • Rotate now. Each exposed key by type and location, never its value, with where to change it.
  • Left alone. Safe patterns it saw and did not flag, such as a public anon key.
  • Fix order. The order to fix findings in, with why.
  • Rescan checklist. What to re-check after fixes, and what a pass looks like.

How the work is checked

  • Each finding has a location, evidence, severity and a specific fix.
  • Likely false positives are checked and removed.
  • Items that need a lawyer or auditor are clearly marked.
  • States which checks passed, failed or could not run, and names missing inputs.

These checks have not been run against a model yet. Your AI uses them to check its own work.

Capabilities

  • Fix the scope. It confirms which files, stack and data it has seen, and says what is out of reach, such as your live database settings.
  • Check for exposed secrets. It looks for keys in code that reaches the browser, including public-prefix variables, and ignores keys designed to be public.
  • Check database access. It looks for rules that allow everyone, tables with no rules, open storage and access checks that trust editable user fields.
  • Check AI calls. It follows user input into AI calls and rates the risk by where it lands, such as a user message, the system prompt or a call that also has tools.
  • Rank and explain. It sorts findings worst first, in plain words before any code term, with the line, the abuse path and the fix.
  • Plan the rescan. It lists what to re-check after fixes, so you can see what is resolved, what remains and what is new.

How the role works

  1. Checks your task, context and available tools.
  2. Picks the methods needed and prepares a work plan.
  3. Carries out supported tasks, with each method's limits and review gates.
  4. Checks the real deliverables and corrects supported faults.
  5. Hands back files, evidence and unresolved gaps.

Your specialist's working setup

Download the base specialist without a task form or account. README.md and SETUP.md explain how to use the folder. SOUL.md defines its scope. INTAKE.md asks missing questions inside your AI. PLAYBOOK.md, SKILLS.md, BEST_PRACTICES.md, CHECKS.md and HANDOFF.md guide the work and its checked deliverables.

Complete associated skills, supporting files and licences are included. Choose only the methods needed for the actual task. Keep context, working files and accepted feedback in your AI project.

Use this specialist through MCP or the API

Call prepare_specialist with role_id security-ai-generated-code-auditor only. No task is required to load it. Your AI asks what job you need done, what you want back and which relevant context it can use.

For task-led hiring, call find_specialist, explain the suggested specialists and let the user accept or change the team.

Complete ZIP: Download base specialist. API: GET /api/v1/specialists/security-ai-generated-code-auditor/pack. The host AI supplies its own model, tools and execution; a pack does not connect accounts or run a task.

Inputs and helpful context

The specialist starts from the task brief. Only active methods require their inputs.

For the primary method, when used

  • The code files to review, pasted or uploaded. Start with client-side files, API routes, and any file that calls an AI model.
  • Your database rules and setup files, such as SQL migrations or policy definitions (optional)
  • The names of your environment variables, with the values removed (optional)
  • Your stack, such as Next.js with Supabase, and what sensitive data the app holds
  • The list from a past audit, if this is a rescan (optional)

Helpful context (optional)

  • Your SQL migration files or a list of your database tables and their access rules.
  • The settings page of your hosting provider showing which variables are public.
  • A list of every AI model call in your app and the tools each one can use.

Tools and access

  • Claude Code, Cursor or another AI tool that can open your project folder: It can read every file and follow user input from the request to the AI call. A plain chat only sees what you paste.

Functions and deliverables

  • AI-written code security reviewer: Paste AI-written app code. Get a ranked list of leaked keys, open database rules and prompt injection holes, each with the fix and a rescan list.
    • A coverage note saying what was checked and what was not
    • Findings ranked worst first, each with file and line, how it could be abused, and the fix
    • A rotate-now list for every key that was exposed
    • A list of safe patterns that were left alone, so you know it did not miss them
    • A fix order, and a checklist to rescan after changes
    Source: Michael Sitarzewski and Agency Agents contributors.
  • Supabase connection prompt writer: Paste one prompt into Claude Code to connect your app to Supabase from the server, keep the secret key safe and run a first read check.
    • A server-only Supabase client file (lib/supabase/admin.ts)
    • A test script (scripts/test-db-connection.ts)
    • A plain explanation of the service role key, and what the test should print
  • Code change security reviewer: Check a code diff for security risks. Paste your pull request and get ranked findings on only the changed lines, each with a fix.
    • A verdict: safe, fix first or look closer
    • Findings with the line, the abuse and the level
    • The smallest fix for each
    • What was not checked
  • App security threat planner: Describe your app, users and sensitive data. Get a first threat list, entry points, practical safeguards and assumptions to check.
    • A list of parts and entry points
    • The top threats, ranked, with likelihood and damage
    • One practical fix for each
    • What was assumed and what to confirm
  • AI project context organiser: Share your project and next task. Get a short rules file, a focused file list and a clear handoff for later sessions.
    • A ready rules file for your project
    • A list of which files to load for each task
    • Rules for when to reset or trim the session
    • A checklist for spotting drifting answers
    Source: Addy Osmani.

Tasks you can use it for

  • You built an app with Cursor, Lovable, bolt, v0 or Claude Code and want a security check before real users sign up.
  • Your app uses Supabase or Postgres and you are not sure the access rules really keep users apart.
  • Your app has an AI chat or agent and you want to know if a user could hijack its instructions.
  • You just fixed a list of security issues and want a rescan to see what is resolved and what is new.

Limits to check before starting

  • You want a deep review of any kind of code, a threat model or advice on scanning tools. Use the Application security reviewer.
  • You only want a quick check of one code change. Use the Code change security reviewer.
  • You want keys and private files found on a live website. Use the Exposed secrets finder.
  • You want a hands-on attack test of your running app. Use the Penetration test planner or the Live app security tester, and only on systems you own.

Best way to use this role

Give it one clear outcome, the actual files and a definition of done. Keep the work in one AI project so it can reuse checked context and earlier files.

  • Download the pack from this page and add it to your AI as a skill. If you cannot, paste SKILL.md into a new chat, then paste references/source-agent.md.
  • Paste or upload the files to review. Remove real secret values first. Add your database rules and your stack. A chat AI reads only what you give it, so for a whole project use an AI tool that can open your project folder.
  • Type "Audit this code. Worst first. Show the line, the risk and the fix for each finding. Do not print secret values. Tell me what you could not check."
  • Read the rotate-now list first. Change those keys at the provider, even if you delete them from the code.
  • Ask your AI coding tool to apply the fixes one at a time. Then paste the changed files back and ask for a rescan.
  • Treat prompt injection findings as a prompt to look closer. They are medium confidence, and you confirm each one by hand.

Read it as data

Read the complete role setup as JSON. Connect your AI to the AI Blocks MCP library and read aiblocks://roles/security-ai-generated-code-auditor for its role instructions and pinned sources.

This is a prepared AI role. No task has run. Your AI carries out authorized work using its available tools and reports the actual deliverables and checks.