Skip to content
Back to skills

Confusable Unicode Audit

ASecurity

Detect bidi controls, zero-width characters, mixed-script identifiers, and homoglyph risks in source and release metadata

  • 207 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added May 27, 2026
data-aigobashgitapisecuritydocumentation

Works with

  • api

Security analysis

A100/100

Scanned May 27, 2026

npx -y skills add jmagly/aiwg --skill confusable-unicode-audit --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Confusable Unicode Audit?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Confusable Unicode Audit
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/jmagly-confusable-unicode-audit/badge)](https://www.skillsdirectory.com/skills/jmagly-confusable-unicode-audit)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
namespace: aiwg
name: confusable-unicode-audit
platforms: [all]
description: Detect bidi controls, zero-width characters, mixed-script identifiers, and homoglyph risks in source and release metadata
requires:
  - git: repository file enumeration
ensures:
  - report: suspicious Unicode occurrences with code point, context, and allowlist status
  - exit-code: non-zero when violations found and --fail-on-violation is set
errors:
  - allowlist-invalid: .aiwg/security/confusable-unicode-allowlist.yaml cannot be parsed
invariants:
  - exact code points are reported so reviewers do not need visual inspection
  - allowlisted non-ASCII is still included in the exceptions section
commandHint:
  argumentHint: "[--fail-on-violation] [--include-metadata] [--format text|json]"
  allowedTools: Read, Bash, Grep
  model: sonnet
  category: security
  orchestration: false
---

# Confusable Unicode Audit

Detect Trojan Source and homoglyph risks in source files, dependency names, and release metadata. This enforces `no-confusable-unicode` and maps curl Practice 8 into an AIWG control.

## Detection Targets

- Bidirectional controls: U+202A through U+202E, U+2066 through U+2069.
- Zero-width characters: U+200B through U+200F, U+FEFF.
- Non-ASCII identifiers in source code.
- Mixed-script identifiers, especially Latin plus Cyrillic or Greek.
- Package/dependency names containing non-ASCII or confusable characters.
- Optional metadata scan: commit subject, PR titles, release notes.

## Allowlist

Legitimate non-ASCII is declared in `.aiwg/security/confusable-unicode-allowlist.yaml`:

```yaml
version: 1
allow:
  - path: "docs/i18n/**"
    reason: "localized documentation"
  - identifier: "naive_bayes"
    codepoints: ["U+00EF"]
    reason: "historical exported API spelling"
```

## Output

Reports show file, line, column, Unicode code point, character name, and remediation. Bidi and zero-width controls are always HIGH severity.

## References

- `agentic/code/frameworks/security-engineering/rules/no-confusable-unicode.md`
- Unicode TR39
- Trojan Source / CVE-2021-42574

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.