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 dedicatedopensre integrations setup bitbucket wizard today.
Option 1: Environment variables
Add to your.env:
Option 2: Persistent store
Credentials
Creating an app password
- In Bitbucket, go to Personal settings → App passwords
- Click Create app password
- Give it a label (for example
opensre) - Enable the following permissions: Repositories: Read
- Copy the generated password
The workspace slug is the identifier in your Bitbucket URL:
https://bitbucket.org/<workspace>/Investigation tools
Verify
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.