Code & Engineering

SSRF URL Validation Review for Webhooks

SSRF URL validation review. Reviews code that checks an address supplied by a client (a webhook or callback URL, a "check this site" feature, an import by link) in a service that later calls that address itself, on a Cloudflare Worker or in Node. Finds the checks that look complete and still let a bad address through or break a good one: a host check that strips one trailing dot and so passes two dots, an address with a user name or password that Node 24 fetch refuses at call time although it was accepted and saved, a path prefix check fooled by an encoded slash or a double-encoded dot segment, plus the known rules (empty url.port for a default port, checking only at registration, private and metadata addresses, redirects, DNS rebinding, a test bypass taken from a request header, a block that covers a whole shared domain). Gives the fix in code for each finding and ends a review with VERDICT: OK (nothing must change) or VERDICT: CHANGE. Use when asked to review SSRF protection, webhook URL validation, an allow-list or deny-list of hosts, or a callback address check.

SSRF URL Validation Review for Webhooks is a SKILL.md that SSRF URL validation review; an agent buys it once for $0.03 over x402.

Tested 2026-11-26No code, no hidden instructionsv1.0.0 · 12.7 KB · perpetual license

Not for

Penetration testing, network firewall rules and cloud egress policy. It reads the code that checks a client's address and the call that follows; it does not send anything to a real address. The facts were measured on Node 24 and the WHATWG URL class; other runtimes parse addresses differently.

Tested, honestly

Tested 2026-11-26 with a strong and a weak model.

With and without the skill

Results with and without the skill, for Sonnet and Haiku
SonnetHaiku
withwithoutwithwithout
Setups reviewed right (15 setups)15/1512/1512/1513/15

Same request on both sides; the bare side is scored on the concept in any words, with a fence removed first. Read by hand, Sonnet without the skill already knew the default port, the test header, the shared-domain block, the check at registration only and the dot segments that URL itself collapses. It missed three things in code that looks careful: a second trailing dot, a user name and password in the address, and an encoded dot segment behind a path prefix; each time it answered nothing must change. Haiku without the skill found the trailing dots but missed the credentials and the encoded dot segments. Haiku with the skill found the encoded dot segments and missed the credentials as out of scope, and it over-reported on two sound setups, so on these cases the skill did not help Haiku overall (12 with, 13 without).

Same cases and the same checks with and without the skill. The cases are ours, written around what the skill is for; with a handful of cases, a difference of one or two is within noise.

SonnetStrong model, claude-sonnet-5-5
Right on all 15 setups, read by hand, in two full runs of the final text: it found the second trailing dot in a host list, the user name and password in a saved address that Node 24 fetch refuses at delivery, the encoded and double-encoded dot segments that pass a path prefix check, the default port written as an empty string, the test exception any caller can switch on, the block that covers a whole shared domain and the check that runs only at registration. It answered nothing must change for the seven sound setups, including the encoded slash that a real API needs.
HaikuWeak model, claude-haiku-5-5
Right on 12 of 15 with the skill, but it missed one defect and over-reported on two sound setups: it called the saved user name and password out of scope and answered nothing must change on the credentials setup; on the path-scope setup it reported a hex-case difference in an encoded slash as a false refusal; on the shared-domain setup it asked for a second check at call time that the pasted code did not need. It found the trailing dots, the encoded dot segments, the port, the test header and the shared-domain block.

Full test summary

Example

Our own test text, before and after the skill ran. Excerpts only.

English · claude-sonnet-5-5

Before

Before we ship: customers of our service register a URL, which the service later calls by itself on a schedule. It is a Node 24 service (it calls with the built-in fetch; env.DB is its database handle). Below is the URL check I wrote. Spec: - The service only ever calls https URLs, on the standard port. - It never calls our own hosts: app.example.com, api.example.com and anything under them.…

After

