# Webhook Verdict — Verify Webhook Signatures & Catch Replays

> Your webhook handler says "invalid signature" and nothing else. This skill tells you whether each captured delivery is genuine, exactly why the bad ones fail, and which ones are replays that would double-process.

Webhook Verdict — Verify Webhook Signatures & Catch Replays is a paid AI agent skill on Agensi by LINH RATHHENRY, in APIs & Backend. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $19 (one-time purchase)
- Creator: [LINH RATHHENRY](https://www.agensi.io/creators/linh-rathhenry)
- Category: [APIs & Backend](https://www.agensi.io/skills/apis-backend)
- Version: 1.1
- Last updated: 2026-11-26
- Security: scan passed (2026-11-26); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/webhook-verdict-verify-webhook-signatures-catch-replays
- Tags: api, security, testing, python, stripe, webhooks

## About this skill

Every developer who receives webhooks hits the same wall: the provider swears it sent the event, your handler swears the signature is invalid, and the error message gives you nothing to work with. The cause is almost always one of a handful of mistakes — the body was parsed and re-serialized before verification, the signature was computed without the timestamp, the endpoint secret was rotated on one side only — but finding which one means hours of manual HMAC arithmetic.

Webhook Verdict gives your agent a verification step for webhook work. Feed it captured deliveries (the raw bodies and headers you already have) and it produces a one-page Markdown verdict for each one:

- Signature verification for Stripe, GitHub, Shopify, and Slack, plus a custom HMAC scheme you configure — always against the exact raw bytes, with constant-time comparison
- Mismatch diagnosis — for every invalid signature it re-tests the known failure variants (re-serialized JSON, including the JS JSON.stringify style; sorted keys; hex vs base64; timestamp left out of the signed payload; trailing newline; an unusable timestamp header) and names the likely cause
- Replay check — signature timestamps are compared against a configurable tolerance window (default 300 seconds) and stale deliveries are flagged
- Duplicate detection — repeat deliveries are caught per endpoint by event id and by identical body + signature, so a redelivery never double-applies an event; only signature-verified deliveries count as the original
- Secret rotation check — a delivery that verifies only under a previous secret is reported as exactly that, so you know the sender has not picked up the new secret yet
- Setup findings — plain-HTTP endpoints and legacy SHA-1 signatures are flagged, and secrets are masked in every output, never printed in full

The skill includes the exact reaction playbook: process on VALID, re-key on VALID_PREVIOUS_SECRET, reject on STALE and INVALID, skip on DUPLICATE.

What's inside:
- webhook_verdict CLI (pure Python standard library, zero dependencies): verifies a captures file and writes the Markdown report; --json for machine-readable results; exit codes 0/1/2 for CI gating
- --sign mode that builds correctly signed test deliveries, and a --self-test mode with known-answer vectors that proves the verifier itself is correct
- The agent skill (SKILL.md) with the capture, verify, act workflow and the verdict playbook
- A demo with 9 captured deliveries across 5 endpoints — valid, rotated, stale, duplicated, tampered, and mis-signed — with a generated report
- 60 passing pytest tests covering every scheme, verdict, and diagnosis

Who it's for: anyone whose agent (or backend) receives Stripe, GitHub, Shopify, or Slack webhooks — and who is done debugging signature failures by hand.

## Requires

- Python

## Known limitations

Requires the exact raw body string; modified or truncated logs cannot be verified. Does not support asymmetric (RSA/ECDSA) signatures.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the Webhook Verdict — Verify Webhook Signatures & Catch Replays skill from Agensi" and describe your task.
3. Buy it on the listing or let your agent ask you first; your agent then loads it from Agensi when it needs it. Every paid skill has a money-back guarantee: https://www.agensi.io/docs/money-back-guarantee

## Frequently asked questions

### What specific problems does Webhook Verdict solve compared to manual debugging?

Webhook Verdict solves the common 'silent failure' problem where signature verification fails due to hidden issues like re-serialized JSON, trailing newlines, or encoding mix-ups that are impossible to spot manually.

### Which webhook providers and signature schemes are supported out of the box?

The tool supports standard HMAC-SHA256 schemes used by major providers like Stripe, GitHub, Shopify, and Slack, and can be configured for custom HMAC implementations.

### Does this skill require an active internet connection or send my data to a third-party server?

No, this skill is a zero-dependency Python tool designed for offline execution to ensure your sensitive endpoint secrets and raw request bodies never leave your local environment.

### What exactly is included in the purchase of this skill?

You receive the full diagnostic toolset, including the core verification engine, the batch processing command, a self-test utility, and a signature generator for creating test fixtures.

### What are the technical requirements for the 'captures.json' input file?

The skill requires the exact, raw request body as it was received; if your logging middleware has already truncated the data or converted it to a standard object, the HMAC hash will not match.

### Can I use this to audit my system during a secret rotation period?

Yes, the tool features a 'Rotated Secret' mode that allows you to test signatures against both current and legacy secrets to identify which senders haven't updated their configurations yet.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
