Skip to content

FEAT-004 — Allowlisted stored procedures with typed, context-bound parameters (#173) - #189

Merged
jmmana merged 2 commits into
mainfrom
feat/173-procedures
Nov 30, 2026
Merged

jmmana merged 2 commits into
mainfrom
feat/173-procedures

Conversation

@jmmana

@jmmana jmmana commented Nov 30, 2026

Copy link
Copy Markdown
Owner

Refs #173.

  • procedures in Policy and the JSON schemas (generated from schema.py), codes procedure_not_allowed and procedure_param_invalid (EN/ES).
  • rules/procedures.py: T-SQL EXEC (named parameters only) and PostgreSQL CALL (named arguments only), literals type-checked, context-bound parameters injected from the context, dynamic SQL, sp_executesql, linked servers, numbered procedures, extra EXEC clauses and 4-part names rejected. Without procedures nothing changes; normal queries are unaffected when it is set.
  • Corpus cases, tests, docs/PROCEDURES.md, CHANGELOG, conformance export regenerated.
  • A Sonnet 5.5 security review found issues in name normalization, ignored EXEC clauses, hand-parsed CALL arguments and bound values; fixed in this PR. Also caught and fixed by testing: a regression that rejected plain queries when procedures was set, and the dropped N prefix on Unicode values.

Not in this PR: SQL Server and PostgreSQL engine tests (need the real-engine CI job) and set-returning functions in FROM. Leaves out #155, #156, versions and release.yml.

🤖 Generated with Claude Code

jmmana and others added 2 commits November 30, 2026 12:12
#173)

procedures in Policy and the schemas, procedure_not_allowed and procedure_param_invalid (EN/ES),
rules/procedures.py for tsql EXEC and postgres CALL (named parameters only, literals
type-checked, context-bound parameters injected, dynamic SQL, sp_executesql and linked servers
rejected), corpus cases, tests, docs.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Canonical names, no catalog or 4-part names, extra EXEC clauses rejected, consistent integer
forms on EXEC and CALL, non-scalar bound values rejected, regression tests.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 30, 2026 17:16

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@jmmana
jmmana merged commit e5413a6 into main Nov 30, 2026
24 checks passed
@jmmana
jmmana deleted the feat/173-procedures branch November 30, 2026 17:29
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