security-audit

security-audit is a skill for Claude Code from getpapi/papi. It costs 74 tokens per session (2,241 once invoked), scanned A, original, MIT.

A full-codebase security review that checks source files, configuration, recent Git history, dependencies, authentication, and exposed endpoints for common risks. It includes checks based on the OWASP Top 10, a widely used list of web security problems.

In plain words
What is it for?
Use it periodically, before a major release, after security-related changes, or when asked to check the entire application rather than just a code change.
Why use it?
It helps find leaked credentials, unsafe access controls, vulnerable dependencies, and unprotected interfaces before they cause harm. It also requires reporting locations rather than exposing secret values.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the papi plugin — 14 skills, 1 MCP server shipped together

Good fit Use it periodically, before a major release, after security-related changes, or when asked to check the entire application rather than just a code change.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/getpapi/papi/security-audit
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add getpapi/papi --skill security-audit
Clone the repo
git clone --depth 1 https://github.com/getpapi/papi

Made for: Claude Code.

Or install papi, the plugin that ships this one along with the rest of its 14 skills, 1 MCP server.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for security-audit

README.md
[![agentmods](https://agentmods.dev/badge/skills/getpapi/papi/security-audit/github.svg)](https://agentmods.dev/skills/getpapi/papi/security-audit)
Your own site
<a href="https://agentmods.dev/skills/getpapi/papi/security-audit"><img src="https://agentmods.dev/badge/skills/getpapi/papi/security-audit/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for security-audit

Your own site · 80×15
<a href="https://agentmods.dev/skills/getpapi/papi/security-audit"><img src="https://agentmods.dev/badge/skills/getpapi/papi/security-audit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 74 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,241 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00074 $0.02241
Opus 5.5 $0.00030 $0.00896
Sonnet 5.5 $0.00015 $0.00448
Haiku 4.5 $0.00007 $0.00224

Measured today against content hash 241d51e228b6, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

security-audit scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/security-audit/SKILL.md · 223 lines

How it starts

The opening of the file, as written. The whole thing — 223 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Security Audit — Full Codebase Review

Perform a comprehensive security audit of the entire codebase. This is NOT a branch diff review — it scans all source files for security issues.

When to Run

  • Periodically as a recurring check (e.g. before a major release)
  • After major security-related changes (auth, RLS, API keys)
  • Before onboarding external users
  • When the user explicitly requests /security-audit

Steps

1. Secret Exposure Scan

Search for hardcoded secrets, API keys, tokens, and credentials in source code.

Patterns to check:

  • grep -r for patterns: sk-, sk_live, sk_test, SUPABASE_SERVICE_ROLE, eyJ (JWT prefixes), ghp_, npm_, Bearer
  • Check all .ts, .tsx, .js files for process.env usage — verify each env var is listed in .env.example
  • Check for secrets in: git history (recent 10 commits), config files, test fixtures
  • Check that .env and .env.local are in .gitignore

IMPORTANT: Never include actual secret values in the report. Reference file:line only.

Severity: Critical if secrets found in source, Warning if env var not in .env.example

2. Authentication & Authorization

Review auth middleware and access control.

Files to read:

  • middleware.ts — auth middleware, route protection
  • lib/auth.ts or similar — auth helper functions
  • app/api/**/route.ts — every API route

Check for:

  • API routes without auth checks (missing getServerSession or equivalent)
  • Admin endpoints accessible to non-admin users
  • Missing CSRF protection on state-changing endpoints
  • Session token handling (httpOnly, secure, sameSite flags)
  • RLS policies — verify user_id scoping on all tables with user data

Severity: Critical for unprotected endpoints, High for weak auth patterns

3. SQL Injection & Data Access

Check for unsafe database queries.

Check for:

  • Raw SQL string concatenation (template literals with user input)
  • Missing parameterized queries
  • Supabase client usage without RLS context
  • Service role key usage outside server-side code
  • Data returned to client that shouldn't be (PII, internal IDs, other users' data)

Read the full file on GitHub · 223 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today First seen · 223 lines · 74 tokens per session scan A 241d51e228b6

Subscribe to this mod's changes

security-audit is a skill published in the GitHub repository getpapi/papi (11 stars, last pushed today), licensed MIT. It adds 74 tokens to every session and 2,241 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-16.