Skip to content

Email Worker: Add LLM-based injection classifier #22

@nev-offload

Description

@nev-offload

Description

Use a small/fast LLM to classify emails as safe/suspicious for prompt injection attempts.

Context

This provides a more sophisticated detection layer beyond regex patterns, catching more subtle injection attempts.

Definition of Done

  • Integration with OpenRouter or similar for classification
  • Prompt template for injection detection
  • Confidence score stored with email
  • Fallback to regex-only if LLM unavailable
  • Latency < 500ms for classification

Priority

P2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions