Skip to main content

Overview

OpenSRE queries Bitbucket to retrieve recent commits, file contents, and code search results — helping trace which change in a Bitbucket-hosted repository triggered an incident. All operations are read-only.

Prerequisites

  • Bitbucket Cloud account
  • App password with repository read access
  • Workspace slug (the identifier in https://bitbucket.org/<workspace>/)

Setup

Bitbucket is configured through environment variables or the persistent integration store. There is no dedicated opensre integrations setup bitbucket wizard today.

Option 1: Environment variables

Add to your .env:

Option 2: Persistent store

Credentials

Creating an app password

  1. In Bitbucket, go to Personal settingsApp passwords
  2. Click Create app password
  3. Give it a label (for example opensre)
  4. Enable the following permissions: Repositories: Read
  5. Copy the generated password
The workspace slug is the identifier in your Bitbucket URL: https://bitbucket.org/<workspace>/
Auth uses HTTP Basic with username + app password.

Investigation tools

Verify

Expected output:

Troubleshooting

Security

  • Use an app password rather than your account password — app passwords can be revoked individually.
  • Scope permissions to Repositories: Read only.
  • Store credentials in .env, not in source code.