vibe coding security audit skill
by Umer Farooq
Codebase security for apps built quickly with AI often lags behind functionality.
Free
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
| Category | Finding | Severity | Status |
|---|---|---|---|
| Database (RLS) | profiles table had RLS enabled but lacked a SELECT policy, allowing public read access. | 🔴 Critical | Fixed |
| Secrets Management | Supabase Service Role Key found hardcoded in lib/admin.ts. | 🔴 Critical | Flagged |
| Authorization | api/orders/[id] route lacked ownership check; any user could view any order ID. | 🟠 High | Fixed |
| Headers | Missing Content-Security-Policy and X-Content-Type-Options in next.config.js. | 🟡 Medium | Fixed |
| Input Validation | Search query in api/search.ts used string interpolation for a raw SQL fragment. | 🟠 High | Fixed |
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_KEYto 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
- Stack identification detects the framework, database, and auth provider to apply relevant security patterns for Next.js, Supabase, Firebase, or Node.
- Initial sweep runs a grep-based scan to surface candidate vulnerabilities across the project.
- Manual audit performs a deep trace of request handlers and database policies to find logic-based flaws.
- Severity classification categorizes findings from Critical to Low based on data sensitivity and exploitability.
- 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
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
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 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
What's inside
Frequently Asked Questions
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.