---
title: "Bitbucket"
description: "Connect your code with Bitbucket to enable API Discovery with HawkAI."
url: https://docs.stackhawk.com/integrations/workflows/bitbucket/
---

# Bitbucket

![Bitbucket](https://docs.stackhawk.com/images/integrations/logos/bitbucket.svg)

StackHawk’s official [Bitbucket](https://bitbucket.org/) integration.

> **Note:** *This feature is available on the StackHawk [Scale plan](https://www.stackhawk.com/pricing).*

## Overview

The StackHawk Bitbucket integration lets you connect your code through your Bitbucket workspace to unlock API Discovery with HawkAI via the [Attack Surface](https://docs.stackhawk.com/platform/api-discovery/) screen.

> **Note:** The integration requires a [Bitbucket Workspace Access Token](https://support.atlassian.com/bitbucket-cloud/docs/workspace-access-tokens/) with permissions to your Bitbucket repositories.

## Features

- Identify testable APIs and web applications across your organization’s attack surface.
- View repository details including detected frameworks and commit activity to prioritize testing.
- Create applications from repositories or connect repositories to existing StackHawk applications.

## Requirements

**StackHawk:**

- You must have a StackHawk account.

**Bitbucket:**

- You must have permissions to manage the Bitbucket workspace you wish to add the integration to.

  - You must have READ permissions to repositories in your Bitbucket workspace.
  - You must be able to [create a Workspace access token](https://support.atlassian.com/bitbucket-cloud/docs/workspace-access-tokens/) with read for repositories in the Bitbucket workspace you wish to integrate with.

## Permissions

With this integration you authorize StackHawk with the following permissions:

- `Repositories -> Read` access to the connected Bitbucket workspace.

## Installation

1. Log into StackHawk and visit the [Bitbucket Integration page in StackHawk](https://app.stackhawk.com/integrations/bitbucket/).
2. Click **Connect Bitbucket**.
3. Follow the prompts to provide your workspace name and access token.
4. The modal verifies your connection after you provide the required information.

## Usage

### Configuration

Configure Bitbucket on the [Attack Surface](https://app.stackhawk.com/attack-surface/) screen where you can view repositories and map them to applications in your StackHawk account.

### Connecting Multiple Bitbucket Workspaces

StackHawk supports connecting multiple Bitbucket workspaces. Click **Connect Bitbucket** to add an additional workspace.

### Updating Workspace Access Token

Update your workspace access token by clicking **Manage** for the associated Bitbucket workspace, then **Update** to enter a new token.

### Removing the Bitbucket Integration

The Bitbucket integration can be disconnected from the Bitbucket Integration page.

1. Go to the [Bitbucket Integration page](https://app.stackhawk.com/integrations/bitbucket/).
2. For each workspace you want to remove, click **Manage** then **Disconnect**.
3. Click **Yes, Disconnect** to confirm.

## Troubleshooting

### Repositories Not Showing Up in Attack Surface

There may be a delay between connecting your Bitbucket workspace and when repositories appear on the Attack Surface screen. For organizations with many repositories, this can take several minutes. A loading indicator displays while repositories are being processed.

## Feedback

Have any suggestions, feature requests, or feedback to share? [Contact StackHawk Support](https://docs.stackhawk.com/support/).
