Repository navigation
Invisible Unicode: bidi isolates, Arabic letter mark, word joiner and invisible operators count as hidden text (Part of #4108) - #8207
Merged
Conversation
… invisible operators count as hidden text (Part of #4108) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Contributor
|
No description provided. |
Contributor
This was referenced Nov 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #4108 (slice 26, filler).
What
The hidden-text half of the Security Lens (
HIDDEN_TEXT_SIGNATURES["reflection_metaprogramming"], the Invisible Unicode Payload Smuggling count) read only U+200B/C/D, U+200E/F, U+202A-202E and U+FEFF. Characters that render as nothing and hide a payload the same way were missed. Probed on the real lens: a run of each scored 0. Now added: U+2060-2064 (word joiner, invisible function application/times/separator/plus), U+2066-2069 (Trojan-Source bidi isolates, CVE-2021-42574) and U+061C (Arabic letter mark). Virama exemption for ZWNJ/ZWJ unchanged.Class / Sibling gaps
Class: invisible or zero-width code points that the hidden-text regex must count wherever they sit (comment, string, code). Handled (tested fire, in comment/string/code): U+200B, U+202E (already live), U+2060-2064, U+2066-2069, U+061C. Tested no-fire: plain ASCII, accented/CJK/Arabic text, arrows/math symbols beside the U+206x block, U+2028, soft hyphen, nbsp, ideographic space.
Sibling gaps (not changed, status missing): Hangul filler U+3164 / U+FFA0 / U+115F / U+1160 only count in import-like context (
homoglyphs), a bare run elsewhere scores 0; Mongolian vowel separator U+180E; Braille blank U+2800; combining grapheme joiner U+034F; interlinear annotation U+FFF9-FFFB. Why not here: each has legitimate prose uses (braille text, Mongolian, Korean) so needs a run-length or context rule and its own FP probe. Source: probe in this PR's session. Also open: variation-selector/tag run (unicode_steganography) needs >=3 chars, a 1-2 char payload is not counted (by design, emoji).Evidence
tests/security_auditing/test_hidden_text_invisible_chars_4108.py: 42 pass;test_security_lens.pyandtest_zero_coverage_signals_4108.pystill pass.pr_gates.py --fast: 9/9.audit_check.py: all clear.crucible_check.py(both legs): PASS, golden unmoved (the only crucible files with these characters are a.matbinary).--ratchetsnot run (golden check run directly, no ground-truth/mainframe input touched).Remaining slices: the sibling gaps above, one probe each.
🤖 Generated with Claude Code