Expand description
Unicode text guards: block characters that let hostile input spoof how logs, receipts, and identifiers look on a terminal.
The dangerous set here is the “Trojan Source” family — bidirectional overrides and zero-width formatting characters — that render invisibly (or reverse the visible order of surrounding text) while remaining part of the string’s bytes. When those characters ride along in a JWT identity claim or a tool name, an operator investigating an audit chain sees one thing while the on-wire bytes say another.
Functions§
- contains_
bidi_ or_ zero_ width - True if
scarries any character that visually reorders or hides surrounding text (Trojan-Source-class spoofing).