A customer has paid, but your subscription service times out before confirming receipt of the event. The provider sends it again. Your receiver must recover without granting the entitlement twice. A security review that tests only a fake signature misses the equally important question of what your product does with an authentic repeat.
Ask three separate questions about every delivery
First, does the message pass the provider’s authentication scheme? Second, is it acceptable under that scheme’s freshness rules? Third, has this business change already happened? Those decisions belong in the design before anyone chooses a deduplication database or a response code.
Use an invented subscription example throughout the review: a confirmed payment grants thirty days of access to one test workspace. The acceptance criterion is one entitlement change, even if the delivery arrives twice or two workers see it together. A rejected delivery must leave that workspace unchanged.
Treat this as an evergreen engineering priority. Current provider documentation describes different delivery contracts; there is no single webhook freshness rule that can be copied safely across every integration. A buyer should expect the assessment to name the sender, receiver version and business action it actually covered.
Verify the message the provider actually signed
GitHub documents an HMAC-SHA256 signature over the payload, delivered in X-Hub-Signature-256, and recommends a constant-time comparison. Validate before processing the delivery. GitHub signature verification.
Ask the engineer to point to the exact verification boundary. Which request bytes reach it? Does a middleware layer parse and reconstruct the body first? Which endpoint secret is selected? A successful test should include a normal delivery, a changed body, a missing signature and a wrong secret. Keep these fixtures in a test environment with disposable signing credentials.
Check the route all the way through the deployed proxy and framework. If a development fixture passes but the deployed route transforms its input differently, the test did not establish production-equivalent verification. Include a signed payload containing non-ASCII text so ordinary customer content is represented.
Use the sender’s actual replay contract
Stripe signs a delivery timestamp with the payload. Its libraries apply a default five-minute tolerance, and retries receive a new signature and timestamp. That makes the age of the signed delivery attempt different from the age of the underlying event. Stripe replay protection.
Do not reject a genuine Stripe retry solely because the event itself was created earlier. Equally, do not assume every provider signs a timestamp. OWASP notes that GitHub’s body-only signature does not authenticate X-GitHub-Delivery or a delivery timestamp. That header can identify ordinary redeliveries, but is not a cryptographically authenticated replay defense. OWASP provider-specific caveat.
For our subscription fixture, record the event identifier, delivery metadata and resulting entitlement separately. Ask what happens if metadata is absent or inconsistent. The receiver should apply its documented provider contract rather than quietly disabling verification when a request looks unusual.
A duplicate may deserve success without another effect
GitHub documents that an ordinary redelivery retains the same X-GitHub-Delivery value. Its redelivery documentation also states that GitHub does not automatically redeliver failed deliveries. These details affect recovery procedures; they should not be guessed from another provider’s behavior. GitHub delivery identifier, GitHub redelivery behavior.
In the invented subscription service, store a durable processing state for each relevant event and business operation. Two workers should not both decide that an entitlement is absent and grant it independently. Review the transaction or equivalent coordination around that decision, including the boundary between the event store and the entitlement store.
Do not label an event completed before its durable work exists. If the process crashes after recording “seen” but before granting access, a blanket skip-on-repeat rule can strand a paying customer. Distinguish pending, completed and recoverable failure states, and test worker recovery rather than relying only on the receiver’s response.
OWASP recommends acknowledging an authenticated duplicate already durably queued or processed without repeating its effects. OWASP duplicate handling. Retention and recovery choices must account for your provider’s supported retry paths and your product’s own reconciliation process.
One authentic event. One intended business change.
A subscription fixture separates delivery checks from durable processing.
Authenticate
Verify the original signed message using the correct endpoint secret.
Check the contract
Apply supported freshness and delivery semantics.
Accept durably
Record recoverable work and coordinate duplicate workers.
Verify the effect
Confirm one entitlement change and safe legitimate retries.
Test forged deliveries and recovery behavior together; a valid signature alone does not make processing idempotent.
Ask the assessment to prove these outcomes
| Controlled test | Expected subscription outcome | Evidence |
|---|---|---|
| Alter a signed payload | No entitlement change | Verification failure and unchanged record |
| Remove authentication | No job accepted as trusted | Receiver result and queue inspection |
| Deliver a valid event twice | One entitlement change | Both receipts, one completed operation |
| Deliver concurrently | One entitlement change | Worker outcomes and stored state |
| Crash after durable acceptance | Work resumes without duplication | Recovery log and final entitlement |
| Replay outside supported freshness | Provider-specific rejection | Signed timing evidence and no effect |
| Retry after a temporary outage | Legitimate work completes once | Provider receipt and recovered state |
Add a distinct event concerning the same workspace. A deduplication key that is too broad can suppress a legitimate later renewal. Also exercise a late event after cancellation: the product owner must define whether to reconcile against current account state, queue a review or perform another documented action.
Keep the original allowed workflow in every retest. The aim is not merely to make an invalid request fail; it is to make the receiver deliver the intended customer outcome under realistic failures. Our guide to validating security findings covers evidence that engineers can act on.
Buy coverage of the receiver and its business effects
Ask whether the proposed review reaches signature handling, queue acceptance, worker behavior and the final stored change. An endpoint-only result may leave the most important duplicate-processing bug outside scope. Request explicit limitations when third-party delivery tools or test environments cannot reproduce a condition.
During Sectiv onboarding, your provider contract and acceptance rules help define the receiver checks worth running. Our software brings together web, API and source testing, AI validation and expert configuration and support. Book a demo to discuss the workflow and the evidence your engineers need.
Common questions
Does a valid signature prevent all replay attacks?
No. A captured valid message may still validate. Use the sender’s documented freshness protections where available, and design business effects to tolerate repeated authenticated deliveries. Do not invent a timestamp check the provider does not support.
Should a duplicate return an error?
An authenticated delivery already durably accepted can usually be acknowledged under the provider’s contract without repeating work. A failure before durable acceptance needs a recoverable path. Record that distinction in the handler’s design and tests.
Is an event ID enough for idempotency?
It helps identify repeated delivery of the same event, but the business operation also matters. Separate legitimate renewal events from repeats, and prevent concurrent workers from committing the same entitlement change twice.
YOUR NEXT STEP
Make retries safe for your customers.
Reviewing a webhook receiver? Bring the sender’s contract and the business effect that must happen exactly as intended.
Book a demo