/gosqlx:sql-security-review [SQL string, .sql file, or source file that builds SQL]from GoSQLX
Scans SQL text for injection patterns (tautologies, UNION attacks, stacked queries, comment bypasses, time-based/out-of-band probes, dangerous functions) and reviews application code that builds SQL strings, recommending parameterized queries.
Ships in GoSQLX. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Input: $ARGUMENTS - a SQL string, a .sql file, or source code that constructs SQL.
Call security_scan (mcp__plugin_gosqlx_gosqlx__security_scan) with {"sql": "..."}. It returns is_clean, per-severity counts (critical_count, high_count, medium_count, low_count) and findings[], each with severity, pattern, description, risk and suggestion. Pattern types: TAUTOLOGY, COMMENT_BYPASS, STACKED_QUERY, UNION_BASED, UNION_INJECTION, UNION_GENERIC, TIME_BASED, BOOLEAN_BASED, OUT_OF_BAND, DANGEROUS_FUNCTION.
The scanner inspects a finished SQL string. It catches injected payloads, not the vulnerable code path that lets them in.
Use Grep/Read to find where queries are assembled. Flag any user-influenced value that reaches the SQL text through:
"... WHERE id = " + id, Python f-strings / % / .format(), JS template literals, Go fmt.Sprintf, Java String.format, PHP "$var" in query strings;raw(), extra(), Sequelize.literal, knex.raw, db.Exec(fmt.Sprintf(...))) fed with user input;ORDER BY direction) taken from input.For each finding give: file:line, the tainted source, why it is injectable, and a fix:
?, $1, :name, @p1) with the driver's parameter API.%/_ in user text.To exercise the scanner on code findings, reconstruct the SQL with a hostile value (for example ' OR 1=1 --) and run security_scan on it.
Lead with CRITICAL/HIGH issues. Separate GoSQLX scanner findings from your own code-review findings. Do not claim code is safe just because is_clean is true for a sample query.
gosqlx analyze --security query.sql
gosqlx lint --security query.sql # adds LIKE-injection, tautology and UNION checks to lint
echo "SELECT * FROM users WHERE id = 1 OR 1=1" | gosqlx analyze --security
Never run suspected injection payloads against a real database.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
sql-injection, gosqlx, security-scan, code-review, database-security
npx claudepluginhub ajitpratap0/gosqlx --plugin gosqlx5 skills in this plugin
/sql-analysisFull GoSQLX review of a SQL query or .sql file - syntax validity, statement types, referenced tables/columns/functions, injection patterns, style lint and a formatted version - followed by a plain-language explanation of what the SQL does and what to fix. Use when the user asks to analyze, review, check, explain or sanity-check SQL./sql-dialectsCheck whether SQL parses under a specific database dialect with GoSQLX (PostgreSQL, MySQL, SQL Server, Oracle, SQLite, Snowflake, generic; MariaDB and ClickHouse via the CLI) and explain dialect-specific syntax problems. Use when the user asks if SQL is valid for a particular database, is porting SQL between databases, or gets a syntax error that may be dialect-related./sql-formattingFormat or pretty-print SQL with GoSQLX - consistent indentation, keyword casing and optional trailing semicolon. Use when the user asks to format, beautify, pretty-print, reindent or clean up SQL, or to make a .sql file consistent./sql-lintingLint SQL with GoSQLX and explain its rules L001-L030 (whitespace, keyword case, comma placement, aliasing, plus safety, performance and naming rules), including which rules each entry point applies and which can be auto-fixed. Use when the user asks to lint SQL, enforce SQL style, explains a GoSQLX rule ID like L007 or L019, or sets up SQL linting in CI.Other plugins' skills for the same job