Skip to content

fix(model): expand sql injection blacklist in scope handler sanitization#2090

Merged
bpamiri merged 1 commit intodevelopfrom
peter/fix-scope-handler-sql-blacklist
Apr 10, 2026
Merged

fix(model): expand sql injection blacklist in scope handler sanitization#2090
bpamiri merged 1 commit intodevelopfrom
peter/fix-scope-handler-sql-blacklist

Conversation

@bpamiri
Copy link
Copy Markdown
Collaborator

@bpamiri bpamiri commented Apr 10, 2026

Summary

  • Add WAITFOR, DELAY (MSSQL time-based injection) to the existing keyword group
  • Add INTO OUTFILE (MySQL file write), LOAD_FILE() (MySQL file read), and CHAR() (encoding bypass) as new patterns
  • Word-boundary matching prevents false positives (e.g., "delayed" is not stripped)

Test plan

  • Existing scope handler sanitization tests pass
  • New tests verify WAITFOR/DELAY, INTO OUTFILE, LOAD_FILE, CHAR stripping
  • New test confirms word-boundary matching avoids false positives
  • Run bash tools/test-local.sh model

🤖 Generated with Claude Code

Add WAITFOR, DELAY, INTO OUTFILE, LOAD_FILE, and CHAR() to the keyword
blacklist in $sanitizeScopeHandlerArgs() to cover time-based and
file-based SQL injection vectors.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@bpamiri bpamiri merged commit 02e8eb2 into develop Apr 10, 2026
3 checks passed
@bpamiri bpamiri deleted the peter/fix-scope-handler-sql-blacklist branch April 10, 2026 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant