Skip to content
Sign in

Example run Brindle Coffee › Runs › Run #3

Prove invoice.paid · renewal

Stripe · From sub_1QH…4drI · #01 #03 #04 · localhost:3000/webhooks/stripe

Run by maya-mbp from the web app

A real run against a deliberately buggy handler. Get a URL to prove your own.

3 findings

Critical 1 High 1 Medium 1 Info 1

exit 1

8 scenarios · 16 deliveries · 43.2 s · CI exit 1 (--fail-on high)

State after D11 · orders.count

1 to 2

Expected 1 · got 2

Findings

  1. Level 1 · transport · evidence D12

    What happened

    D12 changed amount_paid from 2400 to 0 and was signed for the original body. Your handler returned 200 in 167 ms and created an order: orders.count 0 → 1, expected a 4xx and no change.

    Why it matters

    Stripe signs the exact bytes it sends. If a failed check doesn't stop the request, anyone who can reach this URL can create paid orders.

    Stripe docs › Webhooks › Verify signatures

    Likely cause: Late (D9) was rejected, so the timestamp check runs; the signature check probably fails into a log line instead of stopping the request.

    Fix

    Return 400 as soon as constructEvent throws, before any write. After the fix, D12 should get 400 and leave orders.count at 0.

    Express (detected from X-Powered-By)

    app.post('/webhooks/stripe', express.raw({ type: 'application/json' }), (req, res) => {
      let event;
      try {
        event = stripe.webhooks.constructEvent(req.body, req.get('stripe-signature'), endpointSecret);
      } catch (err) {
        return res.status(400).send('Invalid signature'); // stop here, don't log and continue
      }
      // ...handle event
    });
  2. Level 2 · judged on maya-mbp · evidence D4 D5 D10 D11

  3. Level 1 · transport · evidence D10 D16

  4. Level 2 · judged on maya-mbp · evidence D6 D15 · Info · not counted

Inspector · D11 · Retry after error · invoice.paid

Close

Request

POST http://localhost:3000/webhooks/stripe

sent +25 191 ms · re-signed (retry, same event id) · 2 294 B

Content-Typeapplication/json; charset=utf-8
User-AgentStripe/1.0 (+https://stripe.com/docs/webhooks)
Stripe-Signaturesigned on maya-mbp · value not stored
Webhooktrap-Runrun_01M75F1M56RSH0CVKCTFX4FQWC
Webhooktrap-DeliveryD11
Webhooktrap-Scenarioretry
Webhooktrap-Dry-Run1

Body: Exact bytes of capture #01

Response

200 · 205 ms

205 ms of the 10 s budget · Webhook Trap default

Content-Typeapplication/json; charset=utf-8
X-Powered-ByExpress
Content-Length17
{"received":true}

Deliveries

Deliveries of this run, grouped by scenario
D+msEventStatusLatency (10 s budget)orders.countResult
Once · 200 × 3 · orders.count 0 → 1
D1+1 320invoice.paid200184 ms0 → 1▬ pass
D2+1 684payment_intent.succeeded200121 ms1 → 1▬ pass
D3+1 985customer.subscription.updated200143 ms1 → 1▬ pass
Twice · 200, 200 · orders.count 1 → 2 on D5, expected 1
D4+3 978invoice.paid200212 ms0 → 1▬ pass
D5+4 720invoice.paid= D4′200196 ms1 → 2 · expected 1 High · F2
Shuffled · reversed · orders.count 0 → 1 · status not probed
D6+6 766customer.subscription.updated200138 ms0 → 0▬ pass
D7+7 084payment_intent.succeeded200117 ms0 → 0▬ pass
D8+7 381invoice.paid200199 ms0 → 1▬ pass
Late · 400 in 41 ms · rejected as expected
D9+9 430invoice.paidt − 360 s40041 ms0 → 0▬ pass (rejected)
Retry after error · D10 11 840 ms → retry D11 → orders.count 1 → 2
D10+11 321invoice.paid20011 840 ms +1 840 over0 → 1 Medium · F3
D11+25 191invoice.paidretry200205 ms1 → 2 · expected 1 High · F2
Tampered · 200 in 167 ms · accepted a changed body
D12+27 246invoice.paidbody changed200167 ms0 → 1 · expected 0 Critical · F1
Burst · 200 × 3 · 312–601 ms · orders.count 0 → 1 (final)
D13+29 263invoice.paid200601 ms—▬ pass
D14+29 265payment_intent.succeeded200312 ms—▬ pass
D15+29 266customer.subscription.updated200448 ms—▬ pass
Slow budget · 10 420 ms · 420 ms over budget
D16+31 714invoice.paid20010 420 ms +420 over0 → 1 Medium · F3