webhook-integration
Enables secure webhook systems for real-time integrations, ensuring reliable event-driven communication between services.
Install this skill
Security score
The webhook-integration skill was audited on Feb 12, 2026 and we found 115 security issues across 4 threat categories. Review the findings below before installing.
Categories Tested
Security Issues
Template literal with variable interpolation in command context
| 98 | throw new Error(`Event type ${event.type} not subscribed`); |
Template literal with variable interpolation in command context
| 132 | `Webhook delivered successfully to ${endpoint.url} (attempt ${attempt + 1})` |
Template literal with variable interpolation in command context
| 148 | `Webhook delivery failed to ${endpoint.url} (attempt ${attempt + 1}):`, |
Template literal with variable interpolation in command context
| 160 | `Webhook delivery failed after ${this.maxRetries} attempts` |
Template literal with variable interpolation in command context
| 179 | console.error(`Failed to deliver to ${endpoint.url}:`, error); |
Template literal with variable interpolation in command context
| 371 | console.log(`Unknown event type: ${type}`); |
Template literal with variable interpolation in command context
| 428 | job.log(`Delivering webhook to ${endpoint.url}`); |
Template literal with variable interpolation in command context
| 443 | console.log(`Webhook delivered: ${job.id}`, result); |
Template literal with variable interpolation in command context
| 447 | console.error(`Webhook delivery failed: ${job?.id}`, err); |
Template literal with variable interpolation in command context
| 451 | console.warn(`Webhook delivery stalled: ${job.id}`); |
Template literal with variable interpolation in command context
| 464 | jobId: `${event.id}-${endpoint.url}`, |
Template literal with variable interpolation in command context
| 478 | jobId: `${event.id}-${endpoint.url}` |
Template literal with variable interpolation in command context
| 600 | console.log(`Webhook test server running on port ${port}`); |
Webhook reference - potential data exfiltration
| 2 | name: webhook-integration |
Webhook reference - potential data exfiltration
| 3 | description: Implement secure webhook systems for event-driven integrations, including signature verification, retry logic, and delivery guarantees. Use when building third-party integrations, event n |
Webhook reference - potential data exfiltration
| 6 | # Webhook Integration |
Webhook reference - potential data exfiltration
| 10 | Implement robust webhook systems for event-driven architectures, enabling real-time communication between services and third-party integrations. |
Webhook reference - potential data exfiltration
| 23 | ## Webhook Architecture |
Webhook reference - potential data exfiltration
| 27 | │ Event │────────▶│ Webhook │────────▶│ Consumer │ |
Webhook reference - potential data exfiltration
| 40 | ### 1. **Webhook Sender (TypeScript)** |
Webhook reference - potential data exfiltration
| 46 | interface WebhookEvent { |
Webhook reference - potential data exfiltration
| 53 | interface WebhookEndpoint { |
Webhook reference - potential data exfiltration
| 68 | class WebhookSender { |
Webhook reference - potential data exfiltration
| 74 | * Generate HMAC signature for webhook payload |
Webhook reference - potential data exfiltration
| 87 | * Send webhook to endpoint |
Webhook reference - potential data exfiltration
| 90 | endpoint: WebhookEndpoint, |
Webhook reference - potential data exfiltration
| 91 | event: WebhookEvent |
Webhook reference - potential data exfiltration
| 113 | 'X-Webhook-Signature': signature, |
Webhook reference - potential data exfiltration
| 114 | 'X-Webhook-ID': event.id, |
Webhook reference - potential data exfiltration
| 115 | 'X-Webhook-Timestamp': event.timestamp.toString(), |
Webhook reference - potential data exfiltration
| 116 | 'User-Agent': 'WebhookService/1.0' |
Webhook reference - potential data exfiltration
| 132 | `Webhook delivered successfully to ${endpoint.url} (attempt ${attempt + 1})` |
Webhook reference - potential data exfiltration
| 148 | `Webhook delivery failed to ${endpoint.url} (attempt ${attempt + 1}):`, |
Webhook reference - potential data exfiltration
| 160 | `Webhook delivery failed after ${this.maxRetries} attempts` |
Webhook reference - potential data exfiltration
| 165 | * Batch send webhooks |
Webhook reference - potential data exfiltration
| 168 | endpoints: WebhookEndpoint[], |
Webhook reference - potential data exfiltration
| 169 | event: WebhookEvent |
Webhook reference - potential data exfiltration
| 193 | const sender = new WebhookSender(); |
Webhook reference - potential data exfiltration
| 195 | const endpoint: WebhookEndpoint = { |
Webhook reference - potential data exfiltration
| 196 | url: 'https://api.example.com/webhooks', |
Webhook reference - potential data exfiltration
| 197 | secret: 'your-webhook-secret', |
Webhook reference - potential data exfiltration
| 202 | const event: WebhookEvent = { |
Webhook reference - potential data exfiltration
| 215 | ### 2. **Webhook Receiver (Express)** |
Webhook reference - potential data exfiltration
| 222 | interface WebhookConfig { |
Webhook reference - potential data exfiltration
| 228 | class WebhookReceiver { |
Webhook reference - potential data exfiltration
| 229 | constructor(private config: WebhookConfig) {} |
Webhook reference - potential data exfiltration
| 232 | * Verify webhook signature |
Webhook reference - potential data exfiltration
| 260 | * Middleware for webhook verification |
Webhook reference - potential data exfiltration
| 271 | req.headers['x-webhook-timestamp'] as string |
Webhook reference - potential data exfiltration
| 299 | console.error('Webhook verification error:', error); |
Webhook reference - potential data exfiltration
| 318 | const receiver = new WebhookReceiver({ |
Webhook reference - potential data exfiltration
| 319 | secret: process.env.WEBHOOK_SECRET!, |
Webhook reference - potential data exfiltration
| 320 | signatureHeader: 'x-webhook-signature', |
Webhook reference - potential data exfiltration
| 324 | // Webhook endpoint |
Webhook reference - potential data exfiltration
| 325 | app.post('/webhooks', |
Webhook reference - potential data exfiltration
| 342 | // Process webhook event |
Webhook reference - potential data exfiltration
| 343 | await processWebhookEvent(type, data); |
Webhook reference - potential data exfiltration
| 354 | console.error('Webhook processing error:', error); |
Webhook reference - potential data exfiltration
| 362 | async function processWebhookEvent(type: string, data: any): Promise<void> { |
Webhook reference - potential data exfiltration
| 388 | console.log('Webhook receiver listening on port 3000'); |
Webhook reference - potential data exfiltration
| 392 | ### 3. **Webhook Queue with Bull** |
Webhook reference - potential data exfiltration
| 398 | interface WebhookJob { |
Webhook reference - potential data exfiltration
| 399 | endpoint: WebhookEndpoint; |
Webhook reference - potential data exfiltration
| 400 | event: WebhookEvent; |
Webhook reference - potential data exfiltration
| 403 | class WebhookQueue { |
Webhook reference - potential data exfiltration
| 404 | private queue: Queue.Queue<WebhookJob>; |
Webhook reference - potential data exfiltration
| 407 | this.queue = new Queue('webhooks', redisUrl, { |
Webhook reference - potential data exfiltration
| 424 | // Process webhook deliveries |
Webhook reference - potential data exfiltration
| 428 | job.log(`Delivering webhook to ${endpoint.url}`); |
Webhook reference - potential data exfiltration
| 430 | const sender = new WebhookSender(); |
Webhook reference - potential data exfiltration
| 443 | console.log(`Webhook delivered: ${job.id}`, result); |
Webhook reference - potential data exfiltration
| 447 | console.error(`Webhook delivery failed: ${job?.id}`, err); |
Webhook reference - potential data exfiltration
| 451 | console.warn(`Webhook delivery stalled: ${job.id}`); |
Webhook reference - potential data exfiltration
| 456 | endpoint: WebhookEndpoint, |
Webhook reference - potential data exfiltration
| 457 | event: WebhookEvent, |
Webhook reference - potential data exfiltration
| 459 | ): Promise<Queue.Job<WebhookJob>> { |
Webhook reference - potential data exfiltration
| 471 | endpoints: WebhookEndpoint[], |
Webhook reference - potential data exfiltration
| 472 | event: WebhookEvent |
Webhook reference - potential data exfiltration
| 473 | ): Promise<Queue.Job<WebhookJob>[]> { |
Webhook reference - potential data exfiltration
| 523 | const webhookQueue = new WebhookQueue('redis://localhost:6379'); |
Webhook reference - potential data exfiltration
| 525 | // Enqueue single webhook |
Webhook reference - potential data exfiltration
| 526 | await webhookQueue.enqueue(endpoint, event, { |
Webhook reference - potential data exfiltration
| 532 | await webhookQueue.enqueueBatch(endpoints, event); |
Webhook reference - potential data exfiltration
| 535 | const status = await webhookQueue.getJobStatus('job-id'); |
Webhook reference - potential data exfiltration
| 539 | ### 4. **Webhook Testing Utilities** |
Webhook reference - potential data exfiltration
| 545 | class WebhookTester { |
Webhook reference - potential data exfiltration
| 547 | private receivedEvents: WebhookEvent[] = []; |
Webhook reference - potential data exfiltration
| 557 | this.app.post('/test-webhook', (req, res) => { |
Webhook reference - potential data exfiltration
| 561 | const signature = req.headers['x-webhook-signature'] as string; |
Webhook reference - potential data exfiltration
| 569 | console.log('Received webhook:', event); |
Webhook reference - potential data exfiltration
| 579 | this.app.post('/test-webhook/fail', (req, res) => { |
Webhook reference - potential data exfiltration
| 600 | console.log(`Webhook test server running on port ${port}`); |
Webhook reference - potential data exfiltration
| 604 | getReceivedEvents(): WebhookEvent[] { |
Webhook reference - potential data exfiltration
| 613 | * Create mock webhook event |
Webhook reference - potential data exfiltration
| 615 | static createMockEvent(type: string, data: any): WebhookEvent { |
Webhook reference - potential data exfiltration
| 626 | const tester = new WebhookTester(); |
Webhook reference - potential data exfiltration
| 629 | // Send test webhook |
Webhook reference - potential data exfiltration
| 630 | const mockEvent = WebhookTester.createMockEvent('user.created', { |
Webhook reference - potential data exfiltration
| 635 | const sender = new WebhookSender(); |
Webhook reference - potential data exfiltration
| 638 | url: 'http://localhost:3001/test-webhook', |
Webhook reference - potential data exfiltration
| 661 | - Provide webhook testing tools |
Webhook reference - potential data exfiltration
| 662 | - Document webhook payload schemas |
Webhook reference - potential data exfiltration
| 663 | - Implement webhook management UI |
Webhook reference - potential data exfiltration
| 665 | - Support webhook versioning |
Webhook reference - potential data exfiltration
| 668 | - Send sensitive data in webhooks |
Webhook reference - potential data exfiltration
| 673 | - Send webhooks to localhost (in production) |
Webhook reference - potential data exfiltration
| 684 | - [ ] Validate webhook URLs |
Webhook reference - potential data exfiltration
| 692 | - [Stripe Webhooks Guide](https://stripe.com/docs/webhooks) |
Webhook reference - potential data exfiltration
| 693 | - [GitHub Webhooks](https://docs.github.com/en/developers/webhooks-and-events/webhooks) |
Webhook reference - potential data exfiltration
| 694 | - [Webhook Best Practices](https://webhooks.fyi/) |
Access to .env file
| 319 | secret: process.env.WEBHOOK_SECRET!, |
External URL reference
| 196 | url: 'https://api.example.com/webhooks', |
External URL reference
| 638 | url: 'http://localhost:3001/test-webhook', |
External URL reference
| 692 | - [Stripe Webhooks Guide](https://stripe.com/docs/webhooks) |
External URL reference
| 694 | - [Webhook Best Practices](https://webhooks.fyi/) |