YongGoose commented on issue #1036:
URL: https://github.com/apache/burr/issues/1036#issuecomment-7072824172

   Thanks @vaquarkhan, both points check out.
   
   I reproduced the ID one on main. With `curl --path-as-is`, `GET 
/api/v0/../<dir>/__none__/apps` returned the `graph.json` of a directory next 
to the data directory, and `POST /api/v0/../<dir>/__none__/0/annotations` 
created an `annotations.jsonl` there. The Host point is fair too: the SDK's 421 
on `/mcp` doesn't help much while `/api/v0` serves the same data without a 
check.
   
   I've opened the MCP PR as a draft: #1050. It doesn't check IDs itself and 
doesn't touch the Host check, so I'd appreciate it if you could send those two 
as the small PRs you offered. Once the server has an allowed-hosts setting, 
`/mcp` should use that one rather than its own.
   
   On your other two points:
   
   **inspect vs annotate.** `inspect` is already under `BURR_MCP_GROUPS`. It's 
only the default, and `BURR_MCP_GROUPS=annotate` serves just the annotate 
tools. My reasoning for the default: `inspect` doesn't expose anything new, 
because a client that can call `/mcp` can read the same data from `/api/v0` on 
the same port. What's new is that an assistant reads it, and I agree that state 
can carry injected text. What an injected instruction can do then depends on 
the tools the assistant has. With read-only Burr tools, it can't change 
anything in Burr. With `annotate` on, it can get the assistant to write notes 
and tags that people later trust in the UI. That's why writes stay opt-in. The 
docs in #1050 say plainly that `inspect` passes untrusted text to the assistant.
   
   **`BURR_MCP_MAX_CHARS`.** Added in #1050. It's unset by default, so nothing 
is capped unless the operator sets it. When set, it's a ceiling that 
`max_chars` can't raise, including `max_chars=None`, and the server 
instructions tell the assistant about it. I'd call it an output-size control 
rather than an injection defense, since an injected instruction fits in the 
first few hundred characters anyway.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to