sql-injection

A security check for SQL injection, where user input changes the meaning of a database query instead of being treated as a value. SQL is the language commonly used to read and change relational databases.

In plain words
What is it for?
Use it to review raw SQL, string concatenation or interpolation, ORM raw-query escape hatches, search filters, report builders, login lookups, and dynamic sorting or table names.
Why use it?
It helps find query construction that could let an attacker read, change, delete, or bypass access to database records beyond the feature's intended scope.

Skill for Claude CodeCodex

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 skills/emre-guler/websec/sql-injection
Any agent
npx skills add emre-guler/websec --skill sql-injection
Clone the repo
git clone --depth 1 https://github.com/emre-guler/websec

Made for: Claude Code, Codex.

Per session 74 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,211 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 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.00074 $0.05211
Opus 5 $0.00037 $0.02606
Sonnet 5 $0.00015 $0.01042
Haiku 4.5 $0.00007 $0.00521

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

Security

Grade A, and why

sql-injection 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 2d 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.

skills/sql-injection/SKILL.md · 155 lines

How it starts

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

SQL Injection Detection

Overview

SQL injection occurs when attacker-controlled input is placed into a SQL statement in a way that changes the statement's meaning rather than merely supplying a value. It lives at the boundary between the application layer and the data layer: a request arrives, the handler assembles query text, and the driver hands that text to the engine, which executes it with the application's database privileges. The attacker is anyone who can influence a value that reaches a query — usually an unauthenticated remote user submitting query-string parameters, form fields, JSON or XML body members, headers, or cookies. Success means reading tables the feature never intended to expose (credentials, tokens, PII, payment records), bypassing an authentication decision that a query's truth value drives, writing or destroying data, and on over-privileged accounts reaching the filesystem or the host. This skill finds it by locating every site where query text is built rather than bound, checking each site in parallel, and merging the results into <output_dir>/sql-injection-results.md.

What it is NOT

  • NoSQL injection (/websec:nosql-injection): the datastore behind the call is a document or key-value engine and the payload is an operator object or a server-side JavaScript expression, not SQL grammar. Test: does the sink speak SQL text, or a filter document? If the filter is a map that came from parsed JSON, it belongs there.
  • Command injection (/websec:os-command-injection): input reaches a shell, including a database CLI (psql, mysql, sqlcmd) invoked as a subprocess. Test: is the sink a driver call or a process launch? A shelled-out client is command injection even though the payload looks like SQL.
  • Template injection (/websec:ssti): a template engine builds the string. If the engine evaluates the input as its own syntax, that is the flaw; if it only interpolates the value into SQL text, the SQL sink is the finding here.
  • Access control (/websec:access-control): ?id=42 returning another user's row through a correctly parameterised query is a missing ownership check, not injection. Test: does the query text change, or only the bound value?
  • Information disclosure (/websec:information-disclosure): verbose database error pages are their own finding; here they are only an exploitation aid, so note the error handling and keep the injection judgement separate.
  • Not a finding: a query whose only dynamic parts are bound parameters; an identifier chosen through a fixed map or enum; SQL text built entirely from constants and server-side values with no path from a request; migrations, seed scripts, and test fixtures.

Read the full file on GitHub · 155 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. 2d ago First seen · 155 lines · 74 tokens per session scan A 62e216eaba89

Subscribe to this mod's changes

sql-injection is a skill published in the GitHub repository emre-guler/websec (2 stars, last pushed 5d ago), licensed MIT. It adds 74 tokens to every session and 5,211 once invoked, about $0.0004 per session on Opus 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-08-31.

Related

Other skills, from other repositories

vantage

Autonomous, artifact-driven SAST (Static Application Security Testing) for web AND mobile app repositories, plus optional code-level remediation. Use whenever the user asks to security-review, pentest, audit, or scan a codebase for vulnerabilities — web (SQLi, XSS, IDOR/BOLA, auth bypass, SSRF, XXE, hardcoded secrets…

tinoimammp/vantage-security-agent · 230 tokens

prowler-ui

Prowler UI-specific patterns. For generic patterns, see: typescript, react-19, nextjs-16, tailwind-4. Trigger: When working inside ui/ on Prowler-specific conventions (shadcn, folder placement, actions/adapters, shared types/hooks/lib).

prowler-cloud/prowler · 64 tokens

prowler-test-api

Testing patterns for Prowler API: JSON:API, Celery tasks, RLS isolation, RBAC. Trigger: When writing tests for api/ (JSON:API requests/assertions, cross-tenant isolation, RBAC, Celery tasks, viewsets/serializers).

prowler-cloud/prowler · 62 tokens

prowler-pr

Creates Pull Requests for Prowler following the project template and conventions. Trigger: When working on pull request requirements or creation (PR template sections, PR title Conventional Commits check, changelog gate/no-changelog label), or when inspecting PR-related GitHub workflows like conventional-commit.yml…

prowler-cloud/prowler · 84 tokens

tailwind-4

Tailwind CSS 4 patterns and best practices. Trigger: When styling with Tailwind (className, variants, cn()), especially when dynamic styling or CSS variables are involved (no var() in className).

prowler-cloud/prowler · 47 tokens

prowler-docs

Prowler documentation style guide and writing standards. Trigger: When writing documentation for Prowler features, tutorials, or guides.

prowler-cloud/prowler · 31 tokens