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.
Install the Odin by Borg app (recommended)
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).
Link your own Bitbucket account
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:- Adds a signed webhook to the repository for pull request events.
- 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.
- 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.
- Keeps one summary comment on the pull request up to date.
Linking pull requests to findings and retests
Mention a finding’s identifier (for exampleACME-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.