()
| 325 | |
| 326 | #[test] |
| 327 | fn test_safe_tool_patterns_allowed() { |
| 328 | let v = validator(); |
| 329 | let safe = &["read(*), grep(*)", "Bash(gh issue:*)", "Bash(cargo test:*)"]; |
| 330 | for pattern in safe { |
| 331 | let mut skill = make_skill("safe-skill", "content"); |
| 332 | skill.allowed_tools = Some(pattern.to_string()); |
| 333 | assert!( |
| 334 | v.validate(&skill).is_ok(), |
| 335 | "Expected '{}' to be allowed", |
| 336 | pattern |
| 337 | ); |
| 338 | } |
| 339 | } |
| 340 | |
| 341 | // --- Prompt injection --- |
| 342 |
nothing calls this directly
no test coverage detected