Zero-dependency CLI that audits text, source code, and domains for Unicode homoglyphs, invisible and bidi characters, and Trojan Source attacks, with JSON reports and CI exit-code gating.
Unicode Homoglyph & Invisible-Character Security Audit Engine
A lightweight, zero-dependency, pure-stdlib CLI: detects Unicode homoglyph phishing, invisible/format characters, and Trojan Source bidirectional attacks (CVE-2021-42574).
Modern text is no longer just ASCII. Attackers can use Unicode homoglyphs to make аррle.com look like apple.com, zero-width characters to smuggle malicious logic into source code, or bidirectional control characters (Trojan Source, CVE-2021-42574) to visually reorder comments and code. These characters are invisible in editors yet bypass human code review.
GlyphGuard is a developer-facing security audit engine that performs a systematic Unicode health check on text, source code, and domain names — locally, offline, and dependency-free:
аррle → apple at a glance.pyz via zipapp, zero-dependency build)Inspiration: Unicode Technical Reports #36 / #39, the Trojan Source research, and community work such as codebox/homoglyph. Distinct from the account's existing security tools (RepoShield, VulnScan, MCPShield, PromptShield) — similarity < 10%.
unicodedata / argparse / json) — no pip install, runs anywhere offline.audit returns structured exit codes, ready to gate merges in GitHub Actions / GitLab CI..pyz single-file executable.1. Single-file executable (recommended, zero install)
Download glyphguard-<os>.pyz for your platform from Releases:
python glyphguard-<os>.pyz audit ./src --recursive
2. Run from source
git clone https://github.com/gitstq/GlyphGuard.git
cd GlyphGuard
python -m glyphguard audit ./src --recursive
3. Editable install
pip install -e .
glyphguard audit ./src --recursive
| Command | Purpose |
|---|---|
audit PATH... | Audit files / directories for Unicode risks |
skeleton TEXT | Map text to its ASCII skeleton |
invisibles TEXT | List invisible / control characters |
normalize TEXT | Unicode normalization or cleaning |
escape TEXT | Escape non-ASCII / control characters |
unescape TEXT | Reverse escape |
width TEXT | Compute terminal display width |
inspect TEXT | Per-character Unicode introspection |
domain NAME | Audit a domain for homographs |
# Recursive directory audit
glyphguard audit ./src --recursive
# CI gate: non-zero exit on critical
glyphguard audit ./src -r --fail-on critical
echo $? # 0=clean, 1=warning, 2=critical
# Homoglyph skeleton
glyphguard skeleton "аррle" # apple
# Domain audit
glyphguard domain "аррle.com" # Looks like (ASCII): apple.com
Security tools often run in constrained / offline environments (CI runners, audit sandboxes). Third-party dependencies introduce supply-chain risk and install overhead. GlyphGuard is strictly zero-dependency, relying only on unicodedata (Python's built-in Unicode database), so it runs on any machine with Python.
data.py): hand-curated, unambiguous mappings (Cyrillic / Greek / Armenian look-alikes of ASCII), augmented by algorithmic ranges (fullwidth, mathematical letters, circled letters) to avoid false positives..glyphguard.toml config for allowlists and thresholdspython -m compileall -q glyphguard
python - <<'PY'
import shutil, zipapp
shutil.copytree("glyphguard", "stage/glyphguard")
zipapp.create_archive("stage", "dist/glyphguard.pyz",
main="glyphguard.cli:main",
interpreter="/usr/bin/env python3")
PY
python dist/glyphguard.pyz version
Two workflows are included:
.github/workflows/ci.yml: syntax check + unittest on Windows / macOS / Linux × Python 3.9–3.13 (stdlib only)..github/workflows/release.yml: on v* tags, builds .pyz on all three platforms via zipapp and auto-creates the GitHub Release with assets.git tag v1.0.0
git push origin v1.0.0 # triggers build & release
📥 Download: GitHub Releases v1.0.0
Contributions welcome! See CONTRIBUTING.md:
feat: / fix: / docs: …)Released under the MIT License.
Made with 🔥 by gitstq

منصة XDR و SIEM مفتوحة المصدر لكشف التهديدات وتحليل السجلات ومراقبة سلامة الملفات وتقييم الثغرات وإدارة الامتثال عبر نقاط النهاية وأعباء العمل السحابية.

محرك شبكة مفتوح المصدر لأنظمة IDS/IPS/NSM لفحص حركة المرور في الوقت الفعلي، واكتشاف ومنع التسلل، وتحليل البروتوكولات، ومطاردة التهديدات المبنية على القواعد.

Zeek هو إطار تحليل شبكات قوي يختلف كثيرًا عن نظام IDS التقليدي الذي قد تعرفه.