Works with the AI Agents you already use
Security Audit for AI-Built Apps: Leaked Keys & AI Risks
This skill finds those, and then verifies them, so you get a short list of real problems instead of 80 regex hits.
Free
What it does
- Finds API keys and passwords hidden in your code or git history
- Flags secrets that were accidentally sent to the user's web browser
- Identifies when AI output can trick your app into running bad commands
- Checks if user data is properly protected from other logged-in users
- Verifies every security hole with a safe test to prove it is real
- Proposes the exact code changes needed to fix confirmed bugs
Who it's for
Founders of AI startups and apps
Catch leaked keys and prompt injection holes before they cost you money.
Try asking: “Audit my new AI chatbot repo for security risks.”
Developers using AI to write code (vibe-coding)
Find the common security bugs that AI often introduces into your app.
Try asking: “Check if this code is safe to make public on GitHub.”
Small business owners with custom web tools
Ensure your customer data isn't exposed through your API or database.
Try asking: “Do a security review of my customer portal code.”
Security Audit for AI-Built Apps: Leaked Keys & AI Risks
Example session with this skill installed
Audit this repo before we launch. FastAPI backend in app/, React (Vite) frontend in web/, uses OpenAI, deployed with Docker and GitHub Actions.
- Read your context and instructions
- Compiled the security audit
- Generated the document
Security audit: ./ scope: app/, web/, Dockerfile, .github/ method: sec_scan.py --history 500 + manual review
Rotate now
- OpenAI key in git history: app/old_config.py, commit 0d49f57 (deleted later, still in history). Revoke it in the OpenAI dashboard and issue a new one.
- .env is committed (DATABASE_URL with password). Rotate the DB password, git rm --cached .env, add .env* to .gitignore.
- web/src/Chat.tsx:1 VITE_OPENAI_API_KEY ships the key to every browser. Move the call to a FastAPI route.
Confirmed
- [Critical] Model output executed: app/main.py:14 exec(response.content)
Path: POST /agent -> messages -> client.chat -> response.content -> exec. Anyone who can reach /agent, or any text the model reads, gets RCE.
Fix: parse a JSON action and dispatch from an allow-list (diff below). Test: test_agent_rejects_code_in_response. - [Critical] GitHub Actions pwn request: ci.yml runs pull_request_target and checks out the PR head with write-all permissions.
- [High] SQL injection: app/main.py:16 f-string with query param q. Proof: test sends "' OR 1=1 --" and gets every row.
- [High] IDOR: GET /orders/{id} returns any order; no owner check (app/orders.py:22).
Hardening: Dockerfile runs as root, python:latest unpinned, requests without timeout.
Checked and dismissed (5): PY_SQL_STRING in scripts/report.py (column names only, values parameterised).
Chat.tsx
PDF · document
Example file from a real run - the skill writes it into your workspace.
Connects securely to your tools. The creator never sees your data.
About this skill
AI-built apps fail security in predictable ways: an OpenAI key in a VITE_ variable, a .env committed in week one, model output piped into exec(), a text-to-SQL endpoint with a write-capable DB user, an /api/orders/:id that never checks whose order it is. This skill finds those, and then verifies them, so you get a short list of real problems instead of 80 regex hits.
The scanner (sec_scan.py, stdlib only, read-only, no network)
- Secrets: OpenAI, Anthropic, AWS, GitHub, Stripe live, Slack, Google, Hugging Face, SendGrid, private keys, DB URLs with passwords, plus high-entropy literals assigned to secret-looking names. Committed
.envfiles. Secrets buried in git history (--history N), which are still exposed even after you delete them. Values are always masked in output. - Keys shipped to the browser:
NEXT_PUBLIC_/VITE_/REACT_APP_/EXPO_PUBLIC_variables that look like LLM keys, service-role keys or secrets. - LLM-specific sinks: model output into
eval/exec, a shell, SQL, or raw HTML (dangerouslySetInnerHTML); user input interpolated into the system prompt. - Classic bugs in Python and JS/TS: SQL via f-strings/templates,
shell=True,child_process.execwith interpolation,pickle/torch.load/yaml.load, TLS verification off, JWT without signature checks, weak password hashing,random/Math.randomfor tokens, path traversal, SSRF, open redirects, debug mode, CORS*with credentials. - Config: Dockerfiles running as root or baking secrets into layers; GitHub Actions "pwn requests" (
pull_request_target+ PR checkout), script injection via${{ github.event.issue.title }}, unpinned third-party actions,write-alltokens. - Tells you which dependency audit to run (pip-audit, npm/pnpm audit, govulncheck, cargo audit) for your lockfiles.
- Calibrated against real code: test files are downgraded, env-var and header names aren't flagged as secrets, and SQL that only interpolates column names (with values parameterised) is marked low-confidence.
The audit workflow
- Map the attack surface: routes, who the attacker is, where untrusted input enters (including retrieved documents and model output).
- Scan, then a manual checklist for what regex can't see: IDOR / missing ownership checks, Supabase RLS and Firebase rules, admin/debug routes, unauthenticated paid-LLM endpoints (cost abuse), RAG cross-tenant leaks, agent tools without human approval, unsigned webhooks, uploads.
- Verify every candidate: trace source to sink, check reachability, and add a minimal safe proof (a unit test, not an attack on production). Each finding ends up Confirmed, Likely, or Dismissed with a reason.
- Fix: rotate leaked secrets first, then patches with regression tests, in priority order.
Free. Defensive use on your own code only.
Pattern-based scanning finds candidates, not proof: the workflow verifies them, but it can miss bugs that need deep data-flow analysis. Code rules cover Python and JS/TS; other languages get secret and config checks only. Dependency vulnerability checks need you to run the suggested audit tools (they need network). Not a penetration test, not a compliance audit, and not for systems you don't own.
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 7 days ago
- Free with an Agensi account
- Software
Python 3.9+pip-audit
uv (Python tool runner)
- Optional
Git (history and tracked-file checks)pip-audit / npm audit (dependency CVEs)
Permissions
File Scopes
The scanner is stdlib-only, read-only and makes no network calls. It runs read-only git commands (ls-files, log) if git is available. Secret values are masked in all output. The agent proposes patches and only applies those the user approves; it never tests against live or production systems.
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.