Skip to content

fix: explicitly block stored procedure SQL calls#96

Open
palakjaiswal16 wants to merge 1 commit into
Mananwebdev160408:mainfrom
palakjaiswal16:issue-74-explicitly-block-exec-call
Open

fix: explicitly block stored procedure SQL calls#96
palakjaiswal16 wants to merge 1 commit into
Mananwebdev160408:mainfrom
palakjaiswal16:issue-74-explicitly-block-exec-call

Conversation

@palakjaiswal16
Copy link
Copy Markdown
Contributor

Summary

Explicitly blocks stored procedure SQL calls in the read-only query guard so EXEC, EXECUTE, and CALL are rejected intentionally instead of only being blocked incidentally.


Type of Change

  • Bug fix
  • New feature
  • Refactor (no functional change)
  • Documentation update
  • UI / style improvement
  • Tests
  • Config / CI / tooling

What Was Changed

  • Moved isReadOnlySqlQuery into a small query-safety module so it can be tested directly.
  • Added exec, execute, and call to the blocked SQL keyword list.
  • Added regression tests for read-only queries, hidden writes, and stored procedure calls.

How to Test

  1. Run npm install
  2. Run npm test -- --run
  3. Run npm run lint

Checklist

  • My code follows the project's TypeScript conventions
  • npm run lint passes (no TypeScript errors)
  • I have tested my changes locally
  • I have added comments where the code is complex or non-obvious
  • I have updated relevant documentation (if applicable)
  • This PR is linked to an open issue

Screenshots (if UI change)

Not applicable. This is a backend/query safety change.


Related Issues / PRs

Closes #74

@Mananwebdev160408
Copy link
Copy Markdown
Owner

This PR currently has merge conflicts with the base branch. Please resolve them so we can proceed with merging. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] isReadOnlySqlQuery does not account for stored procedure calls (EXEC/CALL)

2 participants