> ## 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

**1. On the Plerion dashboard, go to Settings > Integrations**

![Plerion dashboard showing Settings expanded with Integrations selected](https://mintcdn.com/pleriondocs/4bl2G33Rpn-gjitb/images/integrations/bitbucket/settings-integrations-sidenav.png?fit=max\&auto=format\&n=4bl2G33Rpn-gjitb\&q=85\&s=017d688ca4b0892e3cebcc17d733daf0)

**2. Find Bitbucket and click the + button**

![Add a Bitbucket integration](https://mintcdn.com/pleriondocs/pge6FBFqTTAWB-iM/images/integrations/bitbucket/add-bitbucket-integration.png?fit=max\&auto=format\&n=pge6FBFqTTAWB-iM\&q=85\&s=0adfe683ce76e2764459b609f0ca0650)

**3. Click on Install and review the permissions**

![Install Bitbucket app option in Plerion](https://mintcdn.com/pleriondocs/pge6FBFqTTAWB-iM/images/integrations/bitbucket/install-bitbucket-app.png?fit=max\&auto=format\&n=pge6FBFqTTAWB-iM\&q=85\&s=d3a78409b1f51b117014d6a8b7489546)

**4. After installation, you will be redirected to the Plerion platform**

![Plerion integration page showing Bitbucket connected](https://mintcdn.com/pleriondocs/pge6FBFqTTAWB-iM/images/integrations/bitbucket/bitbucket-integration-page.png?fit=max\&auto=format\&n=pge6FBFqTTAWB-iM\&q=85\&s=44a6a5cb79dbcdf565cd5ac262259419)

***

## 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

![Integration status toggle in Plerion](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)

### 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

![Scheduled scans configuration in Plerion](https://mintcdn.com/pleriondocs/4bl2G33Rpn-gjitb/images/integrations/bitbucket/scheduled-scans.png?fit=max\&auto=format\&n=4bl2G33Rpn-gjitb\&q=85\&s=ca250703c29dd3b19922e8d3b2f1eb52)

### 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

![Pull request scanning configuration in Plerion](https://mintcdn.com/pleriondocs/pge6FBFqTTAWB-iM/images/integrations/bitbucket/pull-request-scanning.png?fit=max\&auto=format\&n=pge6FBFqTTAWB-iM\&q=85\&s=6ceb3dbccbcd8df5d5b0f1bfbfcd201c)

### SAST scanning

Scans your source code for security vulnerabilities using static application security testing (SAST).

* **Default**: Disabled
* **What it does**:
  * Adds your source code to default branch and pull request scans
  * Analyzes it for common vulnerability patterns such as injection flaws, insecure cryptography, and unsafe deserialization
  * Reports findings in the Plerion platform alongside IaC and SCA findings, and as comments on pull requests
* **Supported languages**: TypeScript, JavaScript, Python, Go, Java, Kotlin, Ruby, PHP, C#, C, C++, Rust, Swift, and Scala
* **Why it matters**: Catches application-layer vulnerabilities earlier in the development lifecycle, before code reaches production

![SAST scanning configuration in Plerion](https://mintcdn.com/pleriondocs/TfoSwVkTCBSm7QlX/images/integrations/bitbucket/sast-scanning.png?fit=max\&auto=format\&n=TfoSwVkTCBSm7QlX\&q=85\&s=d42564e71d71ae68367139778d642e85)

### 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

![Tolerance configuration options in Plerion](https://mintcdn.com/pleriondocs/4bl2G33Rpn-gjitb/images/integrations/bitbucket/tolerance-configuration.png?fit=max\&auto=format\&n=4bl2G33Rpn-gjitb\&q=85\&s=20692c1a18f68c04ddfa15d66dbb674a)

### 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

![Profile selection in Plerion Bitbucket integration](https://mintcdn.com/pleriondocs/pge6FBFqTTAWB-iM/images/integrations/bitbucket/profile.png?fit=max\&auto=format\&n=pge6FBFqTTAWB-iM\&q=85\&s=078878e78009e551f7459a71115e6170)

***

## 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


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.