Skip to content

fix(mcp): the SQL guard's function denylist also matches quoted names (#1769) - #1782

Merged
ZhuchkaTriplesix merged 1 commit into
devfrom
fix/mcp-sql-guard-quoted-functions
Oct 25, 2026
Merged

ZhuchkaTriplesix merged 1 commit into
devfrom
fix/mcp-sql-guard-quoted-functions

Conversation

@ZhuchkaTriplesix

Copy link
Copy Markdown
Member

Closes #1769.

  • Quotes (" and backtick) are dropped from the copy used for the function denylist, so "nextval"('s') and pg_catalog."pg_terminate_backend"(1) are refused like the unquoted forms.
  • Denylist extended: MySQL SLEEP, BENCHMARK, GET_LOCK, RELEASE_LOCK, RELEASE_ALL_LOCKS, IS_FREE_LOCK; PostgreSQL PG_STAT_RESET*, PG_SWITCH_WAL, PG_CREATE_RESTORE_POINT, PG_LOGICAL_EMIT_MESSAGE, PG_PROMOTE, PG_DROP_REPLICATION_SLOT.
  • Tests: quoted, schema-qualified, spaced and commented forms. Not run locally, CI will.

…, and covers more MySQL and PostgreSQL functions (#1769)
@github-actions github-actions Bot added bug Something isn't working P1 High priority / Core capability security Security related labels Oct 25, 2026
@ZhuchkaTriplesix
ZhuchkaTriplesix merged commit 04dda7c into dev Oct 25, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working P1 High priority / Core capability security Security related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant