Command Palette

Search for a command to run...

Back to skills
skill № 35369

sql-injection-detection

Detects SQL injection via string concatenation and fmt.Sprintf in database queries. Use when reviewing code for SQLi, unsafe query construction, or auditing…

FreeNo executable scripts
zakirkunby zakirkun★ 40 GitHub stars

Install sql-injection-detection in Claude Code & Claude Desktop

Sign up to install this skill

Create a free account to reveal the install command and save the skill to your library.

  • Reveal the one-line install command
  • Save skills to your synced library
  • Get notified when skills update
Sign up freeI already have an account

About this skill

SQL Injection Detection

Identifies SQL queries built with string concatenation or format strings where user input reaches execution sinks. See patterns.yaml for detection rules.

Detection Workflow

  1. Import check — look for database packages (database/sql, gorm, sqlx, ORMs)
  2. Call check — find SQL execution functions (Query, QueryRow, Exec, Raw)
  3. Context check — check if arguments include string concatenation or fmt.Sprintf
  4. Taint check — trace whether the concatenated variable is user-controlled (request params, form data, headers)
  5. Validate — confirm the variable is not a compile-time constant or allow-listed value before reporting

Vulnerable

db.Query("SELECT * FROM users WHERE id = " + userInput)
db.Query(fmt.Sprintf("SELECT * FROM users WHERE id = %s", userInput))

Safe

db.Query("SELECT * FROM users WHERE id = $1", userInput)

Allowed tools

Tools this skill is permitted to call.

No restriction — this skill can use any tool.

Bundled files

  • patterns.yaml

FAQ

What does the sql-injection-detection skill do?

Detects SQL injection via string concatenation and fmt.Sprintf in database queries. Use when reviewing code for SQLi, unsafe query construction, or auditing parameterized query usage.

How do I install the sql-injection-detection skill?

Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.

Does the sql-injection-detection skill run scripts?

No, this skill is instructions only (SKILL.md) with no executable scripts.

Related skills

Compare sql-injection-detection with