Skip to content

fix(security): sanitize internal state in error messages (TM-INF-016)#919

Merged
chaliy merged 1 commit intomainfrom
fix/issue-909-sanitize-errors
Mar 31, 2026
Merged

fix(security): sanitize internal state in error messages (TM-INF-016)#919
chaliy merged 1 commit intomainfrom
fix/issue-909-sanitize-errors

Conversation

@chaliy
Copy link
Copy Markdown
Contributor

@chaliy chaliy commented Mar 31, 2026

Summary

  • Add sanitize_error_message() function that strips host paths, IPv4/IPv6 addresses, and TLS/SSL details from error messages
  • Network client errors now use Error::network_sanitized() to wrap reqwest errors before exposing to sandbox guests
  • Add Error::io_sanitized() for wrapping std::io errors
  • 5 unit tests verify sanitization of paths, IPs, TLS details, and preservation of safe messages
  • Update threat model: TM-INF-016 marked as FIXED

Test plan

  • cargo test --lib -- sanitize — 5 unit tests pass
  • cargo test --test spec_tests -- bash_spec_tests — all spec tests pass
  • cargo clippy -- -D warnings clean

Closes #909

Add sanitize_error_message() that strips host paths, IPv4/IPv6
addresses, and TLS details from error messages exposed to sandbox
guests. Network client errors now use Error::network_sanitized()
to wrap reqwest errors. Update threat model to mark TM-INF-016 fixed.

Closes #909
@chaliy chaliy merged commit e97a1ff into main Mar 31, 2026
27 checks passed
@chaliy chaliy deleted the fix/issue-909-sanitize-errors branch March 31, 2026 10:34
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.

security(network): sanitize internal state in error messages (TM-INF-016)

1 participant