vibe coding security audit skill

    by Umer Farooq

    1

    Codebase security for apps built quickly with AI often lags behind functionality.

    Free

    Security scanned

    Works with the AI Agents you already use

    vibe coding security audit skill

    Example session with this skill installed

    I've been building this Next.js and Supabase app with AI. Can you check if it's secure before I deploy it to Vercel? I'm worried about people accessing data they shouldn't.

    • Read your context and instructions
    • Compiled the vibe coding security

    I have completed a security audit of your Next.js and Supabase application. I identified several high-risk issues related to Row Level Security and sensitive data exposure. I have applied fixes for the direct code vulnerabilities and outlined the remaining architectural concerns below.

    Security Audit Report

    CategoryFindingSeverityStatus
    Database (RLS)profiles table had RLS enabled but lacked a SELECT policy, allowing public read access.🔴 CriticalFixed
    Secrets ManagementSupabase Service Role Key found hardcoded in lib/admin.ts.🔴 CriticalFlagged
    Authorizationapi/orders/[id] route lacked ownership check; any user could view any order ID.🟠 HighFixed
    HeadersMissing Content-Security-Policy and X-Content-Type-Options in next.config.js.🟡 MediumFixed
    Input ValidationSearch query in api/search.ts used string interpolation for a raw SQL fragment.🟠 HighFixed

    Critical Findings Details

    1. Broken Object Level Authorization (IDOR)
    The endpoint /api/orders/[id] was fetching data based solely on the URL parameter without verifying the user_id from the authenticated session. I updated the handler to include where('user_id', session.user.id) in the query.

    2. Leaked Service Role Key
    Your lib/admin.ts file contained the SUPABASE_SERVICE_ROLE_KEY. This key bypasses all RLS policies.

    Action Required: You must rotate this key in the Supabase dashboard immediately. I have moved the reference to process.env.SUPABASE_SERVICE_ROLE_KEY.

    3. Supabase RLS Gap
    The profiles table was set to AUTHENTICATED read access but lacked a policy check to ensure users can only read their own profile. I added a new policy: using (auth.uid() = id).

    Next steps

    • Rotate your Supabase Service Role Key immediately via the Supabase dashboard.
    • Add the SUPABASE_SERVICE_ROLE_KEY to your Vercel environment variables.
    • Review the new RLS policies in supabase/migrations/ to ensure they match your business logic.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Codebase security for apps built quickly with AI often lags behind functionality. Vibe-coded projects frequently skip essential authorization, rate limiting, and secret management because these issues don't surface in a standard UI demo. This skill performs a systematic security audit to find and fix common vulnerabilities before they reach production.

    What it does

    • OWASP-based scanning checks the codebase against 19 distinct categories including SQL injection, XSS, and CSRF.
    • Access control verification audits Row Level Security (RLS), IDOR, and broken object-level authorization that automated tools often miss.
    • Secret detection finds API keys, JWT secrets, and credentials leaked in client-side code or git history.
    • Auth hardening reviews session handling, password hashing, MFA implementation, and rate limiting.
    • AI-specific checks analyzes LLM features for prompt injection risks and potential cost abuse vectors.
    • Automated remediation fixes contained issues like missing headers or unparameterized queries while flagging architectural risks.

    How it works

    1. Stack identification detects the framework, database, and auth provider to apply relevant security patterns for Next.js, Supabase, Firebase, or Node.
    2. Initial sweep runs a grep-based scan to surface candidate vulnerabilities across the project.
    3. Manual audit performs a deep trace of request handlers and database policies to find logic-based flaws.
    4. Severity classification categorizes findings from Critical to Low based on data sensitivity and exploitability.
    5. Reporting generates a plain-English summary of what was fixed and what requires manual product decisions.

    Frameworks & tools

    This skill supports Next.js, Vercel, Supabase, Firebase, Node.js, Express, and PHP/WordPress. It utilizes specialized shell scripts for pattern matching and follows OWASP ASVS standards.

    Why this beats prompting it yourself

    Generic prompts often miss stack-specific nuances like Supabase RLS or Next.js middleware traps. This skill uses a structured 19-category checklist and a multi-stage workflow to ensure no category, from SSRF to webhook verification, is skipped.

    Use cases

    • Running a pre-launch security check on a web app generated by Claude or Cursor.
    • Finding API routes where users can accidentally access other users' private data.
    • Hardening a Supabase or Firebase backend by auditing security rules and policies.
    • Identifying and moving hardcoded environment variables out of frontend components.

    Known limitations

    This is a static code-review pass. It cannot verify infrastructure-level controls like firewalls or cloud IAM, nor does it perform live dynamic penetration testing.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Free to use

    No account required to browse

    Trust & safety

    Security scan

    Security scan passed 15 days ago

    • Free with an Agensi account

    Permissions

    Terminal / Shell
    Read Files
    Network Access
    Listed15 days ago

    What's inside

    Frequently Asked Questions

    This skill is designed for apps built with 'vibe coding' tools like Cursor, Bolt, or Claude Engineer. It fills the gap where AI generates functional UI but overlooks critical backend protections like Row Level Security (RLS) or secure session handling.

    The skill is optimized for modern web stacks including Next.js, Node.js, and Express, with deep support for serverless backends like Supabase and Firebase. It works across any AI agent environment that supports filesystem access and shell execution.

    You receive the complete 19-category security auditing workflow, a suite of specialized shell-based scanning scripts, and the automated remediation logic to fix common vulnerabilities instantly.

    While it can automatically fix issues like missing security headers or unparameterized queries, it is designed to flag complex architectural flaws for your review to ensure your app's logic remains intact.

    It focuses on static codebase analysis and logic flow; it does not perform live 'black-box' penetration testing or audit external cloud infrastructure like AWS IAM roles or VPC settings.

    New in Security

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Security.

    Free