Detecting SQL Injection Patterns

| Scan a source tree for SQL-injection vulnerable patterns: string concatenation into queries, f-string interpolation in SQL, string-format substitution into raw queries, deprecated cursor methods (cursor.execute with % formatting), Knex / Sequelize raw() with template interpolation, sequelize.query with replacements. Use when: pre-commit code review, post-feature SQL-touching release, inheriting a legacy codebase that predates ORMs, or post-bug-report investigation. Threshold: any source line where SQL keywords (SELECT / INSERT / UPDATE / DELETE / FROM / WHERE) appear in a string that's being built via concatenation, f-string, %-format, or .format() with variable input. Trigger with: "scan for sqli", "sql injection patterns", "check raw queries", "audit cursor.execute".

thedixitjain 68a3605 4 files · 31.2 KB Updated 2 repo stars

File contents

thedixitjain/the-mega-skill-library/tree/main/library/backend-and-data/detecting-sql-injection-patterns commit 68a36051b3

Frequently asked questions

npx skillmds add thedixitjain/detecting-sql-injection-patterns