Repository navigation
Fix SQL injection in connector sample path and validate source queries - #688
Open
vishwasvaidya-cloudsufi wants to merge 1 commit into
Open
vishwasvaidya-cloudsufi wants to merge 1 commit into
vishwasvaidya-cloudsufi wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces SQL identifier quoting to prevent SQL injection vulnerabilities across various database connectors, and adds query validation using jsqlparser to ensure that import and bounding queries are read-only SELECT statements. Feedback on these changes highlights several potential NullPointerException risks when database or schema parameters are null during identifier quoting, as well as a recommendation to use Locale.ROOT with toLowerCase() to avoid locale-sensitive string comparison issues.
vishwasvaidya-cloudsufi
force-pushed
the
sql-identifier-escaping
branch
2 times, most recently
from
November 2, 2026 05:10
54ea798 to
890fafd
Compare
vishwasvaidya-cloudsufi
force-pushed
the
sql-identifier-escaping
branch
from
November 2, 2026 08:14
890fafd to
8e7560e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What's this about
A VRP report found a SQL injection in the Cloud SQL PostgreSQL connector's sample path. A table path containing a
"could break out of the quoted name and run extra statements, like anUPDATE, using the connection's saved credential. The same issue existed in every connector.What changed
stratacolumn are now properly escaped, so a quote inside a name can't break out anymore.SELECT. Anything else is rejected before it ever reaches the database. Use the Database action plugins forSET,EXEC,UPDATEand similar.[bracket]names keep working.Heads up
Existing pipelines with a non-SELECT Import Query can fail after this and need to move that logic to an action.
Testing
Added unit tests for escaping in every connector, including the payload from the report, plus validator tests and end-to-end pipeline tests confirming bad queries are blocked and no data is changed. Not yet tested against real database instances.