Skip to main content

Bitbucket Self-Hosted


It is possible to add the Checkmarx One external IP addresses to the customer Firewall allowlist - For more information see Checkmarx One External IPs

In addition, if the code repository is not internet accessible, it is possible to configure the code repository IP address instead of its hostname during the initial integration with the code repository - as it is not resolved via DNS.


Checkmarx One supports Bitbucket integration, enabling automated scanning of your Bitbucket projects whenever the code is updated. Checkmarx One’s Bitbucket integration listens for Bitbucket commit events and uses a webhook to trigger Checkmarx scans when a push, or a pull request occurs. Once a scan is completed, the results can be viewed in Checkmarx One.

In addition, for pull requests, a comment is created in Bitbucket, which includes a scan summary, list of vulnerabilities and a link to view the scan results in Checkmarx One.


This integration supports both public and private git based repos.

The integration is done on a per project basis, with a specific Checkmarx One Project corresponding to a specific Bitbucket repo.


You can select several repos to create multiple integrations in a bulk action.


  • The source code for your project is hosted on a Bitbucket repo.

  • You have a Checkmarx One account and have credentials to log in to your account.

  • The Bitbucket user has Admin privileges for this repository, see Code Repository Integrations.


The example below relates to Bitbucket server v7.1 and below.

In newer versions (Above 7.1) the Personal access tokens are replaced with HTTP access tokens.

Checkmarx One doesn't support HTTP access tokens for projects or repositories.

For additional information on how to create HTTP access tokens see Bitbucket HTTP access tokens.

To retrieve your Bitbucket Username & Token, perform the following steps:

  1. In your Bitbucket account, click on your user > View Profile.

  2. Retrieve your Username.

  3. To create a Token, click on your user > Manage account.

  4. Click on Personal access tokens.

  5. Click on Create a token.

  6. Give the token at least Read permissions for Projects and Repositories.

  7. Click Create.

Setting up the Integration and Initiating a Scan

To integrate your self hosted (on-prem) Bitbucket organization with Checkmarx One, perform the following:

  1. In the Applications and Projects home page, click on New > New Project - Code Repository Integration.


    The Import From window opens.

  2. Select Self-hosted → Bitbucket.

  3. Configure the following fields and click Next:

  4. Select the Bitbucket Organization or Group (for the requested repository) and click Select Organization.

    The screen contains the following functionalities:

    • Search bar - Auto-complete is implemented. The search is not case sensitive.

    • Infinite scroll - For enterprises with a large amount of organizations.

  5. Select the Repository inside the Bitbucket organization and click Next.


    • A separate Checkmarx One Project will be created for each repo that you import.

    • There can’t be more than one Checkmarx One Project per repo. Therefore, once a Project has been created for a repo, that repo is greyed out in the Import dialog.

  6. In the Repositories Settings screen, perform the following and click Next.

    • Permissions:

      • Scan Trigger: Push, Pull request - Enable/disable automatic scans for every push event or pull request.

    • Scanners: Select the scanners for All/Specific repositories. At lease 1 scanner must be selected for each repository.

    • Protected Branches: Select which Protected Branches to scan for each repository.


      For additional information about Protected Branches see About Protected Branches

    • Add SSH key.

    • Assign Groups: Specify the Groups to which you would like to assign the project.

    • Assign Tags: Add Tags to the Project. Tags can be added as a simple strings or as key:value pairs.

    • Set Criticality Level: Manually set the project criticality level.

  7. Select which Protected Branches to scan for each Repository and click Next.


    For additional information about Protected Branches see About Protected Branches

  8. In the Advanced Options screen it is possible to select Scanning the default branch upon the creation of the Project.

    You also must select the default branch for the automatic scan, as Bitbucket doesn't have a default one.

    Click Create Project.

  9. The Project is successfully added to the Applications and Projects home page.


    In order to update the scanners see Imported Project Settings


Updating Project Settings

See Code Repository Settings.