Overview
Backline integrates with Bitbucket to automatically create secure pull requests that remediate known vulnerabilities in your repositories. This streamlines the remediation process and helps keep your codebase secure.What You Can Do
With the Bitbucket integration, Backline can:- Access your repositories across every Bitbucket workspace the service account belongs to
- Analyze dependencies and identify risks
- Create pull requests with automated security fixes
- Monitor remediation status across Bitbucket projects
Prerequisites
Before connecting Bitbucket, ensure you have:- One or more Bitbucket workspaces where a service account has write access to the repositories Backline should manage
- Ability to create (or reuse) a service account and add it to those workspaces
- Access to generate an API token for the service account
Connecting Bitbucket
1
Create Service Account
Create a Bitbucket service account and add it to every workspace Backline should cover, with write access to the repositories you want managed. Repositories the account can only read are skipped; its personal workspace is included.
2
Generate API Token
In Bitbucket, navigate to your service account settings and create an API token with the required permissions (listed below).
3
Go to Integration Hub
In Backline, navigate to Integrations from the main menu.
4
Select Bitbucket
Find and click on the Bitbucket integration card.
5
Enter Credentials
Provide your service account details:
- Atlassian Account Email: The email address of your Bitbucket service account
- API Token: The API token generated in Step 2
6
Verify Connection
Click Connect to verify your credentials. Backline then onboards every repository the account can write to, in every workspace it belongs to, and enables automated remediation.
API Token Configuration
The API token is used to authenticate with the Bitbucket API. This token must have access to the required repositories, pull requests, pipelines, and webhooks.Required Scopes
Configure your Bitbucket API token with the following scopes: Read Permissions:read:account- Access account informationread:project:bitbucket- Read project detailsread:pullrequest:bitbucket- View pull requestsread:repository:bitbucket- Access repository contentread:user:bitbucket- Read user informationread:webhook:bitbucket- View webhook configurationsread:workspace:bitbucket- Access workspace detailsread:pipeline:bitbucket- Monitor pipeline status
write:pullrequest:bitbucket- Create and update pull requestswrite:repository:bitbucket- Make changes to repositorieswrite:webhook:bitbucket- Configure webhooks for event notifications
These permissions allow Backline to access your repositories and create pull requests for security fixes while maintaining visibility into your workspace structure.
After Connection
Once Bitbucket is connected, Backline will:- Index every repository the service account can write to, across all of its workspaces
- Generate remediation plans for vulnerabilities from those repositories
- Create pull requests for automated fixes
Coverage follows the account: a workspace or repository the account gains write access to appears after the next daily refresh, or right away when you select Refresh from the three dots menu on the Bitbucket card. Repositories it can no longer write to are removed at the next refresh.