services/guardrails/sanitizers
Command sanitization — ANSI stripping, whitespace normalization, shell wrappers. Pure module: zero dependencies on other guardrails modules.
Values
pub fn normalize(cmd: String) -> String
Sanitization pipeline: ANSI stripping, Unicode normalization, NUL removal, whitespace collapsing, and shell wrapper expansion.
pub fn strip_ansi(cmd: String) -> String
Strip ANSI escape sequences including color codes, OSC, DCS, and 8-bit C1 controls. Attackers can hide commands inside these to bypass guardrails.