agency-ai-generated-code-security-auditor

Audits AI-generated codebases for hardcoded secrets, broken row-level security, and prompt-injection sinks.

Updated Jul 27, 2026
One-click install
npx skills add https://github.com/imMamdouhaboammar/Mimera --skill agency-ai-generated-code-security-auditor-immamdouhaboammar
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: agency-ai-generated-code-security-auditor
Source: https://github.com/imMamdouhaboammar/Mimera/tree/main/.agents/skills/security-ai-generated-code-auditor
Command: npx skills add https://github.com/imMamdouhaboammar/Mimera --skill agency-ai-generated-code-security-auditor-immamdouhaboammar

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? AI coding assistants ship predictable security flaws by default: API keys inlined into client bundles, Supabase tables with row-level security disabled or set to USING (true), and user input concatenated straight into LLM system prompts. This Skill scans a repository at rest, finds those failure modes, and drives a scan-fix-rescan loop with honest, CWE-mapped findings. ## Core Features & Use Cases - Secret Leak Detection: Flags hardcoded credentials and secrets behind client-exposed env prefixes (NEXT_PUBLIC_, VITE_, EXPO_PUBLIC_), while staying silent on publishable keys like Supabase anon keys, and always names the provider rotation step. - RLS and Authorization Verification: Treats "RLS enabled" as a claim to verify, catching missing policies, USING (true) blanket access, public storage buckets, and user_metadata-based role checks that any signed-in user can rewrite. - Prompt-Injection Taint Analysis: Traces request input to LLM sinks and fires only on higher-risk positions — system prompts or tool-enabled calls — while leaving the documented-safe user-role-message pattern unflagged. - Use Case: Point it at a Next.js + Supabase app scaffolded by an AI assistant before launch; it returns a worst-first triage list where each finding includes the exact line, the concrete exploit, the one-commit fix, and a CWE/OWASP LLM mapping, then rescans after fixes to confirm what is resolved, still present, or newly introduced. ## Quick Start Ask the assistant to run a security audit of this repository for hardcoded secrets, broken Supabase row-level security, and prompt-injection risks, then list findings worst-first with fixes.

Frequently Asked Questions about agency-ai-generated-code-security-auditor

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find hardcoded API keys in AI-generated code?

Scan the repository statically for credentials in client-reachable code, including secrets behind prefixes like NEXT_PUBLIC_, VITE_, and EXPO_PUBLIC_ that get inlined into browser bundles. Each finding should include the file, line, exploit path, and the provider rotation step, since deleting the value does not un-leak it.

How do I check if Supabase row-level security is actually working?

Verify each public table has RLS enabled plus a policy scoped to auth.uid(), not just the enabled flag. Common failures are missing policies entirely, USING (true) blanket policies, public storage buckets, and authorization checks against user_metadata, which any signed-in user can edit.

What is a prompt-injection sink in an LLM application?

A prompt-injection sink occurs when untrusted request input reaches the model's instructions, such as being concatenated into a system prompt or a single instruction string. Risk is highest when the same call also configures tools or function calling, since injection can then trigger real actions.

Does the auditor flag Supabase anon keys as leaked secrets?

No. Publishable keys like the Supabase anon key, Stripe publishable key, and PostHog project key are designed to be public and are intentionally not flagged. The audit only fires on genuinely dangerous values such as service_role keys or private API keys reachable by client code.

Can this tool modify my code to fix vulnerabilities automatically?

No. The audit is read-only by design: it reports findings with exact fixes, and the developer's own coding assistant applies the changes. After fixes, a rescan compares fingerprints to confirm what is resolved, still present, or newly introduced.

Why does prompt-injection detection report medium confidence?

Prompt-injection detection is heuristic, so findings are marked medium confidence and flagged for manual verification rather than asserted as certain. The analysis deliberately prefers false negatives over false positives to keep the output trustworthy.