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 Bitbucket repositories and workspaces
- 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:- A Bitbucket workspace with appropriate access
- Ability to create a service account with Admin role
- Access to generate API tokens for the service account
Connecting Bitbucket
1
Create Service Account
Create a Bitbucket service account with Admin role scoped to a single workspace. This dedicated account will be used exclusively for Backline’s integration.
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. Once verified, Backline will securely link to your Bitbucket workspace and enable 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 your repositories
- Generate remediation plans for vulnerabilities from those repositories
- Create pull requests for automated fixes
Managing the Integration
Modifying Repository Access
To change which repositories Backline can access:- Go to your Bitbucket workspace settings
- Navigate to OAuth consumers
- Find Backline and adjust permissions