Skip to content

[codex] add sanitize_display terminal injection tests#243

Open
leemeo3 wants to merge 1 commit into
h5i-dev:mainfrom
leemeo3:codex/add-sanitize-display-tests
Open

[codex] add sanitize_display terminal injection tests#243
leemeo3 wants to merge 1 commit into
h5i-dev:mainfrom
leemeo3:codex/add-sanitize-display-tests

Conversation

@leemeo3

@leemeo3 leemeo3 commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add focused unit coverage for sanitize_display against CSI and OSC terminal escape sequences.
  • Cover carriage returns, backspaces, and C0/C1 control characters used for terminal injection or line overwrite attempts.
  • Keep the existing benign passthrough assertion so the tests guard against over-sanitizing.

Fixes #212

Testing

  • cargo test sanitize
  • cargo clippy --all-targets --all-features -- -D warnings
  • cargo build --all-targets
  • cargo test

AI assistance: This PR was prepared with OpenAI Codex.

@leemeo3 leemeo3 marked this pull request as ready for review June 30, 2026 09:13
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.

Add tests for msg.rs sanitize_display (terminal-injection defense)

1 participant