Bitbucket Cloud
Integrate Bitbucket Cloud to scan for secrets, IaC misconfigurations, vulnerabilities, and license compliance to strengthen your VCS security posture.
Integrate Cortex Cloud Application Security with your Bitbucket Cloud version control system (VCS) to enable security scans for exposed secrets, infrastructure-as-code (IaC) misconfigurations, vulnerabilities, package operational risks, and license compliance issues in your repositories. This integration allows you to analyze, prioritize, and resolve detected issues efficiently.
How to integrate Bitbucket Cloud
Prerequisites
Before you begin, complete the Cortex Cloud and Bitbucket requirements.
Cortex Cloud requirements
User permissions: Ensure you have View/Edit permissions for Data Sources and Integrations. Use the AppSec Admin or Instance Administrator role.
Egress path: Establish an egress path for outbound data transmission from Cortex Cloud. For configuration details, refer to Egress configurations.
Bitbucket requirements
Permissions: In Bitbucket, grant the user authorizing Cortex Cloud the following permissions. The required level depends on the modules you use.
The user must have Write access:
Workspace group with default repository access: Add the user to a workspace group whose default repository access is set to
WriteRepository permissions: Go to Repository Settings. Grant the user
Writeaccess to each repository Cortex must access
The user requires Administrator permissions for both Projects and Repositories.
For more information on Bitbucket Cloud permissions, refer to the Bitbucket Authentication documentation.
Authentication (OAuth 2.0): Cortex Cloud exclusively uses OAuth for Bitbucket Cloud integrations.
Automated token refresh: There is no need to manually rotate tokens, as the OAuth integration automatically refreshes tokens in the background
OAuth scopes and events: Review Reference A: Authorization scopes and subscribed events to understand the requested OAuth permissions and events.
Onboarding steps
On the Cortex Cloud tenant.
Select Settings → Data Sources & Integrations → + Add New.
Search for Bitbucket Cloud, hover over it, and click Add, or Add Another Instance if an instance is already onboarded.
Authenticate: Click Authorize on the Configure account step of the Bitbucket Cloud wizard.
You are redirected to Bitbucket Cloud.
Authorize Cortex Cloud Application Security on Bitbucket Cloud: Review the requested permissions and then select Grant access.
You are redirected to the Select Repositories step of the integration wizard.
Configure repositories: Select the repositories to be connected to the instance:
Permit all existing repositories
Permit all existing and future repositories
Select Choose from repository list and select repositories from the list
Verify integration
On Data Sources & Integrations, search for Bitbucket Cloud.
Hover over and select the resulting entry.
Locate your instance and verify that the status is Connected.
Next steps
View repository assets and mitigate detected issues.
Manage the integration
Instance-level actions
Navigate to Settings → Data Sources & Integrations and search for Bitbucket Cloud.
Select the matching result.
Locate your instance from the displayed list, right-click it, then select an option:
Edit instance: Opens the onboarding wizard, where you can change the instance configuration.
Delete instance: Deletes the instance and previous scan data.
Copy entire row: Copies all row values to the clipboard.
Repository-level actions
Right-click a connected repository to Set Scanned Branches, run a manual scan through Scan Repository, modify the Scan Configuration, or Remove Repository entirely. You can toggle specific scanners and manage PR behavior in Scan Configuration.
Locate your instance. See Verify integration above.
Select the instance. A list of connected repositories appears.
Right-click a repository, select the required action, then click Save.
Troubleshooting VCS instance path errors
If your VCS instance shows an error with the message Path was not approved in the egress, you must ensure that your VCS organization's path is approved in the Cortex Gateway. For more information, refer to Egress Configurations.
Last updated
Was this helpful?
