Bitbucket Cloud App integration
The Bitbucket Cloud App is positioned to be the default Bitbucket Cloud integration
Snyk offers two Bitbucket Cloud integrations: the Personal Access Token (PAT) integration and the new App integration.
Snyk's Bitbucket Cloud App integration lets you connect your Snyk Organization to a Bitbucket Cloud Workspace and get all Snyk's core SCM integration features:
Continuously perform security scanning across all the integrated repositories
Detect vulnerabilities in your Open Source components
Provide automated fixes and upgrades
Provides developer teams with first-party visibility for security issues directly in the Bitbucket interface
Feature availability This feature is available for all plans. See pricing plans for more details.
Setting up a Bitbucket Cloud App
To give Snyk access to your Bitbucket account, you need to install the Snyk App on your Bitbucket Cloud workspace.
In Snyk, go to Integrations (Source control) > Bitbucket Cloud App tile, and click Connect to install the Snyk Bitbucket Cloud App on your Bitbucket Cloud workspace.
In the new Bitbucket tab, select the relevant workspace to connect to your Snyk Organization from the list and Grant access to let Snyk:
Read your account information

Read and modify your repositories and their pull requests
Read and modify your repositories' webhooks
Allow Snyk to access to Bitbucket Cloud Grant access to your Snyk Organization when you're prompted.\
Allow Bitbucket Cloud to access your Snyk Organization After you allow access to the Snyk Organization, the Snyk Organization Settings page opens and confirms that you're connected to the Bitbucket Cloud App.
After Snyk is integrated with Bitbucket Cloud, you can see the new Snyk security tab in the repository page, and import and explore the issues and vulnerabilities for your repository projects, directly in Bitbucket.

Watch this short video to see how to set up Snyk security in Bitbucket Cloud!
Installing the Snyk App from Bitbucket Cloud
If you need to, you can also install the Snyk Bitbucket Cloud App integration while you're in Bitbucket Cloud.
In one of your Bitbucket Cloud workspaces, go to the Security tab in one of your repositories, click Try now, and follow the procedure.

Adding Bitbucket repositories to Snyk
After you connect Snyk to your Bitbucket Cloud account, you can select repositories for Snyk to monitor.
In Snyk, go to Integrations > Bitbucket Cloud App card and click to start importing repositories to Snyk.
Choose the repositories you want to import to Snyk and click Add selected repositories.
After you add them, Snyk scans the selected repositories for dependency files in the entire directory tree, (that is, package.json
, pom.xml
, and so on) and imports them to Snyk as projects.
The imported projects appear on your Projects page and are continuously checked for vulnerabilities.

Bitbucket integration features
Once the integration is in place, you'll be able to use capabilities such as:
Project-level security reports
Snyk produces advanced security reports that let you explore the vulnerabilities found in your repositories, and fix them immediately by opening a fix pull request directly to your repository, with the required upgrades or patches.
The example below presents a project-level security report.

Snyk scans your projects on either a daily or a weekly basis. When new vulnerabilities are found, Snyk notifies you by email and by opening automated pull requests with fixes for your repositories.
The example below presents a fix Pull Request opened by Snyk.

To review and adjust the automatic fix pull request settings:
In Snyk, go to
(Organization settings) > Integrations > Source control > Bitbucket Cloud App, and click Edit Settings.
Scroll to the Automatic fix PRs section and configure the relevant options.
Automatic fix PR settings
Pull request tests
Snyk tests any newly created pull request in your repositories for security vulnerabilities and sends a build check to Bitbucket Cloud. You can see whether the pull request introduces new security issues, directly from Bitbucket Cloud.
The example below presents a Snyk pull request build check on the Bitbucket Cloud Pull Request page.

To review and adjust the pull request tests settings,
In Snyk, go to
(Organization settings) > Integrations > Source control > Bitbucket Cloud App, and click Edit Settings.
Scroll to Default Snyk test for pull requests > Open Source Security & Licenses, and configure the relevant options. See Configure PR Checks for more details.
First-party interface in Bitbucket Cloud
When you install the Snyk Bitbucket Cloud App integration on your Bitbucket workspace, the members of your workspace can import repositories and see the security issues related to their repositories in a dedicated Snyk security tab in Bitbucket Cloud.

The first-party interface currently supports only the Snyk Open Source and Snyk Container products. Issues from other Snyk products do not show up on this page.
Associating a first-party interface with a different Snyk account or Organization
During the first time Bitbucket Cloud App onboarding process, the first-party interface is associated with a specific Snyk Organization. This is the Snyk Organization to which Bitbucket users will import repositories and for which they'll view Snyk issues.
To change the Snyk Organization after onboarding, go to the workspace settings > Security for Bitbucket Cloud > Integration Settings and click Connect via a different Snyk user/organization.

The installation process begins again and you can choose the relevant Snyk Organization.
Required permissions scope for the Snyk Bitbucket Cloud App integration
The table below presents the required access scopes for the Bitbucket Cloud App.
Daily / weekly tests
Used to read manifest files in private repositories.
Read and modify your repositories and their pull requests
Snyk tests on pull requests
Used to send pull request status checks when a new PR is created, or an existing PR is updated.
Read and modify your repositories and their pull requests
Opening fix and upgrade pull requests
Used to create fix PRs in monitored repositories.
Read and modify your repositories and their pull requests
Snyk tests on pull requests - initial configuration
Used to add Snyk webhooks to the imported repos, to notify Snyk when pull requests are created or updated, and enable Snyk to trigger a scan.
Read and modify your repositories' webhooks
Disabling the Bitbucket Cloud App integration
To disable this integration, in (Organization settings)> Integrations > Source Control > Bitbucket Cloud App:
In your list of integrations, select the Bitbucket Cloud App integration you want to deactivate and click Edit settings to open a page with the current status of your integration. The page includes sections that are specific to each integration, where you can manage your credentials, API key, Service Principal, or connection details.
Scroll to the Disconnect section and click Remove to remove the integratio
WARNING When you disconnect Snyk from your repository projects, your credentials are removed from Snyk and any integration-specific projects that Snyk is monitoring are deactivated in Snyk.
If you choose to re-enable this integration later, you'll need to re-enter your credentials and activate your projects.
Last updated
Was this helpful?