---
title: "Bitbucket"
slug: "bitbucket"
updated: 2025-04-11T08:28:14Z
published: 2025-04-11T08:28:14Z
canonical: "docs.safe.security/bitbucket"
---

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

# Bitbucket

## About this document

---

This document gives you the step-by-step procedure to configure Bitbucket in SAFE.

## Introduction

---

SAFE integrates with Bitbucket and fetches the security misconfiguration of the Bitbucket account in SAFE.

## Prerequisites

---

- Access required in **SAFE**:
  - SAFE Admin Access
- Access required in **Bitbucket**:
  - Bitbucket Admin Access
- Required User Inputs
  - API URL
  - Workspace ID
  - Key
  - Secret
- Required Scope
  - account: Read
  - project: Read
  - repository: Read

## Generate Connection Details

---

### Generate **Workspace ID**

- 
  - Log in to your Bitbucket account as **Admin**.
  - Navigate to your Workspace, by clicking on profile icon in the top right corner and select All Workspaces.

![](https://cdn.document360.io/23dc20b8-a989-48c0-8653-f1d3e4abc734/Images/Documentation/image(60).png)
  - Select the workspace.

![](https://cdn.document360.io/23dc20b8-a989-48c0-8653-f1d3e4abc734/Images/Documentation/image(61).png)
  - Click the Settings icon at the top-right of the screen.
  - Click on the Workspace settings option. Here on this page, you can get the **Workspace ID.** Copy and Save the*Workspace ID*to use later while configuring Bitbucket in SAFE.

![](https://cdn.document360.io/23dc20b8-a989-48c0-8653-f1d3e4abc734/Images/Documentation/image(62).png)
- How to get **Key & Secret**
  - Log in to your Bitbucket account as **Admin**.
  - Navigate to your Workspace, by clicking at profile icon on the top right corner and select All Workspaces.

![](https://cdn.document360.io/23dc20b8-a989-48c0-8653-f1d3e4abc734/Images/Documentation/image(63).png)
  - Select the workspace.

![](https://cdn.document360.io/23dc20b8-a989-48c0-8653-f1d3e4abc734/Images/Documentation/image(64).png)
  - Click on the Settings icon at the top-right of the screen.
  - Click on the Workspace settings.
  - Click on the OAuth consumers.
  - Click on the Add Consumer button.

![](https://cdn.document360.io/23dc20b8-a989-48c0-8653-f1d3e4abc734/Images/Documentation/image(65).png)
  - Enter the Name and Description.
  - Enter the Callback URL as [https://us.safeone.ai](https://us.safeone.ai/).
  - Mark the checkbox for the "**This is a private consumer**" option.

![](https://cdn.document360.io/23dc20b8-a989-48c0-8653-f1d3e4abc734/Images/Documentation/image(66).png)
  - Click the the Save Button. The system redirects you to the OAuth consumer page.

![](https://cdn.document360.io/23dc20b8-a989-48c0-8653-f1d3e4abc734/Images/Documentation/image(67).png)
  - The system displays the**Key** and**Secret**. Copy and save the Key and Secret to use it while configuring Bitbucket in SAFE.
  - It's important to regularly update the Key and Secret in SAFE according to its expiration date.
- How to get **API URL**
  - Access the Bitbucket API documentation by clicking on the provided [link](https://developer.atlassian.com/cloud/bitbucket/rest/intro/#uri-structure).
  - Upon reaching the Bitbucket API documentation page, locate the section titled "**URI structure**".
  - In the exhibit provided, find the base URL highlighted as 3. **Copy** and **save** this *API URL* to use it while configuring Bitbucket in SAFE.

![](https://cdn.document360.io/23dc20b8-a989-48c0-8653-f1d3e4abc734/Images/Documentation/image(68).png)

## Configure Bitbucket in SAFE

---

- Log in to your SAFE account as **Admin**.
- Click on the **Integrations**option from the left navigation.
- Scroll to find the Bitbucket integration card or search for Bitbucket in the search bar.

![](https://cdn.document360.io/23dc20b8-a989-48c0-8653-f1d3e4abc734/Images/Documentation/image(69).png)
- Hover over the **Bitbucket** integration card and click on the **Configure** button.
- Enter the following:
  - API URL
  - Workspace ID
  - Key
  - Secret
- Enter the **Auto Sync Frequency.**
- Click on the **Test Connection** button.
- Once the connection is successful, click on the **Save** button.

![](https://cdn.document360.io/23dc20b8-a989-48c0-8653-f1d3e4abc734/Images/Documentation/image(70).png)
- Once the configuration is saved successfully, click on the **Sync** **Now** button to trigger an on-demand sync.
- Upon a successful sync, the system pulls the Bitbucket assets and their findings in SAFE. You can track the status of the sync in the **History** table.

![](https://cdn.document360.io/23dc20b8-a989-48c0-8653-f1d3e4abc734/Images/Documentation/image(71).png)

## View Results

---

- Go to the integration homepage.
- Scroll to find the Bitbucket integration card or search for Bitbucket in the search bar.
- Click on the Bitbucket integration card for **Finding View** and **Asset View**.
  - **Finding View:** This tab displays all the findings details pulled from Bitbucket.

![](https://cdn.document360.io/23dc20b8-a989-48c0-8653-f1d3e4abc734/Images/Documentation/image(72).png)
  - **Asset View:**This tab displays all the assets pulled from Bitbucket.

![](https://cdn.document360.io/23dc20b8-a989-48c0-8653-f1d3e4abc734/Images/Documentation/image(73).png)

## History

---

Learn More about Integration History [here](https://docs.safe.security/safe-4/docs/integration-history).

## SAFE's Outgoing IP Addresses

---

Click [here](https://docs.safe.security/safe-4/docs/safes-outgoing-ip-addresses) to find the outgoing IP addresses of SAFE. All traffic to any integrations in SAFE will see one IP address as the source IP of the incoming connection.
