Expand description
Built-in injection-pattern list for paste-content detection.
Six pattern groups:
- Role hijack / instruction override (
p001–p008) — conservative. These phrases appear in benign discussion of LLM behavior, so the bias is to only match the explicit override form. - Instruction separators / role tokens (
p009–p015) — the[INST]/<|system|>family. - System-prompt labels (
p016–p020). - Prompt reveal / persona shift (
p021–p025). - Credential exfiltration intent (
p026–p051) — aggressive. Phrases like “show me your api key” have near-zero false-positive rate in normal conversation. - Sensitive file enumeration (
p052–p070) — aggressive. - Network exfiltration channels (
p071–p076) — aggressive. - Jailbreak triggers (
p077–p088) — aggressive.
Constants§
- PATTERNS
- Pairs of
(pattern_id, needle)consumed bycrate::paste::detector::scan. Order matters for id stability: matched ids are stable across versions to support downstream tooling.
Functions§
- ids
- Pattern ids in the same order as
PATTERNS. Used by the detector to look up the id for a matched needle by its Aho-Corasickpattern_id. - needles
- Needles in the same order as
PATTERNS. Fed verbatim into the Aho-Corasick builder incrate::paste::detector.