Configure Bitbucket Posting User

The service interfaces with users in Bitbucket projects through a "HackerOne" member of your Bitbucket team. So a Bitbucket user must be created and configured as a Posting or Service user.

Prerequisites

The Bitbucket posting user must be created by an individual on your team with the following administrative permissions:

Create Posting User

Log in to your Bitbucket instance as an administrator and create a new user with the username PullRequest or HackerOne. HackerOne Code will use this user to post scan results and validated issues.

Add the user to all of the repositories you want code review on. Be sure to grant the user WRITE permission so it's able to post comments.

***We strongly recommend adding the following image as the posting user's avatar. This provides a much better end-user experience; it allows the service to be easily identified in the Bitbucket interface:

Apply Bitbucket Access Token

Log in to Bitbucket as the user you just created.

This may be easier in another browser or an incognito tab so you can remain logged in as the Bitbucket admin user.

Create a personal access token for the posting user in Bitbucket by opening https://our-bitbucket.internal/plugins/servlet/access-tokens/manage in the browser you were logged into as the PullRequest user.

The access token will need to have Projects READ and Repositories WRITE permissions.

Creating a personal access token in Bitbucket

Once generated, copy the personal access token to your clipboard so we can configure the connection to Bitbucket.

Connecting PullRequest Proxy to Bitbucket

Now, it's time to return to that text file we're editing on the proxy server. Go ahead and set the following keys based on what was configured above.

PROVIDER_TYPE=bitbucket
PROVIDER_BASE_URL=https://our-bitbucket.internal
PROVIDER_USERNAME=PullRequest
PROVIDER_ACCESS_TOKEN=<access_token>

Last updated