Skip to content

Permission firewall: MCP tool classification fails open for unknown write tools #478

Description

@PavelDo

While evaluating the permission firewall for use as a shared enforcement standard across Keboola agent projects, we found an asymmetry in how unknown operations are classified:

  • CLI operations fail closed (unknown command -> denied), which is correct.
  • MCP tool classification uses a name-prefix heuristic that fails open: a tool whose name does not match a known write prefix is classified as a read and allowed. Example: a hypothetical truncate_table tool would be classified read-only and pass the firewall.

Suggested fix: invert the default for MCP tools — treat unknown/unclassified tool names as writes (deny or confirm), and maintain an explicit read allowlist, mirroring the CLI side's fail-closed behavior.

Related question: ADR-0002 describes a "locked mode" (privilege separation + config pinning) as the answer to the same-uid config rewrite concern — is that shipped, and if so where is it documented? We would like to depend on it.

Context: this came out of a July 2026 comparison of enforcement regimes (kbagent firewall vs Claude Code hooks/sandbox vs native permission rules) for a Keboola-wide standard. Happy to share the full memo internally.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions