injection

injection is a skill for Claude Code, Codex from scholarly360/owasp-top10-web-skills. It costs 176 tokens per session (2,907 once invoked), scanned A, original, MIT.

A Python security-testing guide for finding injection flaws in FastAPI and Flask web applications. Injection happens when untrusted input is treated as part of a database query, shell command, template, browser script, or AI prompt.

In plain words
What is it for?
Use it to check for SQL injection, cross-site scripting (XSS), server-side template injection, operating-system command injection, ORM injection, input-validation problems, and prompt injection.
Why use it?
It helps identify places where user input could change or execute a command instead of being treated as ordinary data. It also points to safer input handling and query patterns.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to check for SQL injection, cross-site scripting (XSS), server-side template injection, operating-system command injection, ORM injection, input-validation problems, and prompt injection.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/scholarly360/owasp-top10-web-skills/injection
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 scholarly360/owasp-top10-web-skills --skill injection
Clone the repo
git clone --depth 1 https://github.com/scholarly360/owasp-top10-web-skills

Made for: Claude Code, Codex.

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 injection

README.md
[![agentmods](https://agentmods.dev/badge/skills/scholarly360/owasp-top10-web-skills/injection/github.svg)](https://agentmods.dev/skills/scholarly360/owasp-top10-web-skills/injection)
Your own site
<a href="https://agentmods.dev/skills/scholarly360/owasp-top10-web-skills/injection"><img src="https://agentmods.dev/badge/skills/scholarly360/owasp-top10-web-skills/injection/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 injection

Your own site · 80×15
<a href="https://agentmods.dev/skills/scholarly360/owasp-top10-web-skills/injection"><img src="https://agentmods.dev/badge/skills/scholarly360/owasp-top10-web-skills/injection.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 176 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,907 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00176 $0.02907
Opus 5 $0.00088 $0.01453
Sonnet 5 $0.00035 $0.00581
Haiku 4.5 $0.00018 $0.00291

Measured 11d ago against content hash da166dd98945, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

injection scanned grade A with 1 finding 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 11d 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.

Runs shell commandslowCapability

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

subprocess.call(f"cat {filename}", shell=True)
skills/injection/SKILL.md · 337 lines

How it starts

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

OWASP A05:2025 — Injection: Python Security Testing Skill

Overview

Injection occurs when untrusted user input reaches an interpreter — a database, OS shell, template engine, or browser — and is executed as part of a command or query. Despite dropping from #3 to #5 in 2025, Injection carries the most CVEs of any OWASP category: 62,445, including 30,000+ for XSS alone.

Injection types covered by this skill:

  • SQL Injection (SQLi) — CWE-89
  • Cross-Site Scripting (XSS) — CWE-79
  • Server-Side Template Injection (SSTI) — CWE-94
  • OS Command Injection — CWE-78 / CWE-77
  • ORM Injection
  • Input Validation failures — CWE-20
  • LLM Prompt Injection (related class, noted in OWASP 2025)

Detection Checklist

1. SQL Injection (CWE-89)

High-risk patterns to flag:

# ❌ VULNERABLE — f-string in raw SQL
db.execute(f"SELECT * FROM users WHERE email = '{email}'")

# ❌ VULNERABLE — .format() in SQLAlchemy text()
db.execute(text("SELECT * FROM users WHERE id = {}".format(user_id)))

# ❌ VULNERABLE — string concatenation in ORM raw query
User.query.filter(text("name = '" + name + "'"))

Safe patterns to enforce:

# ✅ SAFE — bound parameters in SQLAlchemy text()
db.execute(text("SELECT * FROM users WHERE email = :email"), {"email": email})

# ✅ SAFE — ORM method (avoids interpreter entirely)
User.query.filter_by(email=email).first()

# ✅ SAFE — FastAPI with Pydantic + SQLAlchemy ORM
async def get_user(user_id: int, db: Session = Depends(get_db)):
    return db.query(User).filter(User.id == user_id).first()

Testing approach:

  1. Search codebase for text(, execute(, raw(, cursor.execute( + string interpolation
  2. Run Bandit: bandit -r . -t B608 (hardcoded SQL expressions)
  3. Inject payloads: ' OR '1'='1, '; DROP TABLE users; --, 1 UNION SELECT null,null--
  4. Use OWASP ZAP active scan on all endpoints accepting string parameters

2. XSS — Cross-Site Scripting (CWE-79)

High-risk patterns to flag:

Read the full file on GitHub · 337 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 11d ago First seen · 337 lines · 176 tokens per session scan A da166dd98945

Subscribe to this mod's changes

injection is a skill published in the GitHub repository scholarly360/owasp-top10-web-skills (22 stars, last pushed 5mo ago), licensed MIT. It adds 176 tokens to every session and 2,907 once invoked, about $0.0009 per session on Opus 5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

error-handling

Python error handling patterns for FastAPI, Pydantic, and asyncio. Follows "Let it crash" philosophy - raise exceptions, catch at boundaries. Covers HTTPException, global exception handlers, validation errors, background task failures. Use when: (1) Designing API error responses, (2) Handling RequestValidationError…

jiatastic/open-python-skills · 95 tokens

python-backend

Python backend development expertise for FastAPI, security patterns, database operations, Upstash integrations, and code quality. Use when: (1) Building REST APIs with FastAPI, (2) Implementing JWT/OAuth2 authentication, (3) Setting up SQLAlchemy/async databases, (4) Integrating Redis/Upstash caching, (5) Refactoring…

jiatastic/open-python-skills · 102 tokens

pydantic

Pydantic models and validation. Use when: (1) Defining schemas, (2) Validating input/output, (3) Generating JSON schema.

jiatastic/open-python-skills · 37 tokens

api-security-best-practices

API security checklist and best practices.

nusabyte-my/jebat-core · 13 tokens

py-clean-arch

Use this skill when the user asks about Clean Architecture in Python — not generic theory, but the specific layer conventions (l1entities, l2usecases, l3interfaceadapters, l4frameworksanddrivers), folder patterns, boundary interfaces, and .importlinter.ini contracts from CJHwong/py-clean-architecture-examples. Fetches…

CJHwong/py-clean-architecture-examples · 113 tokens

backend-security

Backend/server-side security auditor for Node.js, Express, NestJS, FastAPI, Django, Flask, Spring, Ruby on Rails, and similar frameworks. Use when reviewing server-side application logic, error handling, logging, file upload handling, or general middleware configuration specifically — separate from database or…

Rootx202/appsec-skills · 65 tokens