Integrate a new Bitbucket Cloud source
GitGuardian integrates with your Bitbucket Cloud workspace using an App password. For more details on App passwords, refer to the Bitbucket Cloud documentation.
Setup
Create an API token
The API token must be generated by the Workspace Owner of the workspace(s) you intend to monitor. This grants the necessary permissions to automatically create the required webhooks.
-
Log in to Bitbucket Cloud as the Workspace Owner;
-
Navigate to the Profile and visibility within the Atlassian account settings;
-
Get the email address in the Bitbucket profile settings
-
On the Atlassian account page, navigate to the API tokens section within the security settings;
-
Click on "Create API token with scopes" to start the creation of your API token. Use a simple name such as "GitGuardian". We recommend you set the expiration date to 1 year, this is the maximum allowed.
-
On the "Select app" page, select "Bitbucket".
-
On the "Select scopes" assign the following scopes:
- read:project:bitbucket
- delete:webhook:bitbucket
- read:webhook:bitbucket
- write:webhook:bitbucket
- read:repository:bitbucket
- read:user:bitbucket
- read:workspace:bitbucket
- read:permission:bitbucket
-
On the final "Create token page", recheck that the scopes are correct:
-
Get the API token
Integrate your Bitbucket workspaces with GitGuardian
-
Navigate to Settings > Integrations > Sources.
-
Click on Install for Bitbucket Cloud.
-
Enter the email from your Atlassian account and the API token generated earlier. Add a name for the integration, then click Configure.
-
On the configuration page, review the list of workspaces your Bitbucket Cloud user has access to. Click Install for each workspace you want to monitor.
-
That's it! You can view the monitored projects and repositories in your Bitbucket Cloud settings page.
Automatic historical scan
By default, GitGuardian runs a historical scan on every Bitbucket Cloud repository added to the monitored perimeter.
To disable this feature, navigate to your Bitbucket Cloud settings. Only workspace Managers can modify this setting.
Customize your monitored perimeter
After installing your Bitbucket Cloud instance(s), you can configure which projects to monitor in the Bitbucket Cloud settings.
If you deselect an entity (a repository, a project or a whole workspace) from your monitored perimeter:
- GitGuardian will stop fetching commits from that entity, new incidents will not be uncovered and existing incidents won't be updated for this entity.
- The webhook will remain active, allowing you to resume monitoring anytime.