Skip to content
Drainproof
Demo mode. These reports are fixtures generated by running the Drainproof CLI against the bundled example policies. They are not results from your project.

← Run run_317318f3

Reusing an idempotency key for a different payment is rejected: expected BLOCK, observed ALLOW

2026-11-06 20:03 UTC · finding run_317318f3c81340818dff3adc20583c89:idempotency-key-conflict

high

Problem

An idempotency key already bound to a 5 USDC payment cannot be reused for a 6 USDC payment.

Observed behaviour was more permissive than expected; severity is the scenario's declared risk (high).

Remediation

Review the policy and the guard implementation for the rule this scenario exercises, then re-run the scenario.

Expected behaviour

{"decision":"BLOCK","reason_codes":["IDEMPOTENCY_KEY_CONFLICT"],"reason_codes_exact":false,"absent_reason_codes":[]}

Observed behaviour

{"decision":"ALLOW"}

Reproduce

  1. drainproof test --scenario idempotency-key-conflict
  2. Scenario file: ../../packages/cli/templates/scenarios/state-concurrency/idempotency-key-conflict.yaml (step 2 of 2: propose)

Evidence: ../../packages/cli/templates/scenarios/state-concurrency/idempotency-key-conflict.yaml, step 2 · definition sha256:f787a3e41eb3… · policy sha256:8a1b22fbb25b…

Scenario steps

  1. #1proposepassed
    Expected
    {
      "decision": "ALLOW",
      "reason_codes": [],
      "reason_codes_exact": false,
      "absent_reason_codes": []
    }
    Observed
    {
      "decision": "ALLOW",
      "reason_codes": []
    }
  2. #2proposefailedexpected BLOCK, observed ALLOW
    Expected
    {
      "decision": "BLOCK",
      "reason_codes": [
        "IDEMPOTENCY_KEY_CONFLICT"
      ],
      "reason_codes_exact": false,
      "absent_reason_codes": []
    }
    Observed
    {
      "decision": "ALLOW"
    }