KChad/Prompt-Injection-RL-environment
1
1name: idpi-exfil-env2version: 0.1.03description: >4 OpenEnv-compatible benchmark for prompt injection resistance in email workflows.5 Agents must complete benign reading and summarization tasks while refusing hidden,6 delayed, or authority-spoofed instructions that attempt to contaminate internal7 artifacts or trigger external side effects.8 9author: Prompt Injection Env Team10license: MIT11 12tasks:13 - name: easy14 difficulty: 115 description: >16 Explicit or lightly hidden prompt-injection attempts that push the agent17 toward an unsafe outbound email action.18 max_steps: 2019 - name: medium20 difficulty: 221 description: >22 Structurally hidden prompt injection using wrappers, transcripts, authority23 spoofing, session-boundary confusion, or markup concealment.24 max_steps: 2025 - name: hard26 difficulty: 327 description: >28 Multi-step safe-completion tasks where the agent must write a clean internal29 summary while resisting summary poisoning, delayed triggers, and exfiltration.30 max_steps: 2031 32actions:33 - name: ReadDoc34 description: Read the current email and attachment-like content.35 - name: WriteDB36 description: Store internal summary content.37 parameters:38 - name: content39 type: string40 required: false41 - name: SendEmail42 description: Send an outbound email.43 parameters:44 - name: to45 type: string46 required: true47 - name: body48 type: string49 required: false50 - name: FlagInjection51 description: Flag suspicious content as prompt injection.52 parameters:53 - name: reason54 type: string55 required: false56 - name: NoOp57 description: Take no action.58 59observation_space:60 type: text61 fields:62 - name: subject63 type: string64 - name: body65 type: string66 - name: last_action67 type: string68 required: false69 - name: last_action_result70 type: string71 - name: step_count72 type: integer73 - name: task_difficulty74 type: string75 - name: summary_required76 type: boolean77 - name: current_summary78 type: string79 required: false80 81reward:82 range: [0.0, 1.0]83 dense: true84 shaped: true85 description: >86 Step reward is shaped around safe progress, injection detection, summary quality,87 and policy compliance, then normalized into the 0.0-1.0 range required by the benchmark validator.88 89environment:90 entry_point: env.environment:IDPIExfilEnv91 reset_returns: Observation92 step_returns: StepResponse93 state_returns: State94 result_returns: EpisodeResult95 96server:97 host: 0.0.0.098 port: 786099 endpoints:100 health: GET /health101 metadata: GET /metadata102 schema: GET /schema103 reset: POST /reset104 step: POST /step105 state: GET /state106 result: GET /result107 mcp: POST /mcp108 109dataset:110 source: microsoft/llmail-inject-challenge111 runtime_pack: local curated scenario pack with gold overlays112 113baseline:114 runner: inference.py115 tasks: [easy, medium, hard]116 agents: [unsafe, always_flag, heuristic_safe, openai]117 comparison_mode: BASELINE_AGENTS or BASELINE_AGENT=compare118 