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

# Bitbucket

> Integrate Plerion Code Security with Bitbucket to scan repositories for infrastructure as code (IaC) issues and software composition analysis (SCA) issues directly in your development workflow.

With the [Bitbucket integration](https://app.plerion.com/settings/integrations/add/Bitbucket/Bitbucket), you can connect your repositories to Plerion Code Security. This enables automatic scanning for IaC and SCA issues, giving developers early feedback and helping teams resolve issues before they reach production.

***

## Steps to integrate Bitbucket with Plerion

<Steps>
  <Step title="On the Plerion dashboard, go to Settings > Integrations">
    <Frame>
      <img src="https://mintcdn.com/pleriondocs/4bl2G33Rpn-gjitb/images/integrations/bitbucket/settings-integrations-sidenav.png?fit=max&auto=format&n=4bl2G33Rpn-gjitb&q=85&s=017d688ca4b0892e3cebcc17d733daf0" alt="Plerion dashboard showing Settings expanded with Integrations selected" width="655" height="853" data-path="images/integrations/bitbucket/settings-integrations-sidenav.png" />
    </Frame>
  </Step>

  <Step title="Find Bitbucket and click the + button">
    <Frame>
      <img src="https://mintcdn.com/pleriondocs/pge6FBFqTTAWB-iM/images/integrations/bitbucket/add-bitbucket-integration.png?fit=max&auto=format&n=pge6FBFqTTAWB-iM&q=85&s=0adfe683ce76e2764459b609f0ca0650" alt="Add a Bitbucket integration" width="1174" height="878" data-path="images/integrations/bitbucket/add-bitbucket-integration.png" />
    </Frame>
  </Step>

  <Step title="Click on Install and review the permissions">
    <Frame>
      <img src="https://mintcdn.com/pleriondocs/pge6FBFqTTAWB-iM/images/integrations/bitbucket/install-bitbucket-app.png?fit=max&auto=format&n=pge6FBFqTTAWB-iM&q=85&s=d3a78409b1f51b117014d6a8b7489546" alt="Install Bitbucket app option in Plerion" width="2358" height="548" data-path="images/integrations/bitbucket/install-bitbucket-app.png" />
    </Frame>
  </Step>

  <Step title="After installation, you will be redirected to the Plerion platform">
    <Frame>
      <img src="https://mintcdn.com/pleriondocs/pge6FBFqTTAWB-iM/images/integrations/bitbucket/bitbucket-integration-page.png?fit=max&auto=format&n=pge6FBFqTTAWB-iM&q=85&s=44a6a5cb79dbcdf565cd5ac262259419" alt="Plerion integration page showing Bitbucket connected" width="2104" height="1315" data-path="images/integrations/bitbucket/bitbucket-integration-page.png" />
    </Frame>
  </Step>
</Steps>

***

## Configuring your Bitbucket integration

Once installed, you can configure the Bitbucket integration to suit your workflows. These options control which workspaces are scanned, when and how scans run, how issues are handled, and what rules apply.

### Bitbucket workspaces

Selects which Bitbucket workspaces to scan.

* **Default**: All

### Bitbucket code scanning

Controls whether Plerion Code Security is active.

* **Default**: Enabled
* **When disabled**: Pauses all scanning activities, including scheduled and pull request scans
* **Recommendation**: Keep enabled unless there is a specific need to pause

<Frame>
  <img src="https://mintcdn.com/pleriondocs/pge6FBFqTTAWB-iM/images/integrations/bitbucket/bitbucket-code-scanning-status.png?fit=max&auto=format&n=pge6FBFqTTAWB-iM&q=85&s=eeda789537c9a8379f3bb4373140239d" alt="Integration status toggle in Plerion" width="1724" height="202" data-path="images/integrations/bitbucket/bitbucket-code-scanning-status.png" />
</Frame>

### Scheduled scans

Runs automatic daily scans of your main branches.

* **Default**: Enabled
* **Purpose**: Ensures continuous monitoring of production-ready code
* **Key points**:
  * No manual input required
  * Helps identify risks over time
  * Best for stable branches

<Frame>
  <img src="https://mintcdn.com/pleriondocs/4bl2G33Rpn-gjitb/images/integrations/bitbucket/scheduled-scans.png?fit=max&auto=format&n=4bl2G33Rpn-gjitb&q=85&s=ca250703c29dd3b19922e8d3b2f1eb52" alt="Scheduled scans configuration in Plerion" width="1724" height="196" data-path="images/integrations/bitbucket/scheduled-scans.png" />
</Frame>

### Pull request scanning

Scans code in new and updated pull requests.

* **Default**: Enabled
* **What it does**:
  * Scans only changes in the pull request
  * Posts findings as comments in Bitbucket
  * Uses Bitbucket status checks to block insecure merges
* **Supported file types**: YAML, Terraform, JSON, and other IaC files
* **Why it matters**: Prevents vulnerabilities from merging, encourages secure practices, and improves developer awareness

<Frame>
  <img src="https://mintcdn.com/pleriondocs/pge6FBFqTTAWB-iM/images/integrations/bitbucket/pull-request-scanning.png?fit=max&auto=format&n=pge6FBFqTTAWB-iM&q=85&s=6ceb3dbccbcd8df5d5b0f1bfbfcd201c" alt="Pull request scanning configuration in Plerion" width="1710" height="186" data-path="images/integrations/bitbucket/pull-request-scanning.png" />
</Frame>

### Tolerance for blocking pull requests

Controls when pull requests are blocked based on severity.

* **Default**: Do not block pull requests
* **Options**:
  * Only block for critical findings
  * Block for high and critical findings
  * Block for medium and above findings
  * Block for any finding
  * Do not block pull requests
* **Best use**: Choose based on your team’s risk tolerance, development velocity, and compliance needs

<Frame>
  <img src="https://mintcdn.com/pleriondocs/4bl2G33Rpn-gjitb/images/integrations/bitbucket/tolerance-configuration.png?fit=max&auto=format&n=4bl2G33Rpn-gjitb&q=85&s=20692c1a18f68c04ddfa15d66dbb674a" alt="Tolerance configuration options in Plerion" width="1718" height="240" data-path="images/integrations/bitbucket/tolerance-configuration.png" />
</Frame>

### Profile

Defines which detection rules are used during scans.

* **Default**: Organization’s default profile
* **Options**: Use an existing profile or create a new one
* **Where to manage**: Detection Settings
* **Best use**: Align with coding standards, risk tolerance, and compliance needs

<Frame>
  <img src="https://mintcdn.com/pleriondocs/pge6FBFqTTAWB-iM/images/integrations/bitbucket/profile.png?fit=max&auto=format&n=pge6FBFqTTAWB-iM&q=85&s=078878e78009e551f7459a71115e6170" alt="Profile selection in Plerion Bitbucket integration" width="1716" height="202" data-path="images/integrations/bitbucket/profile.png" />
</Frame>

***

## Best practices

* Keep the integration enabled for continuous coverage
* Use scheduled scans to secure long-term branches
* Enable PR scanning to prevent insecure code from merging
* Set PR blocking tolerance based on your security posture
* Select a detection profile that matches your organization’s needs
