Skip to content

Document invisible characters in tool metadata in security considerations - #376

Open
LF3551 wants to merge 1 commit into
webmachinelearning:mainfrom
LF3551:security-invisible-characters
Open

LF3551 wants to merge 1 commit into
webmachinelearning:mainfrom
LF3551:security-invisible-characters

Conversation

@LF3551

@LF3551 LF3551 commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #360.

Adds a mitigation under Security and Privacy Considerations → Mitigations for invisible characters (Unicode tag characters, zero-width characters, bidi controls) in tool titles, descriptions, and schemas. Non-normative, as requested in the issue.

It covers why these characters get past review, approval UIs, and keyword or small-model guardrails, why tool names and length limits don't address it, and the practical points from @seunghan91's comment:

  • match on code points rather than UTF-16 code units, since tag characters are surrogate pairs;
  • replace lone surrogates before removing anything (description is a DOMString, unlike the USVString title; in the serialized schema they appear as \uXXXX escapes, so this applies to the parsed schema);
  • use Default_Ignorable_Code_Point as a baseline instead of a hand-written list;
  • don't strip values the tool receives (enum, const, default, property names);
  • show the user the same text the model gets.

Built locally with Bikeshed (--die-when=late), no warnings.


Preview | Diff

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Security considerations: tool text can contain characters nobody sees

1 participant