Webhook auth bypass when webhook_secret is None #56

Open
opened 2026-03-30 13:28:02 +00:00 by sharang · 0 comments
Owner

When webhook_secret is None on a repository, the webhook handlers silently skip HMAC/token verification and proceed to trigger a full scan. Any unauthenticated POST to /webhook/{type}/{repo_id} will execute the scan pipeline. Fix: Reject with 401 when webhook_secret is None. Use constant-time comparison for GitLab token. Files: webhooks/github.rs, webhooks/gitlab.rs, webhooks/gitea.rs

When webhook_secret is None on a repository, the webhook handlers silently skip HMAC/token verification and proceed to trigger a full scan. Any unauthenticated POST to /webhook/{type}/{repo_id} will execute the scan pipeline. Fix: Reject with 401 when webhook_secret is None. Use constant-time comparison for GitLab token. Files: webhooks/github.rs, webhooks/gitlab.rs, webhooks/gitea.rs
sharang added the securitybugv0.3.0critical labels 2026-03-30 13:28:02 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sharang/compliance-scanner-agent#56