# sql-injection-orm-and-query-builder

sql-injection-orm-and-query-builder is a Claude Code skill for tracing SQL injection through ORM APIs and query builders. It applies to raw SQL fragments and identifier slots such as column names.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf (Devin Desktop), Claude.ai · ★ 73 repo stars
- Author: W4L33Dx
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/W4L33Dx/Cyber-Monster/tree/HEAD/red-team/web-and-application/sql-injection-orm-and-query-builder/SKILL.md
- Updated: 2026-11-15
- Security check: automated, 2026-11-17 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/sql-injection-orm-and-query-builder

## What it does

The skill checks whether untrusted input reaches a raw SQL fragment or an identifier position that cannot take a bound parameter. Its examples cover Hibernate HQL, ActiveRecord string conditions, `sequelize.literal`, Django `extra` and `RawSQL`, Prisma raw queries, and raw query-builder methods.

It distinguishes bound values from text joined into the query, with a separate path for sorting and column-name injection. If the ORM-specific case has not been established, the instructions point to the parent `sql-injection` skill first. Separate skills cover MySQL/MariaDB and PostgreSQL dialect details.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add W4L33Dx/Cyber-Monster --skill sql-injection-orm-and-query-builder -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/sql-injection-orm-and-query-builder/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/sql-injection-orm-and-query-builder/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add W4L33Dx/Cyber-Monster --skill sql-injection-orm-and-query-builder -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/sql-injection-orm-and-query-builder/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add W4L33Dx/Cyber-Monster --skill sql-injection-orm-and-query-builder -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/sql-injection-orm-and-query-builder/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install W4L33Dx/Cyber-Monster red-team/web-and-application/sql-injection-orm-and-query-builder
```

2. **Manually: put the files in place**
- File: `.github/skills/sql-injection-orm-and-query-builder/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add W4L33Dx/Cyber-Monster --skill sql-injection-orm-and-query-builder -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/W4L33Dx/Cyber-Monster --path red-team/web-and-application/sql-injection-orm-and-query-builder
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/sql-injection-orm-and-query-builder/SKILL.md` — The legacy .windsurf/skills/ path still works

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/W4L33Dx/Cyber-Monster/tree/HEAD/red-team/web-and-application/sql-injection-orm-and-query-builder/SKILL.md

## When to use it
- trace user input into an ORM raw fragment
- inspect ActiveRecord or Django raw conditions for SQL injection
- check column-name interpolation in a sort clause
- distinguish bound values from SQL text concatenation

## Example prompts
- Trace whether user input reaches a raw SQL fragment in this ORM.
- Review `sequelize.literal` for SQL injection and suggest a safer approach.
- Check whether a query builder lets input control the column used for sorting.

## Similar
- [sql-injection-prevention](https://affpapa.org/en/nevibecode/skills/sql-injection-prevention.md) — skill · 537 installs
- [sqli-sql-injection](https://affpapa.org/en/nevibecode/skills/sqli-sql-injection.md) — skill · 4400 installs
- [sql-injection-testing](https://affpapa.org/en/nevibecode/skills/sql-injection-testing.md) — skill · 605 installs
- [exploiting-sql-injection-vulnerabilities](https://affpapa.org/en/nevibecode/skills/exploiting-sql-injection-vulnerabilities.md) — skill · 566 installs
- [exploiting-sql-injection-with-sqlmap](https://affpapa.org/en/nevibecode/skills/exploiting-sql-injection-with-sqlmap.md) — skill · 355 installs
- [SQL Query Builder & Optimiser](https://affpapa.org/en/nevibecode/prompts/sql-query-builder-optimiser.md) — prompt · ★ 178201 repo stars

From the same set: [w4l33dx/cyber-monster](https://affpapa.org/en/nevibecode/by/w4l33dx/cyber-monster.md) — 61 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
