Unicode-LE

v1.1.0
io.github.nolindnaidoo/unicode-le Checked 7 hours ago Published 1 month ago

Find the Unicode that hides meaning: bidi controls, invisibles, homoglyphs and mixed scripts.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

detect_unicode_risks

Find the Unicode characters in a document that hide meaning: bidirectional controls (the Trojan Source class, CVE-2021-42574), invisible characters, homoglyphs, words that mix scripts, text that is not in NFC, spaces that are not the space, and unassigned or private-use codepoints. Each finding carries a 1-based line and column, a byte offset, the codepoints as U+XXXX, the script and a severity. It never returns the offending characters themselves, and never rewrites anything. A document plainly written in a non-Latin script is not judged for homoglyphs unless that script is named in `scripts`…

ParameterTypeDescription
content *stringThe document text to scan.
filenamestringThe document's name, as an alternative to `format`. Only its extension is read, and nothing is opened.
formatstringThe document's format, so each finding can carry the key path that names where it sits. Omit it and findings carry a line and column only; an unrecognised name costs the key paths and never a finding.
kindsarrayReport only these kinds. Omit for all of them, which is the only setting under which an empty result means clean.
maxResultsintegerCap on returned findings (default 500). meta.truncated reports whether any were dropped.
scriptsarrayNon-Latin scripts this document is expected to be written in, by Unicode name or ISO 15924 tag, e.g. Han or Cyrillic. Naming them is what allows the homoglyph check to run on a translated document.