WebhookTagger
Flags inbound webhook / callback endpoints — routes that receive server-to-server notifications from third parties (payment providers, VCS hosts, CI, messaging platforms). They warrant scrutiny for signature verification, replay protection, and source-IP trust, and the handlers often make outbound requests (SSRF surface).
Constants
OAuth / OIDC / SSO authorization-code callbacks (/oauth/callback,
/auth/<provider>/callback) are browser-redirect handlers, not
inbound webhooks — but they share the generic callback path word and
can arrive as a POST, so they were being mis-tagged. When callback
is the only webhook signal and one of these auth segments is present
in the path, suppress it. A genuine payment IPN at /payments/callback
carries no auth segment and still tags.
Weaker path segments shared with non-webhook routes. Require a POST (or other write) method before flagging on these alone.
notification(s) are intentionally excluded: an in-app notifications
resource (POST /api/notifications, DELETE /notifications/{id}) is
far more common than a notification webhook, and it is a write, so
the method gate doesn't help. The verb form notify is kept — it is
the canonical callback term for payment IPNs (notify_url).
Webhooks are delivered as non-GET requests. Gate the weaker path signals on "not a read", which — unlike an explicit POST/PUT/PATCH allow-list — also covers wildcard ("ANY"/"*") and blank methods that several analyzers emit for catch-all routes. The shared safe set (QUERY included per RFC 10008): a QUERY route must not trip the "not a read" write heuristic the way POST does.
Provider-specific signature/event headers. Any one is a strong webhook indicator on its own.
Unambiguous webhook path segments — one is enough.