Skip to content

[Security] Fix CodeQL alert #15: SQL query built from user-controlled sources#89

Open
colin-d-fried wants to merge 1 commit into
mainfrom
security/codeql-15-sql-injection-search-fix
Open

[Security] Fix CodeQL alert #15: SQL query built from user-controlled sources#89
colin-d-fried wants to merge 1 commit into
mainfrom
security/codeql-15-sql-injection-search-fix

Conversation

@colin-d-fried
Copy link
Copy Markdown
Owner

@colin-d-fried colin-d-fried commented Mar 26, 2026

Summary

Fixes CodeQL alert #15: SQL query built from user-controlled sources

Field Value
Severity high
File vulnerable_sql_injection.py
CWE CWE-089
Alert CodeQL Alert #15

Fix Applied

See the diff for the specific secure coding change applied.

Fixes #17


Note

Low Risk
Low risk, localized change to the /search database query; only behavioral impact should be in how special characters in q are handled by the LIKE pattern.

Overview
Hardens the /search endpoint against SQL injection by replacing string-built SQL with a parameterized LIKE query (binding %{q}% as an argument) in vulnerable_sql_injection.py.

Written by Cursor Bugbot for commit f6972f8. This will update automatically on new commits. Configure here.

Copy link
Copy Markdown

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 3 additional findings.

Open in Devin Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CodeQL #15] SQL query built from user-controlled sources

1 participant