fix(cli): sanitizePathForDisplay keeps Unicode format characters such as bidi overrides
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
Research direction
Start with sanitizePathForDisplay in internal/cli/uninit.go, which removes runes where unicode.IsControl is true, and with the duplicate sanitizeControl in internal/cli/present/sanitize.go. Add a unicode.Cf or bidi-control check to both, then add a Cf case to each helper's test. Done when U+202E and U+200B are stripped from the output and the existing tests still pass.
Written by the indexing model from the issue text.
Description
sanitizePathForDisplay (internal/cli/uninit.go) removes the runes for which unicode.IsControl is true. That is Unicode category Cc only. Category Cf runes pass through, for example U+202E RIGHT-TO-LEFT OVERRIDE and U+200B ZERO WIDTH SPACE. A path that holds them can display as a different path from the one on disk.
Every CLI path display goes through this helper, including the skipped-registry-file warning that the #155 change adds. internal/cli/present/sanitize.go keeps a duplicate, sanitizeControl, with the same rule.
Severity
Low. Display only, and the helper was written this way before #155. Someone who can name a file the CLI prints can already show the user a misleading name. The fix stops the display from hiding it.
What to do
- Also drop
unicode.Is(unicode.Cf, r)runes, or at least the bidi controls (U+202A–U+202E, U+2066–U+2069), in both helpers. - Add a Cf case to each helper's test.
Found by the security reviewer in the suite review of the #155 implementation branch (information level).
🤖 Generated with Claude Code
- Dominant language
- Go
- Stars
- 0
- Forks
- 0
- Avg merge
- 5h 16m
- Merged PRs (30d)
- 107
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing 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.
More from seanb4t/codegraph-go
-
area:indexer bug needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
seanb4t/codegraph-go#385 ·
Maintainers usually reply within 1 day
-
chore needs-triage
Difficulty 1/5 Under an hour Newbie friendliness 88/100
seanb4t/codegraph-go#380 ·
Maintainers usually reply within 1 day
-
chore needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
seanb4t/codegraph-go#379 ·
Maintainers usually reply within 1 day
-
chore needs-triage
Difficulty 1/5 1-3 hours Newbie friendliness 84/100
seanb4t/codegraph-go#362 ·
Maintainers usually reply within 1 day
-
area:query bug priority:low spec-needed
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
seanb4t/codegraph-go#355 ·
Maintainers usually reply within 1 day
All issues in seanb4t/codegraph-go
Similar issues
-
enhancement exporter/awskinesis needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
open-telemetry/opentelemetry-collector-contrib#53334 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
erigontech/erigon#26523 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 83/100
SocialGouv/iterion#3376 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
seaweedfs/seaweedfs#12740 · 2 comments ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day