security-review-owasp-sql-injection-prevention

Detect SQL injection risks in query construction and database execution paths.

Updated Mar 26, 2026
One-click install
npx skills add https://github.com/sjinks/ai-owasp-skillset --skill security-review-owasp-sql-injection-prevention
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: security-review-owasp-sql-injection-prevention
Source: https://github.com/sjinks/ai-owasp-skillset/tree/main/.github/skills/security-review-owasp-sql-injection-prevention
Command: npx skills add https://github.com/sjinks/ai-owasp-skillset --skill security-review-owasp-sql-injection-prevention

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps reviewers spot SQL injection weaknesses in application code, stored procedures, and database access patterns before they reach production.

Core Features & Use Cases

  • Query Safety Review: Checks whether user-controlled values are safely parameterized instead of being concatenated into SQL.
  • Structural Input Review: Examines dynamic table names, column names, sort order, and pagination controls for allow-list enforcement.
  • Privilege and Blast Radius Review: Evaluates database account permissions, error exposure, and second-order injection paths to reduce exploit impact.
  • Use Case: A reviewer can use this Skill to inspect an authentication service, a reporting job, or a raw SQL query path and determine whether the implementation is vulnerable to SQL injection.

Quick Start

Ask the security-review-owasp-sql-injection-prevention skill to review the relevant files or flow and identify any confirmed SQL injection risks.

Frequently Asked Questions about security-review-owasp-sql-injection-prevention

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I review code for SQL injection risks in query builders and raw SQL?

To review code for SQL injection risks, verify that user-controlled values are safely parameterized rather than concatenated into SQL strings. This review checks query builders, raw SQL paths, and stored procedures to confirm parameter binding and structural input allow-listing.

What is second-order SQL injection and how do I detect it during a security review?

Second-order SQL injection occurs when malicious input is stored safely but executed unsafely later. A security review detects this by tracing database execution paths to verify parameter binding and structural input allow-listing across the entire data lifecycle.

How do I check dynamic table names and sort order controls for SQL injection?

Checking dynamic table names, column names, and sort order controls involves verifying structural input allow-listing enforcement. The review ensures these dynamic query components are validated against strict allow-lists instead of accepting raw user input.

Does this SQL injection review evaluate database privilege boundaries and error handling?

Yes, this SQL injection review evaluates database account permissions and error exposure to reduce exploit impact. It assesses least-privilege access configurations and database error handling to minimize the blast radius of potential injection vulnerabilities.

Can I use this to audit stored procedures for SQL injection vulnerabilities?

Yes, you can audit stored procedures for SQL injection vulnerabilities. The review examines stored procedure execution paths to verify parameter binding and assess whether the implementation safely handles user-controlled inputs.