fix: Improve and standardize webhook URL validation#2672
Conversation
🦋 Changeset detectedLatest commit: e6de996 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🔴 Tier 4 — CriticalTouches auth, data models, config, tasks, OTel pipeline, ClickHouse, or CI/CD. Why this tier:
Review process: Deep review from a domain expert. Synchronous walkthrough may be required. Stats
|
Greptile SummaryThis PR standardizes webhook URL validation for webhook writes, tests, and alert delivery. The main changes are:
Confidence Score: 5/5This looks safe to merge.
Important Files Changed
Reviews (9): Last reviewed commit: "Merge branch 'main' into drew/improve-we..." | Re-trigger Greptile |
E2E Test Results✅ All tests passed • 241 passed • 1 skipped • 1009s
Tests ran across 4 shards in parallel. |
Deep Review✅ No critical issues found. The extraction is sound: 🟡 P2 — recommended
🔵 P3 nitpicks (5)
Reviewers (3 returned): maintainability, reliability, learnings-researcher. Correctness, security, adversarial, api-contract, testing, kieran-typescript, project-standards, and agent-native reviewers were dispatched but had not returned when output was required; the orchestrator independently verified those dimensions against the diff, both router schemas, the alert-task error path, and the test files. Testing gaps:
|
3432cd0 to
83202fb
Compare
83202fb to
524674b
Compare
524674b to
8e1930f
Compare
8e1930f to
1ec37c9
Compare
1ec37c9 to
cda9df2
Compare
cda9df2 to
88fdc55
Compare
Wonder how strict we want to be here.
Not sure of the broad use case. But what do you think about an env var override/check for this? Something like |
This is not true, since we pass
|
Great idea! |
fe3f41f to
2e5406c
Compare
jordan-simonovski
left a comment
There was a problem hiding this comment.
No notes. LGTM.

Summary
This PR:
localhostand*.localhostThis is part of an effort to defend against SSRF. This does not protect against DNS rebinding nor exhaustively enumerate every possible bad hostname.
Screenshots or video
Submitting an invalid webhook:
How to test on Vercel preview
This can be tested locally by creating and updating webhooks via the UI or API, and by executing alerts against those webhooks.
References