MCPcopy Index your code
hub / github.com/AI45Lab/Code / test_sanitize_output

Function test_sanitize_output

core/src/security/default.rs:322–330  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

320
321 #[test]
322 fn test_sanitize_output() {
323 let provider = DefaultSecurityProvider::new();
324 let text = "My email is user@example.com and SSN is 123-45-6789";
325 let sanitized = provider.sanitize_output(text);
326 assert!(sanitized.contains("[REDACTED:EMAIL]"));
327 assert!(sanitized.contains("[REDACTED:SSN]"));
328 assert!(!sanitized.contains("user@example.com"));
329 assert!(!sanitized.contains("123-45-6789"));
330 }
331
332 #[test]
333 fn test_detect_injection() {

Callers

nothing calls this directly

Calls 1

sanitize_outputMethod · 0.45

Tested by

no test coverage detected