Skip to main content

webhook-security

Enhances webhook security by verifying signatures, preventing replay attacks, and ensuring reliable processing for various providers.

Install this skill

or
9/100

Security score

The webhook-security skill was audited on Mar 7, 2026 and we found 31 security issues across 3 threat categories. Review the findings below before installing.

Categories Tested

Security Issues

medium line 108

Template literal with variable interpolation in command context

SourceSKILL.md
108const isNew = await redis.set(`webhook:${eventId}`, '1', 'NX', 'EX', 172800)
medium line 111

Template literal with variable interpolation in command context

SourceSKILL.md
111console.log(`Duplicate webhook ${eventId}, skipping`)
medium line 120

Template literal with variable interpolation in command context

SourceSKILL.md
120await redis.del(`webhook:${eventId}`)
medium line 2

Webhook reference - potential data exfiltration

SourceSKILL.md
2name: webhook-security
medium line 4

Webhook reference - potential data exfiltration

SourceSKILL.md
4Secure webhook endpoints. Use when a user asks to verify webhook signatures,
medium line 5

Webhook reference - potential data exfiltration

SourceSKILL.md
5prevent replay attacks, handle webhook retries, or implement secure webhook
medium line 14

Webhook reference - potential data exfiltration

SourceSKILL.md
14- webhooks
medium line 21

Webhook reference - potential data exfiltration

SourceSKILL.md
21# Webhook Security
medium line 25

Webhook reference - potential data exfiltration

SourceSKILL.md
25Webhooks deliver real-time data to your app, but an open endpoint is an attack surface. Without verification, anyone can POST fake events to your webhook URL. This skill covers signature verification,
medium line 31

Webhook reference - potential data exfiltration

SourceSKILL.md
31Every major provider signs webhook payloads with HMAC. Verify before processing.
low line 34

Webhook reference - potential data exfiltration

SourceSKILL.md
34// lib/webhooks/verify.ts — Generic HMAC verification
medium line 56

Webhook reference - potential data exfiltration

SourceSKILL.md
56### Step 2: Stripe Webhook Verification
low line 59

Webhook reference - potential data exfiltration

SourceSKILL.md
59// routes/webhooks/stripe.ts — Stripe webhook handler
low line 64

Webhook reference - potential data exfiltration

SourceSKILL.md
64export async function handleStripeWebhook(req: Request) {
low line 70

Webhook reference - potential data exfiltration

SourceSKILL.md
70event = stripe.webhooks.constructEvent(
low line 73

Webhook reference - potential data exfiltration

SourceSKILL.md
73process.env.STRIPE_WEBHOOK_SECRET!
low line 76

Webhook reference - potential data exfiltration

SourceSKILL.md
76console.error('Webhook signature verification failed:', err.message)
low line 100

Webhook reference - potential data exfiltration

SourceSKILL.md
100// lib/webhooks/idempotency.ts — Prevent duplicate processing
low line 108

Webhook reference - potential data exfiltration

SourceSKILL.md
108const isNew = await redis.set(`webhook:${eventId}`, '1', 'NX', 'EX', 172800)
low line 111

Webhook reference - potential data exfiltration

SourceSKILL.md
111console.log(`Duplicate webhook ${eventId}, skipping`)
low line 120

Webhook reference - potential data exfiltration

SourceSKILL.md
120await redis.del(`webhook:${eventId}`)
medium line 131

Webhook reference - potential data exfiltration

SourceSKILL.md
131### Step 4: GitHub Webhook Verification
low line 134

Webhook reference - potential data exfiltration

SourceSKILL.md
134// routes/webhooks/github.ts — GitHub webhook handler
low line 146

Webhook reference - potential data exfiltration

SourceSKILL.md
146export async function handleGitHubWebhook(req: Request) {
low line 150

Webhook reference - potential data exfiltration

SourceSKILL.md
150if (!verifyGitHubSignature(body, sig, process.env.GITHUB_WEBHOOK_SECRET!)) {
medium line 172

Webhook reference - potential data exfiltration

SourceSKILL.md
172- ALWAYS verify signatures before processing. Never trust unverified webhooks.
medium line 175

Webhook reference - potential data exfiltration

SourceSKILL.md
175- Implement idempotency — webhooks are at-least-once delivery; you WILL receive duplicates.
medium line 177

Webhook reference - potential data exfiltration

SourceSKILL.md
177- Store webhook event IDs for 24-48h to detect replays.
low line 62

Access to .env file

SourceSKILL.md
62const stripe = new Stripe(process.env.STRIPE_SECRET_KEY!)
low line 73

Access to .env file

SourceSKILL.md
73process.env.STRIPE_WEBHOOK_SECRET!
low line 150

Access to .env file

SourceSKILL.md
150if (!verifyGitHubSignature(body, sig, process.env.GITHUB_WEBHOOK_SECRET!)) {
Scanned on Mar 7, 2026
View Security Dashboard