用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/ersinkoc/security-check --skill sc-sqli命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Comprehensive AI-powered security scanning suite with 48 skills covering OWASP Top 10, 7 language-specific deep scanners (Go, TypeScript, Python, PHP, Rust, Java, C#), supply chain analysis, infrastructure-as-code scanning, and 3000+ checklist items. Use when you need to run a security audit, find vulnerabilities, scan a PR for security issues, or perform a penetration test on a codebase.
C#/.NET-specific security deep scan
Go-specific security deep scan
基于 SOC 职业分类
正在显示 SKILL.md
| name | sc-sqli |
| description | SQL Injection detection across all variants — classic, blind, time-based, second-order, and UNION-based |
| license | MIT |
| metadata | {"author":"ersinkoc","category":"security","version":"1.0.0"} |
Detects SQL injection vulnerabilities in all forms: classic (error-based), blind (boolean and time-based), UNION-based, second-order, and ORM bypass patterns. Traces user input from HTTP request parameters through application logic to database query construction, identifying points where unsanitized data enters SQL statements.
Called by sc-orchestrator during Phase 2 (Vulnerability Hunting). Runs against all detected languages.
**/*.go, **/*.ts, **/*.js, **/*.py, **/*.php, **/*.java, **/*.kt, **/*.cs,
**/*.rb, **/routes/*, **/controllers/*, **/models/*, **/repositories/*,
**/dal/*, **/dao/*, **/*query*, **/*sql*, **/*database*, **/*db*
# Direct SQL construction
"SELECT.*FROM" # SQL SELECT statements
"INSERT INTO" # SQL INSERT
"UPDATE.*SET" # SQL UPDATE
"DELETE FROM" # SQL DELETE
"EXEC ", "EXECUTE " # Stored procedure execution
# String concatenation in queries
"+ .*query" # String concat with query variable
`${.*}`.*SELECT # Template literals in SQL
f"SELECT, f"INSERT # Python f-strings in SQL
"WHERE.*=.*'" + " # String concat in WHERE clause
".format(.*)".*SELECT # str.format() in SQL
# Language-specific database calls
"db.Query(", "db.Exec(" # Go database/sql
"sequelize.query(", ".rawQuery(" # Node.js Sequelize
"cursor.execute(", "connection.execute(" # Python DB-API
"$wpdb->query(", "->whereRaw(" # PHP WordPress/Laravel
"createNativeQuery(", "createQuery(" # Java JPA
"FromSqlRaw(", "ExecuteSqlRaw(" # C# Entity Framework
.where() with raw strings instead of parameterized objectsSources (user input):
req.query.*, req.params.*, req.body.* (Express/Node)request.GET, request.POST, request.data (Django)$_GET, $_POST, $_REQUEST, $_COOKIE (PHP)r.URL.Query(), r.FormValue(), r.PathValue() (Go)@RequestParam, @PathVariable, @RequestBody (Spring)[FromQuery], [FromRoute], [FromBody] (ASP.NET)Sinks (database queries):
db.Query(), db.Exec(), db.QueryRow() (Go)sequelize.query(), knex.raw(), prisma.$queryRaw() (Node)cursor.execute(), RawSQL(), .extra(), .raw() (Python)$pdo->query(), mysqli_query(), DB::select(DB::raw()) (PHP)createNativeQuery(), session.createSQLQuery() (Java).FromSqlRaw(), .ExecuteSqlRaw() (C#)For each candidate finding:
.filter(), .get(), .exclude() are safe. .raw(), .extra(), RawSQL() are not.session.query() with model attributes is safe. text() with f-strings is not..where(hash) is safe. .where("string #{var}") is not.$queryRaw with template literal (tagged) is safe. $queryRawUnsafe is not..Where(struct) is safe. .Where("name = " + input) is not..FromSqlRaw(interpolated) is not.// VULNERABLE: String concatenation in query
query := "SELECT * FROM users WHERE id = " + r.URL.Query().Get("id")
rows, err := db.Query(query)
// SAFE: Parameterized query
rows, err := db.Query("SELECT * FROM users WHERE id = $1", r.URL.Query().Get("id"))
// VULNERABLE: Template literal in raw query
const users = await prisma.$queryRawUnsafe(`SELECT * FROM users WHERE name = '${req.query.name}'`)
// SAFE: Tagged template (Prisma parameterizes these)
const users = await prisma.$queryRaw`SELECT * FROM users WHERE name = ${req.query.name}`
# VULNERABLE: f-string in SQL
cursor.execute(f"SELECT * FROM users WHERE id = {request.GET['id']}")
# SAFE: Parameterized query
cursor.execute("SELECT * FROM users WHERE id = %s", [request.GET['id']])
// VULNERABLE: Direct interpolation
$result = $pdo->query("SELECT * FROM users WHERE id = " . $_GET['id']);
// SAFE: Prepared statement
$stmt = $pdo->prepare("SELECT * FROM users WHERE id = ?");
$stmt->execute([$_GET['id']]);
// VULNERABLE: String concatenation in JDBC
String query = "SELECT * FROM users WHERE id = " + request.getParameter("id");
ResultSet rs = stmt.executeQuery(query);
// SAFE: Prepared statement
PreparedStatement ps = conn.prepareStatement("SELECT * FROM users WHERE id = ?");
ps.setString(1, request.getParameter("id"));
ResultSet rs = ps.executeQuery();
// VULNERABLE: String interpolation in raw SQL
var users = context.Users.FromSqlRaw($"SELECT * FROM Users WHERE Id = {id}").ToList();
// SAFE: Parameterized
var users = context.Users.FromSqlRaw("SELECT * FROM Users WHERE Id = {0}", id).ToList();
' OR 1=1 -- as the {parameter} to bypass the WHERE clause and retrieve all records..filter(), .findOne(), LINQ queries are parameterized by defaultprisma.$queryRaw\...`auto-parameterizes (but$queryRawUnsafe` does not)"SELECT * FROM users WHERE role = 'admin'" with no variable inputknex('users').where('id', input) parameterizes automatically