> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hacktron.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Bitbucket

> Configure repository access for Bitbucket Cloud.

## Prerequisites

The Bitbucket account used to connect Hacktron must:

* Have access to the repository you want Hacktron to review.
* Have Admin permission on each selected repository so Hacktron can create and update repository webhooks.
* Be able to sign in to Bitbucket and approve the OAuth Request.

<Info>
  We recommend using a dedicated Bitbucket account for the Hacktron integration
  instead of an employee's personal account. This keeps repository access and
  automated pull request comments associated with a separate integration
  identity.

  A dedicated account is **optional**; an existing Bitbucket repository
  administrator can also connect to Hacktron.
</Info>

<Warning>
  Bitbucket Cloud does not provide native service or bot accounts. A "dedicated
  Bitbucket account" means a normal, login-capable Bitbucket user created for
  the integration.
</Warning>

## Configure access

<Steps>
  <Step title="Create a dedicated Bitbucket account (recommended)">
    You can skip this step if you intend to connect Hacktron using an existing
    Bitbucket repository administrator.
  </Step>

  <Step title="Grant repository access">
    In Bitbucket, open **Repository settings** → **Repository permissions** and
    select **Add users or groups**.

    Add the account that will connect Hacktron, assign the **Admin** permission,
    and click **Confirm**.

    <Note>
      For multiple repositories, you can manage access through a Bitbucket group
      or grant the account **Admin** permission at the project level.
    </Note>

    <img src="https://mintcdn.com/hacktronai/b5KpQQQwFf9hLWPc/images/bitbucket_repository_access.png?fit=max&auto=format&n=b5KpQQQwFf9hLWPc&q=85&s=fa2caf579bc2d0a4e968c87b3bb9ea56" alt="Grant repository access" width="3792" height="1802" data-path="images/bitbucket_repository_access.png" />
  </Step>

  <Step title="Sign in to Bitbucket">
    Sign in with the dedicated Bitbucket account you created in step 1. If you
    chose to use an existing repository administrator account, sign in with that
    account instead.
  </Step>

  <Step title="Open the Integrations page">
    In Hacktron, go to **Integrations** and click **Connect** under
    **Bitbucket**.

    <img src="https://mintcdn.com/hacktronai/b5KpQQQwFf9hLWPc/images/bitbucket.png?fit=max&auto=format&n=b5KpQQQwFf9hLWPc&q=85&s=96984b64f06fbafd60b90cfd8cf589a2" alt="Bitbucket Integration" width="740" height="374" data-path="images/bitbucket.png" />
  </Step>

  <Step title="Authorise Hacktron">
    Review the permissions requested by Hacktron and click **Accept**.

    Bitbucket will redirect you to Hacktron after authorization is complete.

    <img src="https://mintcdn.com/hacktronai/b5KpQQQwFf9hLWPc/images/bitbucket_authorize.png?fit=max&auto=format&n=b5KpQQQwFf9hLWPc&q=85&s=e936cf4d8ee696dce5147235dc6c60a1" alt="Bitbucket integration authorisation" width="3792" height="1916" data-path="images/bitbucket_authorize.png" />
  </Step>

  <Step title="Select repositories">
    Select the repositories you want Hacktron to review and save your selection.

    Hacktron automatically creates the required webhook for each enabled
    repository. You do not need to configure the webhook manually.

    <img src="https://mintcdn.com/hacktronai/b5KpQQQwFf9hLWPc/images/bitbucket_select_repositories.png?fit=max&auto=format&n=b5KpQQQwFf9hLWPc&q=85&s=275727482ed17e77775ebd88b218abb3" alt="Bitbucket Integration Repo Selection" width="3792" height="1916" data-path="images/bitbucket_select_repositories.png" />

    To verify the webhook, open the repository in Bitbucket and go to
    **Repository settings** → **Webhooks**. You should see an active webhook
    named **Hacktron Security Scan** pointing to:
    `https://iva.hacktron.ai/api/v1/webhooks/bitbucket`

    <img src="https://mintcdn.com/hacktronai/b5KpQQQwFf9hLWPc/images/bitbucket_webhook.png?fit=max&auto=format&n=b5KpQQQwFf9hLWPc&q=85&s=45b002e6a0f2fd183e22839aa2aea639" alt="Bitbucket Integration Webhook" width="3792" height="1916" data-path="images/bitbucket_webhook.png" />
  </Step>
</Steps>

That's it! Hacktron will now run security reviews for every pull request in the selected repositories.

## Supported Bitbucket deployments

Hacktron currently supports Bitbucket Cloud.

Bitbucket Data Center and other self-hosted Bitbucket deployments are not currently supported.
