{{ message }}
fix(sql-builder): block INTO OUTFILE and INTO FILE - #3229
Merged
Conversation
ClickHouse SELECT ... INTO OUTFILE (and the INTO FILE alias) writes query output to a server-side file path, a data-movement side effect outside read-only monitoring. The sql-validator denylist had no clause for it, so a SELECT that starts with SELECT (and thus passes the statement-type gate) could carry an INTO OUTFILE write through. Add an INTO_FILE_WRITE pattern to SQL_PATTERNS and wire it into SQL_INJECTION_PATTERNS. It scans the literal-blanked copy so a LIKE '%INTO OUTFILE%' audit query is not mis-flagged, while the real clause tokens (which sit outside a literal) are still blocked. Closes #3222 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Co-Authored-By: duyetbot <bot@duyet.net>
duyet
enabled auto-merge (squash)
August 23, 2026 04:17
Contributor
☁️ Cloudflare Preview Deployment
|
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.

Closes #3222