code-security

code-security is a skill for Claude Code from sam-dumont/claude-skills. It costs 146 tokens per session (3,427 once invoked), scanned A, original, MIT.

A Python code-security review that combines automated checks with a reasoning-based review of how the code behaves. It checks for known unsafe patterns, vulnerable dependencies, exposed secrets, and logic-related security problems.

In plain words
What is it for?
Use it when scanning Python code, checking dependencies for known vulnerabilities, auditing authentication or input handling, or preparing an application for security hardening.
Why use it?
It helps find security issues that a single automated scanner may miss, including problems that depend on how several parts of an application work together.

Skill for Claude Code

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

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is return FileResponse(f"/data/{filename}") # ../../etc/passwd.

Part of the code-security plugin — 1 skill shipped together

Good fit Use it when scanning Python code, checking dependencies for known vulnerabilities, auditing authentication or input handling, or preparing an application for security hardening.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/sam-dumont/claude-skills
agentmods
npx agentmods add skills/sam-dumont/claude-skills/code-security

Made for: Claude Code.

Or install code-security, the plugin that ships this one along with the rest of its 1 skill.

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 code-security

README.md
[![agentmods](https://agentmods.dev/badge/skills/sam-dumont/claude-skills/code-security/github.svg)](https://agentmods.dev/skills/sam-dumont/claude-skills/code-security)
Your own site
<a href="https://agentmods.dev/skills/sam-dumont/claude-skills/code-security"><img src="https://agentmods.dev/badge/skills/sam-dumont/claude-skills/code-security/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 code-security

Your own site · 80×15
<a href="https://agentmods.dev/skills/sam-dumont/claude-skills/code-security"><img src="https://agentmods.dev/badge/skills/sam-dumont/claude-skills/code-security.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 146 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,427 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 2 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.00146 $0.03427
Opus 5.5 $0.00058 $0.01371
Sonnet 5.5 $0.00029 $0.00685
Haiku 4.5 $0.00015 $0.00343

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

Security

Grade A, and why

code-security 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 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.

Makes network callslowCapability

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

response = requests.get(user_provided_url) # Can hit internal services

Runs shell commandslowCapability

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

| B601-B602 | shell injection | `subprocess.call(shell=True)` |
plugins/code-security/skills/code-security/SKILL.md · 413 lines

How it starts

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

Python Code Security Skill

This skill combines static analysis tools with LLM-powered dynamic analysis to provide comprehensive security coverage. Static tools catch known patterns; Claude reasons about logic flaws, business rule bypasses, and context-dependent vulnerabilities that no static tool can detect.

Two-Layer Security Model

┌─────────────────────────────────────────────────────────┐
│  Layer 1: Static Analysis (Automated)                   │
│  Bandit · pip-audit · ruff S-rules · secrets detection  │
│  → Known vulnerability patterns, CVEs, exposed secrets  │
├─────────────────────────────────────────────────────────┤
│  Layer 2: LLM Dynamic Analysis (Claude)                 │
│  Code path reasoning · business logic review            │
│  → Logic flaws, auth bypasses, race conditions,         │
│    context-dependent vulnerabilities                    │
└─────────────────────────────────────────────────────────┘

Layer 1: Static Analysis Tools

Tool Stack

Tool Purpose Invocation
Bandit Python-specific security linter (SAST) uvx bandit -r src/
pip-audit Dependency CVE scanner uvx pip-audit
ruff S-rules Bandit rules integrated in ruff uv run ruff check --select S src/
detect-secrets Secrets/credentials in source code uvx detect-secrets scan
safety Alternative dependency vulnerability check uvx safety check

Makefile Targets

Add these targets to the project Makefile:

# =============================================================================
# Security
# =============================================================================

# Security lint (Bandit) — high severity only for CI gates
security-lint:
	uvx bandit -r src/ --severity-level high -q

# Full security lint (all severities) — for thorough review
security-lint-full:
	uvx bandit -r src/ -f json -o bandit-report.json || true
	@echo "Full report: bandit-report.json"
	uvx bandit -r src/

# Dependency vulnerability audit
pip-audit:
	uvx pip-audit -r <(uv pip freeze | grep -v -e '^-e ' -e '^$(PROJECT_NAME)==') --strict

# Secrets detection
secrets-scan:
	uvx detect-secrets scan --all-files --exclude-files '\.git/.*' | python -c "import sys,json; r=json.load(sys.stdin); findings=r.get('results',{}); exit(1) if findings else print('No secrets found.')"

# Combined security gate for CI
security-check: security-lint pip-audit secrets-scan
	@echo "All security checks passed!"

Read the full file on GitHub · 413 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 · 413 lines · 146 tokens per session scan A 7c7449c74e8c

Subscribe to this mod's changes

code-security is a skill published in the GitHub repository sam-dumont/claude-skills (38 stars, last pushed 28d ago), licensed MIT. It adds 146 tokens to every session and 3,427 once invoked, about $0.0006 per session on Opus 5.5. 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-08-30.

Related

code-security compared with skills from other repositories

code-security next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
code-securitysam-dumont/claude-skillsSkill3828d agoMITA146Claude Code
imagegenopenai/codexSkill137ktodayApache-2.0A113Codex
playwright-climicrosoft/playwrightSkill102ktodayApache-2.0A19Claude Code
browser-automationopenclaw/openclawSkill396ktodayMITA36Claude Code
systematic-debuggingobra/superpowersSkill331k4d agoMITA21Claude Code
free-llm-apismnfst/awesome-free-llm-apisSkill15ktodayCC0-1.0A113Claude Code, Codex
next-cache-components-adoptionvercel/next.jsSkill144ktodayMITA95Claude Code