DVSentry Documentation API referenceOpen the app

GitLab and Bitbucket push webhooks

A push webhook scans a GitLab or Bitbucket repository every time code is pushed to one branch, so a merge starts a scan with no CI step. It is the GitLab and Bitbucket counterpart of the GitHub App push scan. Merge request and pull request checks are not built yet; for those, use CI pipelines.

Works with gitlab.com, Bitbucket Cloud (bitbucket.org) and a self-managed GitLab host your operator allows.

Set it up (Admin)

Quick path: Settings → Repository Automation, choose the repository, then Push webhooks (GitLab, Bitbucket).

  1. Pick the scanners on the Dashboard first (the webhook uses the scanners, coverage, environment and time limit chosen on that page).
  2. Check Branch to watch (your repository's branch, else main).
  3. For a private repository, pick an Access token: a read-only token saved in Organization → Scan credentials with purpose Git access token.
    • GitLab: a project access token (or deploy token) with read_repository.
    • Bitbucket: a repository access token with Repositories: Read. A public repository needs no token.
  4. Choose Create GitLab webhook (or Bitbucket). DVSentry shows the Webhook URL and the Secret once. Copy both now.
  5. Add the webhook on the host:
    • GitLab: project Settings → Webhooks → Add new webhook. Paste the URL, paste the secret into Secret token, tick Push events (optionally limit it to the same branch), keep SSL verification on, Add webhook.
    • Bitbucket: Repository settings → Webhooks → Add webhook. Paste the URL, paste the secret into Secret, choose the Repository push trigger, Save.
  6. Push to the branch (or use the host's Test button with a push event). The push appears under Recent pushes within a few seconds, and the scan starts within about 15 seconds.

What runs

Rotate or revoke

Security

Troubleshooting

What you seeWhat to do
The host says 401The secret does not match: use New secret and paste it again.
Nothing under Recent pushesCheck the host's webhook delivery log; the push must be to the watched branch.
failed · Git access token missing, disabled or expiredSave a new token in Scan credentials, revoke this webhook and create one with the new token.
failed · repository could not be checked outThe token cannot read the repository, or the repository moved.
skipped · Scan not admittedYour plan refused the scan; the reason names the limit.
The panel is missingOnly Admins see it; the operator may have switched push webhooks off.

Something missing or unclear? Tell us with Feedback in the app.