openhuman icon indicating copy to clipboard operation
openhuman copied to clipboard

Bug: Prompt injection detector high false-positive rate on benign queries

Open Liohtml opened this issue 6 months ago • 0 comments

Summary

src/openhuman/prompt_injection/detector.rs — the exfiltrate.secrets rule adds 0.42 to the score for any mention of "api key" or "token". Combined with has_exfiltration_intent (triggers on "reveal"), a benign query like "Can you reveal how to set my api key?" scores 1.08 and gets blocked.

Impact

Low-Medium — Legitimate user queries get incorrectly blocked. Users asking about API key configuration or token management hit false positives.

Suggested Fix

Make exfiltrate.secrets context-dependent — only score when combined with an override/exfiltration verb AND the target is the system prompt or internal state, not general questions about credentials.

Liohtml avatar May 16 '26 14:05 Liohtml