fix: add U+0405 (Ѕ→S) and U+0406 (І→I) to HOMOGLYPH_MAP in sanitize_content_core.cjs#28925
Merged
fix: add U+0405 (Ѕ→S) and U+0406 (І→I) to HOMOGLYPH_MAP in sanitize_content_core.cjs#28925
Conversation
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/5fb60b3d-f788-4bb8-88de-a6546f36e016 Co-authored-by: szabta89 <1330202+szabta89@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix HOMOGLYPH_MAP by adding missing uppercase mappings for U+0405 and U+0406
fix: add U+0405 (Ѕ→S) and U+0406 (І→I) to HOMOGLYPH_MAP in sanitize_content_core.cjs
Apr 28, 2026
pelikhan
approved these changes
Apr 28, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Adds missing uppercase Cyrillic homoglyph mappings so hardenUnicodeText normalizes obfuscated strings consistently and prevents bypasses in downstream detection.
Changes:
- Add
U+0405(Ѕ) →SandU+0406(І) →ItoHOMOGLYPH_MAP. - Add regression tests covering both uppercase codepoints, including the reported reproduction string.
Show a summary per file
| File | Description |
|---|---|
| actions/setup/js/sanitize_content_core.cjs | Extends Cyrillic uppercase homoglyph normalization to include Ѕ and І. |
| actions/setup/js/sanitize_content.test.cjs | Adds targeted tests to prevent regressions for the new mappings. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 2/2 changed files
- Comments generated: 0
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.
The
hardenUnicodeTextnormalization layer handled lowercase Cyrillic dze (U+0455→s) and Ukrainian I (U+0456→i) but was missing their uppercase counterparts, allowing strings like"PENTEЅT-ЅECRET-MARKER"to pass through the sanitizer unchanged and reach downstream threat detection with obfuscated content.Changes
sanitize_content_core.cjs— add two missing entries toHOMOGLYPH_MAPunder the Cyrillic uppercase block:sanitize_content.test.cjs— add regression tests for both codepoints, including the exact reproduction case from the issue ("PENTE\u0405T-\u0405ECRET-MARKER"→"PENTEST-SECRET-MARKER").Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
invalid.example.invalid/usr/lib/git-core/git-remote-https /usr/lib/git-core/git-remote-https origin https://invalid.example.invalid/nonexistent-repo.git git comm�� ental-OlTrPv Auth cleanup new commit es/.bin/git -m Initial commit tions/setup/node-u git rev-�� --count origin/auth-cleanup-success..auth-cleanup-success es/.bin/git -u origin it git(dns block)/usr/lib/git-core/git-remote-https /usr/lib/git-core/git-remote-https origin https://invalid.example.invalid/nonexistent-repo.git git comm�� ental-82jZrk Auth cleanup new commit es/.bin/git -m Initial commit tions/setup/node-u git rev-�� --count origin/auth-cleanup-success..auth-cleanup-success es/.bin/git -u origin it git(dns block)/usr/lib/git-core/git-remote-https /usr/lib/git-core/git-remote-https origin https://invalid.example.invalid/nonexistent-repo.git git comm�� ental-Ml9yIM Auth cleanup new commit es/.bin/git -m Initial commit tions/setup/node-u git rev-�� --count origin/auth-cleanup-success..auth-cleanup-success es/.bin/git -u origin it git(dns block)If you need me to access, download, or install something from one of these locations, you can either: