prompt injection obfuscation detection
Open
@sarahxsanders is already working on this.
Since Apr 22, 2026.
- Dominant language
- TypeScript
- Stars
- 0
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
attackers obfuscate prompt injection payloads to bypass pattern-based filters. current prompt injection rules match only literal English phrases. known techniques include:
- zero-width Unicode characters inserted between letters
- leetspeak substitutions
- reverse-string / backwards-text
- homoglyph attack
- base64 / hex encoding of the payload
pattern-based security tools are always in an arms race. this is just the reality of creating a tool like this.
proposal
- unicode normalization at scan time: before YARA matching, pre-process content to strip zero-width characters and apply NKFC Unicode normalization (this requires an engine change, NOT a rule change)
- leetspeak-tolerant patterns
- base64 detection outside comments: extend to a payload rule that fires on any sufficiently long base64 string in content, not just comments
- document reverse-text detection as a known gap: needs a consumer-side solution
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.