Skip to content

Non-English text is blocked and fully redacted as invisible_text #121

Closed

Description

@chiruu12

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:

  1. 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.
  2. Say plainly in the README that detection is tuned for English today, and track multi-language support as its own piece of work.

Not a first issue. Taking this one.

Activity

  1. self-assigned this
    on Aug 15, 2026
  2. added
    bugSomething isn't working
    claimedAssigned to a contributor; not available to take
    on Aug 15, 2026
  3. mansiverma897993 commented on Aug 15, 2026

    @mansiverma897993
    Collaborator

    @chiruu12 Can you assign this issue to me ?

  4. chiruu12 commented on Aug 16, 2026

    @chiruu12
    CollaboratorAuthor

    This one is already assigned. #119 is open and unclaimed if you want something to pick up, it is self contained.

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

Metadata

Metadata

Labels

bugSomething isn't workingclaimedAssigned to a contributor; not available to take

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions