InjectScan benchmark

InjectScan is a rule-based prompt-injection scanner (92 rules, 10 categories, Unicode normalization, decoding of base64/hex/escapes/Unicode tags, hidden-HTML extraction, MCP tool-definition walk). Ruleset 2026.10.1, generated 2026-10-21T21:40:39.613Z by npm run benchmark. Reproduce it from the source: the script downloads every dataset from its public source.

Honest summary (held-out rows only)

"dev" rows were looked at while writing rules and are optimistic. "held-out" rows (highlighted) were not used for tuning. flagged = risk ≥ 0.35, malicious = risk ≥ 0.70. BIPIA was not used (unclear license).

DatasetSplitRoleThresholdnTPFPTNFNPrecisionRecallF1FPR
deepset/prompt-injectionstraindevflagged54612003438310.5910.7430
deepset/prompt-injectionstraindevmalicious54649034315410.2410.3890
deepset/prompt-injectionstestheld-outflagged116160564410.2670.4210
deepset/prompt-injectionstestheld-outmalicious116100565010.1670.2860
jackhhao/jailbreak-classificationtraindevflagged1044407051712010.7720.8720
jackhhao/jailbreak-classificationtraindevmalicious1044271051725610.5140.6790
jackhhao/jailbreak-classificationtestheld-outflagged2621121122270.9910.8060.8890.008
jackhhao/jailbreak-classificationtestheld-outmalicious2628101235810.5830.7360
Lakera/gandalf_ignore_instructionstestheld-outflagged11274003810.6610.796–
Lakera/gandalf_ignore_instructionstestheld-outmalicious11268004410.6070.756–
benign: Wikipedia (300 random)-held-outflagged3000429600––0.013
benign: Wikipedia (300 random)-held-outmalicious300003000–––0
benign: GitHub READMEs (150)-held-outflagged1440813600––0.056
benign: GitHub READMEs (150)-held-outmalicious1440414000––0.028

Datasets: deepset/prompt-injections (Apache-2.0), jackhhao/jailbreak-classification (Apache-2.0), Lakera/gandalf_ignore_instructions (MIT), Wikipedia sample and pinned GitHub READMEs (read at run time, not redistributed).

Usage stats → · Source (MIT) · npm


agentgate-source · Project AgentGate