**`[URL-CREDENTIALS]`** `checkUrl`, in `url-check.ts` after the `new URL(raw.trim())` parse `username` and `password` are never looked at. `https://user:pass@customer.example/hook` parses, passes every check, and `url.href` is stored with the credentials in it. Node 24 `fetch` throws a `TypeError` for an address with credentials, so every scheduled call to it fails before any network traffic.…

What is in the file

  • Facts this review rests on
  • What to check, in this order
  • 1. Host normalization and comparison
  • 2. Credentials in the address
  • 3. Path scope
  • 4. The known rules
  • Symptom questions
  • Answer format
  • Not a finding
  • What not to do

Languages

Any language. Tried in: English.

License

Perpetual, non-exclusive; use and modify for yourself incl. paid work; no resale or republishing. Holder: Georgi Kalchev, aiskills402.com. Full terms.

Versions

Current version 1.0.0, updated 2026-11-26. Whoever bought an earlier version gets new ones free through the same re-download token.

  1. v1.0.0 · 2026-11-26

    - Measured on 15 setups, one run per model and setup: Sonnet 15/15 with the skill (two full runs), 12/15 without; Haiku 12/15 with, 13/15 without. Price 30000 micro-USDC ($0.03): a gain of three setups for Sonnet, none for Haiku. - Judging rule added: a fault that only an earlier, already-reviewed step could catch is not reported against the pasted code (a first run reported credentials in a path-scope review whose spec said the address was already checked). - Test case fix: the "sound" path-scope code decoded a path segment by segment and kept a segment whose escape was broken, so an encoded dot segment next to it was never seen — both models rightly flagged it. The code now refuses a broken escape. Cases re-run: clean-path-scope. - Scope of the credentials fact stated: measured on Node 24.16 only, not on Cloudflare Workers. The measuring scripts and their output are in the project notes.

    - Mutation checks on copies of the skill, Sonnet only: with one fact and every mention of it taken out, its planted fault is missed (credentials 1 of 1 runs, trailing dots 2 of 2, encoded path 2 of 2); with all three taken out, 11 of 15. A first, partial removal that left each fact in the description and the symptom list still let Sonnet find two of the three, so that run said nothing.

    - First version: three measured facts (trailing dots beyond the first, credentials in an address with Node 24 fetch, encoded and double-encoded dot segments past a path prefix check) and the known rules as a short list.

FAQ

Node 24 or Workers, which one does this review assume?

The check that a service runs on an address a client gave it (a webhook, a callback, a link to import) before it calls that address itself, in a Cloudflare Worker or in Node. It covers the host comparison, the address parts, the path prefix and the call that follows.

What does it find that a general security review misses?

Three things that sit inside code that looks careful: a trailing-dot rule that removes only one dot, userinfo in a saved address, which Node 24 fetch refuses at call time, and a path prefix check that an encoded slash or a double-encoded dot segment gets past.

Will it reject every encoded slash?

No. Some real APIs carry an encoded slash inside one segment, so the skill decodes the path to a stable form and looks at the segments instead of refusing the character.

Does it help Claude Sonnet?

Sonnet alone handled the default port, the test header, the shared platform domain and the check done only at registration, but it waved through a host with two trailing dots, an address carrying a user name and password, and an encoded dot segment behind a path prefix, answering that nothing must change each time. Fifteen setups: twelve right without the skill, all fifteen with it in two runs. Haiku was level (twelve with, thirteen without), so it is not a reason to buy for Haiku.

Share

Read this page as Markdown: /skills/ssrf-url-validation-review.md.

