Skip to content

[codex] add sanitize_display terminal injection tests#243

Merged
Koukyosyumei merged 1 commit into
h5i-dev:mainfrom
leemeo3:codex/add-sanitize-display-tests
Jul 1, 2026
Merged

[codex] add sanitize_display terminal injection tests#243
Koukyosyumei merged 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

@Koukyosyumei Koukyosyumei left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Koukyosyumei Koukyosyumei merged commit 7227912 into h5i-dev:main Jul 1, 2026
5 checks passed
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)

2 participants