Environment
- Windows
- Codex Security plugin: 0.1.11
- Security workspace UI: 0.1.63
- Python default locale encoding:
cp1251
- Target:
<Windows path containing Cyrillic characters>
Reproduction
- Use a valid Git worktree whose path contains non-ASCII characters.
- Start a standard scan for the worktree.
Workspace setup reports:
{
"isGit": true,
"isWorktree": true,
"hasHead": true
}
Observed
The scan fails with:
Scan target must stay inside its Git working tree.
git rev-parse --show-toplevel returns the correct UTF-8 path, but Python decodes the output using the Windows locale. The resulting path is corrupted, so Path.relative_to() raises ValueError.
Setting PYTHONUTF8=1 makes the helper pass, confirming the decoding issue.
Validation
The issue was reproduced and verified with temporary Git repositories using root and nested targets. Tested path components included:
- Cyrillic
- Simplified and Traditional Chinese
- Japanese
- Arabic
- Korean
- Thai
- Lao
- Khmer
- Burmese
- Georgian
- Armenian
- Indic scripts
- Persian and Urdu
- Amharic
- Mongolian
- Tibetan
- Ukrainian and Serbian
- Latin diacritics
- Combining characters
- Emoji
After decoding text-mode Git output as UTF-8, all cases passed and returned the correct pathspec. Binary Git output remained unchanged.
Suggested fix
Set an explicit encoding for text-mode Git subprocess calls:
encoding="utf-8" if text else None,
The scan-start waiter also remains pending after this startup error. A retry returns:
A scan-start waiter already exists
Environment
cp1251<Windows path containing Cyrillic characters>Reproduction
Workspace setup reports:
{ "isGit": true, "isWorktree": true, "hasHead": true }Observed
The scan fails with:
git rev-parse --show-toplevelreturns the correct UTF-8 path, but Python decodes the output using the Windows locale. The resulting path is corrupted, soPath.relative_to()raisesValueError.Setting
PYTHONUTF8=1makes the helper pass, confirming the decoding issue.Validation
The issue was reproduced and verified with temporary Git repositories using root and nested targets. Tested path components included:
After decoding text-mode Git output as UTF-8, all cases passed and returned the correct pathspec. Binary Git output remained unchanged.
Suggested fix
Set an explicit encoding for text-mode Git subprocess calls:
The scan-start waiter also remains pending after this startup error. A retry returns: