security-scan

security-scan is a command for Claude Code from kid-sid/claude-spellbook. It costs 0 tokens per session (916 once invoked), scanned A, original, MIT.

A code security review based on a checklist and OWASP, a widely used guide to common web-application security risks. It checks areas such as injection, login sessions, and permission handling.

In plain words
What is it for?
Run it to inspect SQL, command execution, template output, password storage, tokens, endpoint permissions, and resource-access checks.
Why use it?
It helps expose vulnerabilities in changed code or, when there are no changes, in the source directory. The review points to risky patterns that need developer attention.

Command for Claude Code

Written for Claude Code: installed under .claude/.

Good fit Run it to inspect SQL, command execution, template output, password storage, tokens, endpoint permissions, and resource-access checks.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/kid-sid/claude-spellbook/security-scan
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.

Clone the repo
git clone --depth 1 https://github.com/kid-sid/claude-spellbook

Made for: Claude Code.

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-scan

README.md
[![agentmods](https://agentmods.dev/badge/commands/kid-sid/claude-spellbook/security-scan/github.svg)](https://agentmods.dev/commands/kid-sid/claude-spellbook/security-scan)
Your own site
<a href="https://agentmods.dev/commands/kid-sid/claude-spellbook/security-scan"><img src="https://agentmods.dev/badge/commands/kid-sid/claude-spellbook/security-scan/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-scan

Your own site · 80×15
<a href="https://agentmods.dev/commands/kid-sid/claude-spellbook/security-scan"><img src="https://agentmods.dev/badge/commands/kid-sid/claude-spellbook/security-scan.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 916 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.00000 $0.00916
Opus 5.5 $0.00000 $0.00366
Sonnet 5.5 $0.00000 $0.00183
Haiku 4.5 $0.00000 $0.00092

Measured 3mo ago against content hash ae9cb1adcdcc, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

security-scan 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 3mo ago.

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.

.claude/commands/security-scan.md · 104 lines

How it starts

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

Audit code against the security skill checklist and OWASP best practices.

Instructions

  1. Determine scope:

    • If the user specifies files/directories, scan those
    • If no scope given, scan git diff (staged + unstaged changes)
    • If no changes, scan the src/ directory
  2. For each file in scope, check against these categories:

A. Injection (OWASP A03)

  • SQL queries use parameterized statements, not string concatenation
  • No eval(), exec(), Function() with dynamic input
  • No shell=True or backtick execution with user input
  • Template rendering uses auto-escaping (XSS prevention)
  • LDAP, XML, and OS command inputs are sanitized

B. Authentication & Session (OWASP A07)

  • Passwords hashed with bcrypt/scrypt/argon2 (not MD5/SHA1)
  • Session tokens are cryptographically random, sufficient length
  • JWT secrets are not hardcoded
  • Token expiration is enforced
  • Failed login attempts are rate-limited

C. Authorization (OWASP A01)

  • Every endpoint checks authorization, not just authentication
  • Resource access verifies ownership (IDOR prevention)
  • Admin endpoints have explicit role checks
  • No privilege escalation through parameter manipulation
  • Default deny — new endpoints require explicit permission grants

D. Data Exposure (OWASP A02)

  • No hardcoded secrets, API keys, passwords, or tokens
  • Sensitive data not logged (passwords, tokens, PII)
  • Error responses don't leak stack traces or internal paths
  • PII is encrypted at rest
  • API responses don't over-expose fields (use DTOs/serializers)

E. Security Misconfiguration (OWASP A05)

  • CORS is restrictive (not * in production)
  • Security headers set (CSP, HSTS, X-Frame-Options, etc.)
  • Debug mode disabled in production configs
  • Default credentials changed
  • Unnecessary HTTP methods disabled

F. Dependencies (OWASP A06)

  • No known vulnerable dependencies (check lock files)
  • Dependencies are pinned to specific versions
  • No unnecessary dependencies with large attack surface

Read the full file on GitHub · 104 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. 3mo ago First seen · 104 lines · 0 tokens per session scan A ae9cb1adcdcc

Subscribe to this mod's changes

security-scan is a command published in the GitHub repository kid-sid/claude-spellbook (194 stars, last pushed 3mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 916 tokens. 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-08-30.

Related

security-scan compared with commands from other repositories

security-scan next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
security-scankid-sid/claude-spellbookCommand1943mo agoMITA0Claude Code
review-branchdamusix/atomic-claudeCommand117todayMITA35Claude Code
diff-reviewcoco-research/cocoCommand3233d agoApache-2.0A11Claude Code
spec-trace-requirementsrjmurillo/ai-agentsCommand50todayApache-2.0A0GitHub Copilot
merge-conflict-analysisrjmurillo/ai-agentsCommand50todayApache-2.0A0GitHub Copilot
refactorRchGrav/claudeboxCommand1.2k2mo agoMITA9Claude Code
initazrtydxb/procoderCommand21223d agoApache-2.0A16Claude Code