/ Docs

Bitbucket

Last updated October 13, 2025 · View as Markdown

Bitbucket_Logo.png Bitbucket is a Git-based code and CI/CD tool optimized for teams using Jira. It is used to build and test software projects hosted on Atlassian Bitbucket.

In order to integrate Bitbucket with Relyance AI you will need a Key, Secret, and to follow an OAuth2 flow.

In order to integrate the Source Code Inspector with Bitbucket, please see Bitbucket Pipelines.

In Bitbucket:

Bitbucket-3.png

  1. Login to your Bitbucket account.

  2. Ensure you're on the Bitbucket dashboard.

  3. Click on your profile icon on the top right-side of the page.

  4. From the dropdown either select All Workspaces and select the relevant workspace or select your workspace from the RECENT WORKSPACES section.

  5. Select Settings from the left-hand navigation menu. This will open up the workspace settings pages.

  6. Select OAuth consumers from the left-hand navigation menu.

  7. Click the Add consumer button.

  8. Fill out the resulting page with these values: Name: Provide a meaningful name (e.g. Relyance Scan) Callback URL: https://root.relyance.ai/api/oauth2 Permissions:

  9. Click Save.

  10. This will bring you back to your OAuth consumers page. Expand the consumer list item to see the Key and Secret. Copy these to be used in Relyance.

Bitbucket-4.png

In the Relyance AI application:

  1. Login to your Relyance account.
  2. Navigate to the Settings Menu in the bottom left-hand side.
  3. Select Integrations.
  4. Click on the Vendor Integration tab.
  5. Find the Bitbucket integration card and click it to open its connections.
  6. Under Authentication Method, choose Oauth2 / App Token.
  7. Paste the Key and Secret into their respective fields.

Bitbucket-1.png

The Authentication step asks for:

  • Key: required.
  • Secret: required; held as a secret.
  1. Click Authenticate.
  2. This will bring you to authorize your Relyance instance with Bitbucket. Click Grant Access. You will then be redirected back to Relyance.

Bitbucket-5.png

  1. At this point, you should see the following result on the Vendor Integrations page:

Bitbucket-2.png

  1. Congratulations, you are now connected to Bitbucket.

If the connection reports Connected but returns nothing

These are the ways this integration comes back empty without reporting an error. Generated from the integration catalog, so it tracks what the connection actually asks for.

  1. Authorised, then empty. The connection carries an authorisation, not a password: it stops returning data if the account that granted it loses access, its own permissions narrow, or the grant is revoked at the vendor. None of that reports an error here -- the connection keeps its last status until the next scan.
  2. A credential rotated at the vendor is not picked up here. Secret is stored when you save the connection, so regenerating the value at the vendor breaks the next scan until it is re-pasted here. Recording the expiry on the connection means Relyance warns you before it lapses.

Manage this integration with Terraform

Connections for this integration can be managed as code with the Relyance Terraform provider. Non-secret fields go in auth.params; secret fields go in auth.secrets_wo, which is write-only — never stored in Terraform state. Rotate secrets by bumping auth.secrets_wo_version.

The OAuth (browser authorization) method uses a browser authorization flow, so the connection is created in the Relyance app. Manage it in Terraform afterwards by importing it (terraform import relyance_integration_connection.example atlassian_bitbucket/<connection_id>) or reading it with the relyance_integration_connection data source.