More in Code & Engineering

  • Windows Background Script Review for Node.js

    Code & Engineering

    SKILL.md · v1.0.1 · 14.3 KB

    Reviews a long-running Node.js script on Windows (a watcher, poller or worker that runs day and night) and the .cmd or .bat file that starts and stops it, for the ways it freezes or dies without a trace. Finds a script that prints to its console window (one click in the window freezes it), a script started in a console window that ends when someone closes it, a lock file that holds only a PID, a state file written without fsync and read back as empty when broken, a .pipe() into gunzip that kills the process when a connection drops, process.exit() after fetch ending in code 127, a parenthesis inside an if block of a .cmd, timeout in a .cmd with no console, and a .cmd saved with LF line endings. Gives the fix in code for each finding and ends a review with VERDICT: OK or VERDICT: CHANGE; a symptom question gets the cause first. Use when asked to review a 24/7 Node script or its start and stop .cmd on Windows, or why such a script stopped, froze, or says it is already running.

    $0.05once

    • x402
    • USDC
    • Base
    Get skill

    Tested with Sonnet and Haiku, 22 Nov 2026

  • Recommended

    OpenNext on Cloudflare Deploy Review

    Code & Engineering

    SKILL.md · v1.0.1 · 13.5 KB

    Reviews the deploy setup of a Next.js app that runs on Cloudflare Workers through OpenNext (@opennextjs/cloudflare): package.json versions and scripts, open-next.config.ts, the wrangler config and the CI deploy job, for what breaks the deploy or the live site while the build stays green. Finds ranges (^) on next and OpenNext instead of pinned versions, a pair that answers 500 on every page with Unexpected loadManifest(/.next/server/preview-props.json), version requirements between OpenNext, next and wrangler that are not met, a buildCommand that skips the checks in npm run build, variables set only in the dashboard, a CI job that runs wrangler deploy without a TTY and touches DNS, and a Durable Object migration that no upload applies. Gives the fix for each finding and ends a review with VERDICT: OK or VERDICT: CHANGE; a symptom question gets the cause first. Use when asked to review an OpenNext deploy setup before a release, or why a Cloudflare deploy was green and the site returns 500 or lost a setting.

    $0.05once

    • x402
    • USDC
    • Base
    Get skill

    Tested with Sonnet and Haiku, 22 Nov 2026

  • Recommended

    Cloudflare Cron Trigger Review: Twice, Late, Never

    Code & Engineering

    SKILL.md · v1.0.1 · 13.3 KB

    Reviews the scheduled() handler of a Cloudflare Worker that dispatches jobs every minute, and its watchdog, for runs that happen twice, at the wrong minute, late or not at all. Finds a Cron Trigger event that arrives twice with the same scheduledTime and no claim before the outward action, a claim keyed from Date.now() instead of scheduledTime, Math.floor on a scheduledTime that arrives about 2 seconds early so everything runs a minute late, a daily job that needs one exact minute to fire, a catch-up that is unbounded or has no claim, a watchdog threshold shorter than the real gaps, and a Durable Object alarm that re-arms after its work or holds it outside waitUntil. Gives the fix in code for each finding and ends a review with VERDICT: OK or VERDICT: CHANGE; a symptom question gets the cause first. Use when asked to review a Cloudflare cron scheduler, or why scheduled jobs ran twice, a minute late or were skipped.

    $0.05once

    • x402
    • USDC
    • Base
    Get skill

    Tested with Sonnet and Haiku, 22 Nov 2026

  • Durable Object Billing Review: Cloudflare Cost

    Code & Engineering

    SKILL.md · v1.0.2 · 11.2 KB

    Reviews Cloudflare Durable Object code, wrangler config and a Durable Objects bill for what costs money. Finds an object kept awake and billed for wall-clock time it does not need (a pending timer, AbortSignal.timeout that is never cleared, even inside a helper, setInterval instead of an alarm, WebSockets that cannot hibernate, work held by waitUntil), objects and SQL storage that pile up because nobody deletes them (an object per visitor or per MCP session, McpAgent probes), and bills that cross the included amount by a few percent and are charged a whole started unit. Explains how the bill is computed: GB-seconds at 128 MB, one allowance for the whole account, rounding up. Gives the fix in code for each finding and ends a review with VERDICT: OK or VERDICT: CHANGE. Use when asked to review Durable Object code or config for cost, or why a Durable Objects bill is higher than the work done.

    $0.05once

    • x402
    • USDC
    • Base
    Get skill

    Tested with Sonnet and Haiku, 22 Nov 2026