Skip to content

chore(security): comprehensive Unicode byte-boundary threat analysis (TM-UNI)#439

Merged
chaliy merged 4 commits intomainfrom
claude/unicode-security-investigation-eE1V5
Mar 1, 2026
Merged

chore(security): comprehensive Unicode byte-boundary threat analysis (TM-UNI)#439
chaliy merged 4 commits intomainfrom
claude/unicode-security-investigation-eE1V5

Conversation

@chaliy
Copy link
Copy Markdown
Contributor

@chaliy chaliy commented Mar 1, 2026

Summary

Test plan

  • 68 unicode security tests pass (cargo test --test unicode_security_tests)
  • cargo fmt --check clean
  • cargo clippy clean
  • Rebased on latest main (includes prior security audit integration)

claude added 4 commits March 1, 2026 05:21
Add comprehensive Unicode security analysis (TM-UNI-001 through TM-UNI-014)
covering byte-boundary panics, zero-width character injection, homoglyphs,
normalization bypass, combining character abuse, tag character hiding, and
bidi attacks in script source. Includes 37 security tests.

Key findings:
- TM-UNI-001/002 (MEDIUM): awk/sed parsers use char position as byte offset,
  causing panics on multi-byte UTF-8. catch_unwind prevents process crash but
  builtins silently fail on valid Unicode input (issue #395).
- TM-UNI-003/011-013 (LOW, UNMITIGATED): find_unsafe_path_char() does not
  reject zero-width chars, tag chars, or deprecated format chars in filenames.
- TM-UNI-004-008/014 (ACCEPTED): Homoglyphs, normalization, bidi in scripts
  match Bash/Linux behavior; impractical or out-of-scope to detect.

Updates specs/006-threat-model.md and crates/bashkit/docs/threat-model.md.

https://claude.ai/code/session_01UyZS8g5xbhbBwApxqS4evf
Codebase-wide Unicode security audit found byte/char confusion in 5
additional components beyond awk/sed. Added TM-UNI-015 through TM-UNI-019
covering expr, printf, cut/tr, interpreter arithmetic, and network
allowlist. Added 31 new security tests (68 total) and documented safe
components confirmed by audit (lexer, wc, grep, jq, sort/uniq, logging).

https://claude.ai/code/session_01UyZS8g5xbhbBwApxqS4evf
…-UNI

- Link TM-UNI-015 through TM-UNI-019 to issues #434-#438
- Add comprehensive safe-component list from full codebase audit:
  python.rs, bashkit-python, eval harness, curl, bc, export, date,
  comm, echo, archive, base64, scripted_tool — all verified safe
- Update both specs/006-threat-model.md and docs/threat-model.md

https://claude.ai/code/session_01UyZS8g5xbhbBwApxqS4evf
…atus

Add security test section documenting 68 unicode byte-boundary tests
across 13 categories covering all affected components.

https://claude.ai/code/session_01UyZS8g5xbhbBwApxqS4evf
@chaliy chaliy merged commit 8afde72 into main Mar 1, 2026
16 checks passed
@chaliy chaliy deleted the claude/unicode-security-investigation-eE1V5 branch March 12, 2026 03:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants