Problem
apps/api/src/routes/webhooks.ts line 47:
secret: z.string().min(16, 'secret must be at least 16 characters'),
No .max() bound. A caller can register a webhook with a 10 MB secret. Every outbound delivery calls crypto.subtle.importKey on that secret — CPU-intensive in Workers. With enough endpoints this becomes a DoS on delivery throughput.
Fix
Add .max(512) to the secret schema.
Problem
apps/api/src/routes/webhooks.tsline 47:No
.max()bound. A caller can register a webhook with a 10 MB secret. Every outbound delivery callscrypto.subtle.importKeyon that secret — CPU-intensive in Workers. With enough endpoints this becomes a DoS on delivery throughput.Fix
Add
.max(512)to the secret schema.