Skip to content

security(mcp): reading the schema:// resource is not logged and its errors are not redacted #1775

Closed

Description

@ZhuchkaTriplesix

Problem

`QueryaMcpServer._readSchema` (lib/core/mcp/querya_mcp_server.dart) bypasses `_guarded`: it never calls `_report`, so reading `schema://` is missing from the activity log, and an exception from `service.schemaOverview` reaches the MCP library as is, without `McpRedaction`, so a driver error quoting a connection string or an option list can reach the client.

Fix

Route the resource read through the same wrapper as the tools (activity record with tool `schema`, `McpToolException` for failures, redaction with the connection's secrets). Test: a failing driver error containing a password is masked; the call appears in `mcp_activity`.

Found in the MCP review.

Activity

  1. added
    bugSomething isn't working
    P2Medium priority / Parity & Refactoring
    securitySecurity related
    on Oct 25, 2026
  2. added a commit that references this issue on Oct 25, 2026
  3. ZhuchkaTriplesix commented on Oct 25, 2026

    @ZhuchkaTriplesix
    MemberAuthor

    Fixed on dev in #1784 (merged). Closing by hand: the PRs target dev, so GitHub would only close this when dev is merged into main.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Medium priority / Parity & RefactoringbugSomething isn't workingsecuritySecurity related

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions