Skip to main content

Module injection

Module injection 

Source
Expand description

Security Prompt Injection Defense

Implements HookHandler for GenerateStart events to detect and block prompt injection attempts in user input.

Structs§

InjectionDetector
Prompt injection detector
ToolOutputInjectionScanner
Scans tool outputs for indirect prompt injection before they enter LLM context. Registered as a PostToolUse hook — logs warnings but does not block (to avoid false positives on legitimate code containing injection-like patterns).