MCPcopy Create free account
hub / github.com/AI45Lab/Code / test_safe_tool_patterns_allowed

Function test_safe_tool_patterns_allowed

core/src/skills/validator.rs:327–339  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

validatorFunction · 0.85
make_skillFunction · 0.85

Tested by

no test coverage detected