webhook-security

Verify HMAC-SHA256 signatures and validate webhook payloads.

Updated Jan 30, 2026
One-click install
npx skills add https://github.com/jrmatherly/metorial-workspace --skill webhook-security
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: webhook-security
Source: https://github.com/jrmatherly/metorial-workspace/tree/main/.github/skills/webhook-security
Command: npx skills add https://github.com/jrmatherly/metorial-workspace --skill webhook-security

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a production-ready approach to receiving and validating external webhook payloads, preventing replay attacks and ensuring authenticated delivery.

Core Features & Use Cases

  • Signature verification using HMAC-SHA256 to authenticate messages.
  • Timestamp validation to thwart replay attacks.
  • Idempotency checks to avoid duplicate processing across Stripe, GitHub, Twilio, or custom webhooks.
  • Raw body handling to preserve signature integrity across languages (TypeScript/JavaScript and Python).

Quick Start

Configure your webhook endpoint to use the verifier, idempotency handler, and an eventIdExtractor to deduplicate events. For example, wire a POST /webhooks/your-service route to verify the signature, check for duplicates, parse the payload, and process the event in your business logic.

Frequently Asked Questions about webhook-security

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I verify webhook signatures using HMAC-SHA256 in my backend?

Webhook signature verification using HMAC-SHA256 authenticates incoming messages by validating a cryptographic hash against the raw request body. This Skill automates that verification process for TypeScript/JavaScript and Python backends to ensure payloads are from trusted sources.

What's the best way to prevent replay attacks when receiving webhooks from payment providers?

Preventing replay attacks requires validating timestamps embedded in webhook payloads to ensure they are within an acceptable time window. This Skill applies timestamp checks alongside signature verification to thwart delayed malicious request submissions.

How do I handle idempotency for duplicate Stripe or GitHub webhook deliveries?

Handling idempotency for duplicate webhook deliveries involves extracting event IDs and checking them against previously processed records. This Skill provides an eventIdExtractor and idempotency handler to deduplicate events from Stripe, GitHub, and Twilio.

Why does webhook signature verification fail when parsing JSON bodies in Python or JavaScript?

Webhook signature verification fails when JSON parsing alters the payload structure before hashing. This Skill ensures raw body handling to preserve signature integrity across TypeScript/JavaScript and Python backends.

Can I use this webhook security approach for custom services and not just standard providers?

Yes, this webhook security approach applies to custom services alongside standard providers like payment and version-control tools. It supports configurable verifiers and event extractors to authenticate and process diverse webhook payloads.

Do I need to configure safe response semantics after processing a webhook event?

Configuring safe response semantics is necessary to confirm successful webhook receipt and prevent automatic retries. This Skill satisfies safe response requirements after verifying signatures, checking idempotency, and processing the event.