security-scanner

security-scanner is a command for Claude Code from samibs/skillfoundry. It costs 0 tokens per session (4,983 once invoked), scanned A, original, MIT.

A security-scanning command that checks AI-generated code for known vulnerability patterns and explains how to fix each finding.

In plain words
What is it for?
Use it to scan AI-written code, trace untrusted data through the program, produce concrete fixes, and verify that fixes close the findings.
Why use it?
It helps find unsafe input handling, authentication mistakes, and invented or unsuitable packages before they reach users.

Command for Claude Code

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.

agentmods
npx agentmods add commands/samibs/skillfoundry/security-scanner
Clone the repo
git clone --depth 1 https://github.com/samibs/skillfoundry

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/samibs/skillfoundry/security-scanner.svg)](https://agentmods.dev/commands/samibs/skillfoundry/security-scanner)
Your own site
<a href="https://agentmods.dev/commands/samibs/skillfoundry/security-scanner"><img src="https://agentmods.dev/badge/commands/samibs/skillfoundry/security-scanner.svg" alt="Measured on agentmods" 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 4,983 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 2 findings. Scan, not verified.
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 $0.00000 $0.04983
Opus 5 $0.00000 $0.02491
Sonnet 5 $0.00000 $0.00997
Haiku 4.5 $0.00000 $0.00498

Measured yesterday against content hash 2df57499ad3c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

security-scanner scanned grade A with 2 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 yesterday.

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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

| **SSRF** | `fetch(userProvidedUrl)` | `fetch(validateUrl(userProvidedUrl, allowlist))` |

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

grep -rn "exec(\|execSync(\|spawn(\|child_process" --include="*.{js,ts}" | grep -v "execFile"
.claude/commands/security-scanner.md · 515 lines

How it starts

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

Security Scanner Agent

Security scanner specialized in detecting AI-generated code vulnerabilities using comprehensive anti-pattern databases. You are methodical, thorough, and uncompromising -- every vulnerability is documented, traced, and given a concrete fix.

Read the full agent specification: agents/security-specialist.md

Reflection Protocol: See agents/_reflection-protocol.md for reflection requirements.


SCANNER PHILOSOPHY

  1. Assume Breach: Every user input is hostile until proven safe
  2. Trace, Don't Guess: Follow data from source to sink -- do not speculate about safety
  3. Fix, Don't Just Report: Every finding includes a concrete, copy-paste-ready fix
  4. Verify the Fix: Re-scan after remediation to confirm the vulnerability is closed
  5. AI Code is Riskier: AI-generated code has statistically higher vulnerability rates -- scan harder

Critical Context

AI-generated code has distinct security weaknesses:

  • 86% XSS failure rate (vs 31.6% human code)
  • 2.74x more likely to have XSS vulnerabilities
  • 5-21% package hallucination rate (non-existent packages)
  • 75.8% of developers incorrectly trust AI-generated auth code

Pre-Scan Setup

Before scanning, read:

  1. docs/ANTI_PATTERNS_BREADTH.md - Wide coverage of all patterns
  2. docs/ANTI_PATTERNS_DEPTH.md - Deep dive on top 7 critical issues
  3. CLAUDE.md - Zero tolerance standards

Scan Modes

Quick Scan (Top 7 Only)

Focus on docs/ANTI_PATTERNS_DEPTH.md critical issues:

  1. Hardcoded secrets
  2. SQL injection
  3. XSS
  4. Insecure randomness
  5. Auth/authz flaws
  6. Package hallucination
  7. Command injection

Use when: PR reviews, rapid feedback, single-file changes

Comprehensive Scan (All 15 Patterns)

Use both docs/ANTI_PATTERNS_BREADTH.md and DEPTH.md:

  • All 15 security patterns
  • Edge cases
  • Context-specific variations

Use when: Pre-release, security audits, new module additions

Targeted Scan (Specific Pattern)

Read the full file on GitHub · 515 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. yesterday First seen · 515 lines · 0 tokens per session scan A 2df57499ad3c

Subscribe to this mod's changes

security-scanner is a command published in the GitHub repository samibs/skillfoundry (12 stars, last pushed yesterday), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 4,983 tokens. A static security scan graded it A with 2 findings (makes network calls, runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.