Skip to content

[BUG] Signed Bitbucket webhooks are rejected: handler reads X-Hub-Signature-256, Bitbucket sends X-Hub-Signature #94

Closed

Description

@OkiriGabriel

Problem

The Bitbucket handler (api/server.py#L509-L517) verifies X-Hub-Signature-256 or X-Webhook-Signature. Bitbucket Cloud webhooks with a secret send the HMAC in X-Hub-Signature (sha256=<hex>). When WEBHOOK_SECRET is set, genuine Bitbucket deliveries therefore have no signature header the handler reads, and they fail with 401.

The tests send X-Hub-Signature-256, so they don't catch this.

Suggested fix

  • Also read X-Hub-Signature in bitbucket_webhook (and make sure it's sha256=-prefixed before verifying).
  • Add a test with a payload signed the way Bitbucket signs it.
  • Document the Bitbucket webhook secret setup in docs/MULTI_PLATFORM_GUIDE.md.

Activity

  1. added
    bug
    integration
    on Oct 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugintegration

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions