Agent skill · security · jeremylongshore

detecting-sql-injection-vulnerabilities

Detect and analyze SQL injection vulnerabilities in application code

Why this skill is useful

Adds a comprehensive scanning script for detecting SQL injection vulnerabilities with specific remediation patterns and reporting capabilities.

What it needs

Requires bash installed locally. About 3k tokens when loaded. Last updated 2026-08-07. 2,604 stars on the source repository.

What this skill does

Detecting SQL Injection Vulnerabilities Overview Scan application source code for SQL injection vulnerabilities (CWE-89, OWASP A03:2021) by tracing user input from entry points through data flows into database query construction. Detect string concatenation, format string interpolation, and inadequate parameterization across raw SQL, ORM raw query methods, stored procedure calls, and dynamic query builders. Prerequisites Application source code accessible in ${CLAUDESKILLDIR}/ Database query files, ORM models, and repository/DAO layers available Framework and language identified (Django, Rails, Express, Spring, Laravel, ASP.NET, Go, etc.) Database type known (MySQL, PostgreSQL, SQLite, MSSQL, Oracle) for syntax-specific detection Write permissions for reports in ${CLAUDESKILLDIR}/security-reports/ Instructions 1. Discover database interaction code: search for SQL keywords (SELECT, INSERT, UPDATE, DELETE, EXEC) and ORM raw query methods (raw(), execute(), createNativeQuery(), $wpdb->query()) across all source files. 2. Identify input surfaces: map all user-controllable data entry points -- HTTP parameters, request bodies, URL path segments, headers, cookies, file uploads, and WebSocket messages. 3. Trace data flows: follow each input surface through the code to determine whether user data reaches a SQL query. Flag any path where input is not passed through parameterized query binding. 4. Detect vulnerable patterns: String concatenation: "SELECT FROM users WHERE id=" + userId f-string/format interpolation: Python f-strings embedding variables directly into SQL strings Template literals: SELECT FROM users WHERE id=${req.params.id} ORM raw queries without bindings: Model.objects.raw("SELECT FROM t WHERE x='" + val + "'") 5. Classify each finding: assign CVSS 3.1 score, identify attack type (classic injection, blind boolean/time-based, UNION-based exfiltration, second-order/stored injection), and document exploitability (authentication required, network access). 6. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills jeremylongshore/detecting-sql-injection-vulnerabilities

View the source on GitHub

Browse the @skills marketplace