pub struct InjectionPatternVerifier { /* private fields */ }Expand description
Verifier that blocks tool arguments containing SQL injection, command injection, or path traversal patterns. Applies to ALL tools using field-aware matching.
§Field-aware matching
Rather than serialising all args to a flat string (which causes false positives), this verifier iterates over each string-valued field and applies pattern categories based on field semantics:
SAFE_QUERY_FIELDS(query,q,search,text, …): injection patterns are skipped — these fields contain user-provided text and generate too many false positives for SQL/command discussions in chat.URL_FIELD_NAMES(url,endpoint,uri, …): SSRF patterns are applied.- All other string fields: injection + path traversal patterns are applied.
§Warn semantics
VerificationResult::Warn is metrics-only — the tool call proceeds, a WARN log
entry is emitted, and the TUI security panel counter increments. The LLM does not
see the warning in its tool result.
Implementations§
Source§impl InjectionPatternVerifier
impl InjectionPatternVerifier
pub fn new(config: &InjectionVerifierConfig) -> Self
Trait Implementations§
Source§impl Debug for InjectionPatternVerifier
impl Debug for InjectionPatternVerifier
Auto Trait Implementations§
impl Freeze for InjectionPatternVerifier
impl RefUnwindSafe for InjectionPatternVerifier
impl Send for InjectionPatternVerifier
impl Sync for InjectionPatternVerifier
impl Unpin for InjectionPatternVerifier
impl UnsafeUnpin for InjectionPatternVerifier
impl UnwindSafe for InjectionPatternVerifier
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more