Interface InjectionDetector

  • All Known Implementing Classes:
    CompositeDetector, RegexDetector, TypoglycemiaDetector

    public interface InjectionDetector
    Strategy interface for prompt-injection detection.

    Implementations must be thread-safe: a single detector instance is shared across all concurrent requests.

    Known implementations:

    • Method Detail

      • scan

        DetectionResult scan​(String prompt)
        Scan prompt for injection signals.
        Parameters:
        prompt - the normalized prompt text extracted from the LLM request body
        Returns:
        a DetectionResult; never null
      • destroy

        default void destroy()