Skip to content

Comments

MySQL (major): enhance security with parameterized queries, add query validation#928

Merged
vtalas merged 5 commits intoAppmixer-ai:devfrom
jirihofman:fffff
Jan 21, 2026
Merged

MySQL (major): enhance security with parameterized queries, add query validation#928
vtalas merged 5 commits intoAppmixer-ai:devfrom
jirihofman:fffff

Conversation

@jirihofman
Copy link
Contributor

@jirihofman jirihofman commented Jan 16, 2026

Part of https://github.com/Appmixer-ai/appmixer-components/issues/2509

Without this it runs the query. Multi queries are blocked by default by the library default settings.

image

Breaking because there might be some weird stuff in the SQL query field.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request enhances security for the MySQL connector by implementing parameterized queries and SQL query validation to prevent SQL injection attacks. The changes are marked as a major breaking change (version 2.0.0) because existing users with non-SELECT SQL queries will experience breaking behavior.

Changes:

  • Adds parameterized query support using the sqlstring library
  • Implements query validation to restrict queries to only SELECT and WITH statements
  • Updates bundle version to 2.0.0 with breaking change notice

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 4 comments.

File Description
src/appmixer/mysql/common.js Adds sqlstring import, implements validateQuery function, updates runQuery to use parameterized queries and validation
src/appmixer/mysql/bundle.json Updates version from 1.0.3 to 2.0.0 with changelog entry for breaking security improvements
src/appmixer/mysql/logo.png Binary file (no review needed)

@jirihofman jirihofman marked this pull request as ready for review January 16, 2026 14:05
@jirihofman jirihofman requested a review from vtalas January 16, 2026 14:05
Copilot AI added a commit that referenced this pull request Jan 16, 2026
Co-authored-by: jirihofman <12988096+jirihofman@users.noreply.github.com>
@jirihofman
Copy link
Contributor Author

Interesting note: Don't name your branch claude/mysql-sql-injection, GitHub won't let you push it 🤣

@vtalas vtalas merged commit 4690aff into Appmixer-ai:dev Jan 21, 2026
1 check passed
vtalas pushed a commit that referenced this pull request Jan 21, 2026
* Initial plan

* Apply PR #928 security changes to MSSQL connector

Co-authored-by: jirihofman <12988096+jirihofman@users.noreply.github.com>

* Add unit tests for MSSQL validateQuery function

Co-authored-by: jirihofman <12988096+jirihofman@users.noreply.github.com>

* only triggers do `validateQuery`

* icon update

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: jirihofman <12988096+jirihofman@users.noreply.github.com>
Co-authored-by: Jiří Hofman <jiri.hofman@gmail.com>
@jirihofman jirihofman deleted the fffff branch February 8, 2026 23:44
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.

2 participants