pub struct ToolInterceptor { /* private fields */ }Expand description
Tool interceptor that checks tool arguments for sensitive data leakage
Implementations§
Source§impl ToolInterceptor
impl ToolInterceptor
Sourcepub fn new(
config: &SecurityConfig,
taint_registry: Arc<RwLock<TaintRegistry>>,
audit_log: Arc<AuditLog>,
session_id: String,
) -> Self
pub fn new( config: &SecurityConfig, taint_registry: Arc<RwLock<TaintRegistry>>, audit_log: Arc<AuditLog>, session_id: String, ) -> Self
Create a new tool interceptor
Sourcepub fn check(&self, tool: &str, args: &Value) -> InterceptResult
pub fn check(&self, tool: &str, args: &Value) -> InterceptResult
Check a tool invocation for security violations
Trait Implementations§
Source§impl HookHandler for ToolInterceptor
impl HookHandler for ToolInterceptor
Source§fn handle(&self, event: &HookEvent) -> HookResponse
fn handle(&self, event: &HookEvent) -> HookResponse
Handle a hook event
Auto Trait Implementations§
impl Freeze for ToolInterceptor
impl RefUnwindSafe for ToolInterceptor
impl Send for ToolInterceptor
impl Sync for ToolInterceptor
impl Unpin for ToolInterceptor
impl UnsafeUnpin for ToolInterceptor
impl UnwindSafe for ToolInterceptor
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