Agent Armor API Reference
    Preparing search index...

    Class JailbreakPatternDetector

    Detects embedded jailbreak sequences in external content.

    Reference: Evtimov et al. (2025) — WASP benchmark shows prompt injections can partially commandeer agents in up to 86% of scenarios.

    Hierarchy (View Summary)

    Index
    category: TrapCategory = 'behavioural-control'

    Which trap category this detector addresses

    id: "jailbreak-patterns" = 'jailbreak-patterns'

    Unique identifier for this detector

    name: "Jailbreak Pattern Detector" = 'Jailbreak Pattern Detector'

    Human-readable name

    trapType: TrapType = 'embedded-jailbreak'
    • Last chance to alter matched text before it becomes Threat.evidence.

      Evidence travels: into ScanResult, the CLI's JSON/SARIF output, audit records, and whatever the caller logs. For most detectors the matched text IS the finding and must be preserved verbatim. For a detector whose matches are themselves secrets, echoing them would leak the credential into exactly the CI logs and audit trails the scan was meant to protect. Override to redact; the default is identity.

      Sanitization is unaffected — it works from Threat.location, not evidence.

      Parameters

      • match: string

      Returns string