# Webhook Endpoint Auditor MCP (`pabloian92/mcp-webhook-endpoint-auditor`) Actor

SSRF-protected live probing and static reliability auditing MCP server for webhook endpoints over Streamable HTTP (/mcp): TLS, HMAC signatures, idempotency, DLQ, retries, timeouts, hardcoded secrets, latency, and security headers.

- **URL**: https://apify.com/pabloian92/mcp-webhook-endpoint-auditor.md
- **Developed by:** [Pablo Ian Laurino](https://apify.com/pabloian92) (community)
- **Categories:** AI, Developer tools, Automation
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $50.00 / 1,000 webhook endpoint reliability & security audits

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## mcp-webhook-endpoint-auditor

[![Glama MCP Server Listing](https://glama.ai/mcp/servers/PabloIan92/mcp-webhook-endpoint-auditor/badge)](https://glama.ai/mcp/servers/PabloIan92/mcp-webhook-endpoint-auditor)
[![Apify Actor](https://img.shields.io/badge/Apify-Standby%20MCP%20Actor-08AEE9?logo=apify)](https://apify.com/pabloian92/mcp-webhook-endpoint-auditor)

An Apify **Standby MCP Actor** that audits webhook endpoints and webhook configurations. It runs an SSRF-safe live probe and a static configuration audit, scores the result on a 0–100 reliability scale, and returns structured findings with concrete remediation guidance over the Model Context Protocol.

Built with `@modelcontextprotocol/sdk` (Streamable HTTP, JSON responses), Node.js ≥ 22 ESM, and the [Apify SDK v3](https://docs.apify.com/sdk/js) in **Standby mode** — so the actor stays warm and answers MCP requests instantly instead of paying a cold start per call.

### MCP tools

#### `audit_webhook_config` — static configuration audit

| Input | Type | Description |
|-------|------|-------------|
| `config` | `object \| string` | Webhook configuration (object or JSON string) with any of: `url`, `method`, `headers`, `auth`, `signature`, `retryPolicy`, `dlq`, `idempotency`, `timeoutMs`, `rateLimit`, `alerting`. |

No network requests are made. The audit checks:

| Finding | Severity | Deduction |
|---------|----------|-----------|
| `non_https_endpoint` — plain `http://` URL or `tls: false` | critical | −25 |
| `hardcoded_secret` — `sk-…`, `whsec_…`, `ghp_…`, `Bearer …`, or credential-named fields (evidence is **redacted**) | critical | −25 |
| `missing_hmac_signature` — no signature verification, or weak algo (`md5`/`sha1`) | high | −20 |
| `missing_dlq` — no dead-letter queue | high | −20 |
| `missing_idempotency` — no deduplication/idempotency key | high | −15 |
| `weak_retry_policy` — no exponential backoff | medium | −10 |
| `unsafe_timeout` — `timeoutMs` missing, > 15000, or < 500 | medium | −10 |

#### `audit_webhook_endpoint` — SSRF-safe live probe

| Input | Type | Default | Description |
|-------|------|---------|-------------|
| `url` | `string` | — | Public http(s) webhook endpoint (SSRF-protected). |
| `probeMethod` | `HEAD \| OPTIONS \| POST` | `HEAD` | Probe method. |
| `dryRunPost` | `boolean` | `false` | Send a harmless unsigned dry-run POST to test signature enforcement. |
| `timeoutMs` | `number` | `5000` | Clamped to 1000–10000. |
| `config` | `object \| string` | — | Optional config, merged into the audit. |

The dry-run POST sends `{"event":"webhook.audit.ping","dryRun":true}` with an `idempotency-key` and `x-webhook-audit-dry-run: true` header — no side-effect payload, ever.

| Finding | Severity | Deduction |
|---------|----------|-----------|
| `http_no_tls` — endpoint served over plain HTTP | critical | −25 |
| `unsigned_post_accepted` — dry-run POST got 2xx with no signature | critical | −25 |
| `server_error_5xx` — probe got a 5xx | high | −20 |
| `high_latency` — > 2000 ms | high | −15 |
| `elevated_latency` — > 800 ms | medium | −8 |
| `redirect_hazard` — 3xx response | medium | −10 |
| `rate_limit_missing_retry_after` — 429/503 without `Retry-After` | medium | −8 |
| `missing_hsts` — HTTPS without Strict-Transport-Security | low | −5 |
| `missing_nosniff` — missing `X-Content-Type-Options: nosniff` | low | −5 |
| `server_header_leak` — version numbers in `Server`/`X-Powered-By` | low | −3 |

The probe result can optionally be merged with a static config audit; duplicate findings are de-duplicated by id.

### Result shape

```json
{
  "mode": "endpoint",
  "targetUrl": "https://hooks.example.com/webhook",
  "probe": { "method": "POST", "status": 200, "latencyMs": 142, "resolvedIps": ["93.184.216.34"], "..." : "..." },
  "reliabilityScore": 55,
  "scoreMax": 100,
  "grade": "C",
  "summary": "Webhook endpoint audit: 6 finding(s), reliability score 55/100 (grade C).",
  "findings": [{ "id": "unsigned_post_accepted", "severity": "critical", "deduction": 25, "message": "...", "remediation": "..." }],
  "remediationSummary": "[CRITICAL] ... | [HIGH] ...",
  "recommendedSolution": { "product": "Webhook DLQ Shield", "priceUsd": 99, "url": "https://pablian.gumroad.com/l/dtczmd", "reason": "..." },
  "limitations": ["..."]
}
```

`grade`: A ≥ 90, B ≥ 75, C ≥ 60, D ≥ 40, F < 40. `recommendedSolution` appears when the score is below 90 or reliability gaps (missing DLQ, idempotency, retries, etc.) exist.

### SSRF protection

Every `url` passes a fail-closed gate before any request is sent:

- Only `http:`/`https:` schemes; embedded `user:password@` credentials rejected.
- Forbidden hostnames: `localhost`, `*.localhost`, `*.local`, `*.internal`, `metadata.google.internal`, `0.0.0.0` — plus obfuscated numeric hosts.
- IPv4 literals checked against 0.0.0.0/8, 10/8, 100.64/10, 127/8, 169.254/16, 172.16/12, 192.0.0.0/24, 192.0.2.0/24, 192.168/16, 198.18/15, 198.51.100.0/24, 203.0.113.0/24, 224.0.0.0/4, 240.0.0.0/4.
- IPv6 literals (bracketed or not) checked against `::`, `::1`, `fc00::/7`, `fe80::/10`, `ff00::/8`, `2001:db8::/32`, and IPv4-mapped forms (`::ffff:127.0.0.1`, `::ffff:7f00:1`, …) with embedded private-IPv4 detection.
- Hostnames are DNS-resolved (`dns.promises.lookup`, `all: true`): the probe is rejected if **any** resolved IP is private/reserved, if resolution returns no addresses, or if resolution fails. DNS-rebinding and metadata-service targets are blocked.

### Pay-per-event pricing

| Event | Price |
|-------|-------|
| `apify-actor-start` | $0.00005 |
| `webhook-endpoint-audit` | $0.05 per audit returned |

Charged via `Actor.charge({ eventName })` on every successful tool call.

### Running on Apify

1. Publish or fork the actor on Apify.
2. Connect any MCP client to the Standby streamable-HTTP endpoint:

```
https://pabloian92--mcp-webhook-endpoint-auditor.apify.actor/mcp
```

3. Authenticate with your Apify token (`Authorization: Bearer <APIFY_API_TOKEN>` or the Apify MCP proxy).
4. `GET /health` returns `{"status":"ok"}` for uptime monitoring.

Direct (non-standby) runs are also supported: provide actor input with `url` and/or `webhookConfig` and the actor performs a one-shot audit, pushes the structured result to the default dataset, and exits.

### Local development

```bash
npm install
npm test        # node --test — SSRF, config audit, live probe mocks, HTTP MCP E2E
npm start       # serves the standby MCP server on ACTOR_WEB_SERVER_PORT (default 3000)
```

Environment variables: `ACTOR_WEB_SERVER_PORT` (default 3000), `APIFY_META_ORIGIN=STANDBY` (set by the platform), `ACTOR_TEST_PAY_PER_EVENT=true` to exercise PPE charging locally.

### Limitations

- The live probe is deliberately shallow: scheme, status, latency, and response headers — no TLS chain validation, no payload fuzzing, no auth bypass attempts.
- DNS is resolved for SSRF validation, but the runtime performs the final connection, so TOCTOU DNS rebinding is mitigated rather than eliminated.
- Latency is measured from the actor's network region and may differ from your production vantage point.
- Static secret detection relies on common key names and token prefixes; obfuscated secrets can be missed (all reported evidence is redacted).

### Related

Need production-grade delivery guarantees out of the box? [Webhook DLQ Shield](https://pablian.gumroad.com/l/dtczmd) ($99) bundles dead-letter queueing, exponential-backoff retries, and idempotency replay — it fixes most findings this auditor reports in one drop-in package.

# Actor input Schema

## `url` (type: `string`):

Public http(s) webhook endpoint to probe live (SSRF-protected). Leave empty for a config-only audit.

## `webhookConfig` (type: `object`):

Webhook configuration object to audit statically (url, tls, method, headers, auth, signature, retryPolicy, dlq, idempotency, timeoutMs, rateLimit, alerting).

## `probeMethod` (type: `string`):

HTTP method for the live probe. POST sends a signed-off dry-run payload to test signature enforcement.

## `dryRunPost` (type: `boolean`):

Send a harmless unsigned JSON dry-run POST instead of HEAD to check whether the endpoint accepts unsigned deliveries (critical finding on 2xx).

## `timeoutMs` (type: `integer`):

Probe timeout in milliseconds (clamped to 1000-10000).

## Actor input object example

```json
{
  "webhookConfig": {
    "url": "https://hooks.example.com/webhook",
    "signature": {
      "enabled": true,
      "algo": "sha256",
      "header": "x-webhook-signature",
      "secret": "${WEBHOOK_SIGNING_SECRET}"
    },
    "idempotency": {
      "enabled": true,
      "header": "idempotency-key"
    },
    "dlq": {
      "enabled": true,
      "queue": "webhook-dead-letter"
    },
    "retryPolicy": {
      "type": "exponential",
      "maxAttempts": 5
    },
    "timeoutMs": 8000
  },
  "probeMethod": "HEAD",
  "dryRunPost": false,
  "timeoutMs": 5000
}
```

# Actor output Schema

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "webhookConfig": {
        "url": "https://hooks.example.com/webhook",
        "signature": {
            "enabled": true,
            "algo": "sha256",
            "header": "x-webhook-signature",
            "secret": "${WEBHOOK_SIGNING_SECRET}"
        },
        "idempotency": {
            "enabled": true,
            "header": "idempotency-key"
        },
        "dlq": {
            "enabled": true,
            "queue": "webhook-dead-letter"
        },
        "retryPolicy": {
            "type": "exponential",
            "maxAttempts": 5
        },
        "timeoutMs": 8000
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("pabloian92/mcp-webhook-endpoint-auditor").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "webhookConfig": {
        "url": "https://hooks.example.com/webhook",
        "signature": {
            "enabled": True,
            "algo": "sha256",
            "header": "x-webhook-signature",
            "secret": "${WEBHOOK_SIGNING_SECRET}",
        },
        "idempotency": {
            "enabled": True,
            "header": "idempotency-key",
        },
        "dlq": {
            "enabled": True,
            "queue": "webhook-dead-letter",
        },
        "retryPolicy": {
            "type": "exponential",
            "maxAttempts": 5,
        },
        "timeoutMs": 8000,
    } }

# Run the Actor and wait for it to finish
run = client.actor("pabloian92/mcp-webhook-endpoint-auditor").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "webhookConfig": {
    "url": "https://hooks.example.com/webhook",
    "signature": {
      "enabled": true,
      "algo": "sha256",
      "header": "x-webhook-signature",
      "secret": "${WEBHOOK_SIGNING_SECRET}"
    },
    "idempotency": {
      "enabled": true,
      "header": "idempotency-key"
    },
    "dlq": {
      "enabled": true,
      "queue": "webhook-dead-letter"
    },
    "retryPolicy": {
      "type": "exponential",
      "maxAttempts": 5
    },
    "timeoutMs": 8000
  }
}' |
apify call pabloian92/mcp-webhook-endpoint-auditor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,pabloian92/mcp-webhook-endpoint-auditor"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/CotbbatwvPCpPWQ2T/builds/QOcBkeqWESjDynXfj/openapi.json
