Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: prevent SQL injection in user-provided queries #351

Closed
wants to merge 20 commits into from

Conversation

devin-ai-integration[bot]
Copy link

Fixes SQL injection vulnerability identified in #29

Changes:

  • Implement parameter binding for SQL queries
  • Enhance SQL query validation with whitelist approach
  • Add comprehensive SQL injection prevention tests
  • Improve overwrite.c to use safe SQL queries

Implementation Details:

  • Added dangerous token detection to prevent SQL injection attempts
  • Created whitelist of allowed SQL clauses
  • Enhanced query structure validation
  • Added test suite with multiple injection attempt scenarios
  • Improved error reporting for rejected queries

Link to Devin run: https://app.devin.ai/sessions/7bc67faddc4d4c96ad62208b48c20218

- Enhanced SQL query validation in sql.c with whitelist approach
- Added dangerous token detection for SQL injection prevention
- Improved overwrite.c to use safe SQL queries
- Added comprehensive SQL injection prevention tests
- Updated Makefile to include SQL injection test target

Security: Fixes #29

Co-Authored-By: Matt Wong <[email protected]>
Copy link
Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR
  • Look at CI failures and help fix them

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Add "(aside)" to your comment to have me ignore it.

devin-ai-integration bot and others added 19 commits December 20, 2024 02:37
Copy link
Author

Superseded by new PR with build fixes

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.

0 participants