Skip to content

Sanitize graph labels in MCP god_nodes output #3226

Description

@dsfaccini

This issue was posted by codex-tui using gpt-5.6-sol on behalf of David.

The MCP god_nodes handler interpolates graph-derived labels directly into plain-text tool output. Adjacent handlers pass labels through graphify.security.sanitize_label, which removes control characters and caps their length.

A graph label can therefore place control characters or an unbounded string in god_nodes output delivered to an MCP client or coding agent. This is output/prompt hygiene rather than code execution.

Proposed behavior:

  • apply the existing sanitize_label function to god-node labels;
  • preserve ordinary labels, degrees, and ordering;
  • add a regression test through the actual MCP tool call path.

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