Repository navigation
Conversation
|
@jpagnucco I can't think of a downside to rejecting tool registrations with invisible characters in the title or description. WDYT about this? |
|
+1 to rejecting at registration. From the host side it is also simpler than stripping: with stripping, the text the user reviews is no longer the text the developer wrote, and values the tool receives ( A few things that would make rejection consistent across implementations:
A clear error message that names the offending code point and where it was found would help developers hit by (4). |
|
Thanks @markafoltz @seunghan91 — updated the note in a9d7580 to recommend rejecting registrations rather than stripping metadata. It now covers a shared Unicode character set/version, code-point checks and lone-surrogate rejection, recursive checks of both serialized schemas, emoji and language trade-offs with context-defined exceptions, and diagnostics identifying the offending character and location. The I kept this non-normative as requested in #360; the |
Fixes #360.
Adds a mitigation under Security and Privacy Considerations → Mitigations for invisible characters in tool titles, descriptions, and schemas. Following @markafoltz's and @seunghan91's feedback, it now recommends rejecting registrations rather than silently stripping metadata.
The note covers:
Default_Ignorable_Code_Pointas the baseline for a precisely defined character set, with a shared Unicode version and explicitly defined exceptions across implementations;titleis already aUSVString);enum,const, anddefault, after resolving JSON escapes and anytoJSON()transformation, without rewriting the schema;The section remains non-normative, as requested in #360. This PR does not add a rejection step to
registerTool(); a normative check would need agreement on the Unicode version, exceptions, schema checks, and rejection behavior.Validation:
make lintand a full Bikeshed build with--die-on=warning --die-when=lateboth pass without warnings. Changes are confined to this mitigation section.Preview | Diff