Skip to main content
Connect Odin to Bitbucket Cloud to give Odin access to your repositories. Odin reads your source code to map routes, authentication flows and business logic for whitebox pentesting. When you enable PR Reviews, it also posts review feedback on your pull requests and can retest linked findings when a fix is merged.
Odin reads your repository contents for pentesting. For PR Reviews it also posts review comments and a single build status on the pull requests in repositories you enable, and adds a webhook to those repositories. It never pushes code, creates or merges pull requests, or changes your branches.
Bitbucket Cloud (bitbucket.org) is supported. Bitbucket Data Center and Server are not.

Connect Bitbucket

Bitbucket authenticates through OAuth 2.0. You authorise Odin with your Bitbucket account, and Odin uses that account’s access in one workspace, the one your organisation chooses. Repositories in the account’s other workspaces, such as a personal workspace, are never available in Odin.
1

Open Integrations

Go to Management > Integrations in the sidebar.
2

Connect Bitbucket

Click Connect next to Bitbucket. You’re sent to Atlassian to review the requested access and click Accept.
3

Choose the workspace

If the account belongs to a single workspace, Odin uses it automatically. Otherwise an admin chooses the workspace under Bitbucket access on the integration.
4

Pick repositories when you need them

You choose repositories from that workspace when you set up a pentest or switch on PR reviews.
Connect with an account that can see the repositories you want to test. To switch on PR reviews for a repository, that account also needs admin access to it, because Odin adds a repository webhook. A dedicated service account in your workspace works well for this.
Once Bitbucket is connected and its workspace chosen, an admin can install the Odin by Borg app on the workspace. Odin then works through the app instead of the connected person’s account:
  • Review comments and build statuses come from Odin by Borg, not from a colleague’s name.
  • Odin keeps working if the person who connected Bitbucket leaves or loses access.
  • PR reviews no longer need a webhook on each repository, so you don’t need repository admin rights to switch them on.
1

Start from Odin

In Management > Integrations > Bitbucket, click Install the app under Bitbucket access. The Bitbucket account connected to Odin must be an admin of the workspace.
2

Install on the workspace

The installation page opens in a new tab. Choose the workspace and click Install. Installing an app needs workspace admin rights in Bitbucket.
3

Done

Odin connects the app automatically, usually within a minute. Acts as then shows Odin by Borg (app).
To remove the app, uninstall it in Bitbucket > Workspace settings > Installed apps. Odin falls back to the connected account and shows a prompt to reinstall. The Bitbucket access section of the integration shows which Bitbucket account Odin acts as and which workspace it uses. Any member can re-authorise the same account when its access expires. Switching to a different Bitbucket account, or changing the workspace, needs an admin. When an admin changes the workspace, PR reviews on repositories in other workspaces are turned off. You can revoke access at any time from Bitbucket > Personal settings > App authorisations, or by disconnecting the integration in Odin. Disconnecting also removes the webhooks Odin added. Under Profile > Linked accounts, click Connect Bitbucket to link your personal Bitbucket account to your Odin user. Bitbucket only asks to share your account details, not access to repositories. The link lets Odin check your own repository permissions before it acts for you. Drafting fixes in Bitbucket repositories isn’t available yet; when it is, Odin will check the linked account first. Linking does not change how you sign in. An account can be linked to one Odin user. Disconnecting keeps it reserved to you, so nobody else can link it.

Using Bitbucket for pentests

Once Bitbucket is connected, it becomes a source option when you set up a pentest run. On the source step of the pentest setup wizard, pick a repository (grouped by workspace) and the branch Odin reads. When more than one source-control provider is connected, the wizard shows a provider toggle so you can choose which one this run uses. With only Bitbucket connected, the wizard goes straight to the Bitbucket repository picker.

PR Reviews

Switch PR reviews on per repository from the PR Reviews page, under PR Reviews · Bitbucket. Odin then:
  1. Adds a signed webhook to the repository for pull request events.
  2. Reviews each new commit on an open pull request and posts findings as inline comments. Findings outside the changed lines are posted as general comments that name the file and line.
  3. Posts an Odin security review build status on the head commit, which fails when findings at or above your blocking severity are found. Add it as a required build in your branch restrictions to block merges.
  4. Keeps one summary comment on the pull request up to date.
Switching PR reviews off for a repository removes the webhook. Pull requests from forks are not reviewed.

Linking pull requests to findings and retests

Mention a finding’s identifier (for example ACME-42) in a pull request’s source branch name, title or description, and Odin links the pull request to that finding. A reported finding moves to Fixing when it is linked. Turn on Automatic retests on the Bitbucket integration to have Odin retest linked findings when the pull request is merged. Linking needs the repository webhook, so it works in repositories with PR reviews switched on.

Permissions

Odin requests these Bitbucket scopes: Odin never uses repository write access to push code. Access tokens are stored encrypted in Google Secret Manager, last two hours, and are refreshed automatically.

Notes

  • Bitbucket is a source-code connection for whitebox pentests, PR reviews and retests. It does not track findings as issues. To sync findings into a tracker, connect Jira, Linear or another tracker alongside Bitbucket.