You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Non-English text is blocked and fully redacted as invisible_text #121
The SDK targets English text for now, but it fails on non-English input in the worst possible way: silently, and by destroying the message.
Guard().scan("今天北京的天气很好,我想去公园散步。") returns block, risk 0.85, injection/invisible_text, and redacted_text is [BLOCKED:injection]. Same for Russian. The English translation returns allow, 0.00.
scanners/injection/scanner.py:52 fires invisible_text whenever the normalizer's homoglyph or fullwidth stage changed anything, without checking that the change looks adversarial. Cyrillic а/е/о/р map to Latin and CJK punctuation goes through the fullwidth stage, so ordinary text trips it. The finding spans 0..len(text), so redaction eats the whole message.
Two things to do, in order:
Narrow the invisible_text trigger to actual mixed-script or zero-width abuse rather than any normalizer change, and scope the finding span to the offending characters instead of the whole input.
Say plainly in the README that detection is tuned for English today, and track multi-language support as its own piece of work.
Activity
mansiverma897993 commentedon Aug 15, 2026
@chiruu12 Can you assign this issue to me ?
fix(injection): redact interleaved evasion runs as one span (UnplugAI…
chiruu12 commentedon Aug 16, 2026
This one is already assigned. #119 is open and unclaimed if you want something to pick up, it is self contained.
fix(injection): don't flag ordinary non-English text as invisible_text (