Scanner deep dive
Bitbucket
The Bitbucket integration scans repositories in Bitbucket Cloud, Server, and Data Center for credentials and other sensitive data.
Use cases and coverage
Scanning use cases
Review a repository before a workspace transfer
Select the repositories being transferred and scan their commit history for credentials in deployment files.
Check an old release archive
Include the repository containing the archive and keep archive scanning enabled. Review matches in the committed package with the release owner.
Related incidentStolen credentials gave access to Cloudflare’s Atlassian systems · Service accessed
November 2023 · Service accessed
Stolen credentials gave access to Cloudflare’s Atlassian systems
Cloudflare reported that stolen credentials gave an intruder access to its Jira tickets, Confluence wiki and Bitbucket repositories. Responders checked tickets and code for secrets and removed network captures from the wiki as a precaution.
How this relates to Bitbucket
Cloudflare reviewed the affected repositories and rotated encrypted secrets found in some of them. Scope the repository review to the projects involved. The initial stolen credentials came from an earlier compromise.
Review Bitbucket scan scopeCloudflare report · Incident timeline, November 15 and November 22, and the Code Red review
Source check
Atlas AI-assisted source check · 2026-11-22. The publisher describes the event or study. The Atlas explains its relevance to this connector. Detection depends on the scan scope and detectors in use.
What it covers
Compare in matrixWhat the docs page’s Capabilities table says, sorted into what the source reaches, how deep it reads and how it runs. Hatched segments and dashes are capabilities the page doesn’t mention. Select ⓘ for what each one means.
- repositories
- commit history
Also reads binary files, archive files.
What it reaches
2 supported · 2 not documented
- History✓
- Archived repositories✓
- Comments–
- Attachments–
How deep it reads
3 supported · 1 not documented
- Archives✓
- Binaries✓
- Base64✓
- Office docs–
How it runs
2 supported · 2 qualified · 2 not documented
- Filters✓
- Pre-commitCLI hook
- Pre-receiveCLI hook
- Auto-resume✓
- Real-time–
- In CI–
Limits
Caveats the docs page states, like size caps or content it skips.
- Diffs larger than 1 GB are not scanned.
- Auto-detects Bitbucket Cloud vs Data Center by default. Set installationType if detection fails against Data Center.
- Workspace Access Tokens require Bitbucket Cloud Premium. Without Premium, use an Atlassian API token (ATAT prefix).
- Project Access Tokens, Repository Access Tokens and user API tokens do not work as a Workspace Access Token. Enumeration fails or returns nothing.
- Existing app-password configs keep working, but Atlassian is deprecating app passwords for Cloud. Plan to move to API tokens.
- A repository whose refs conflict on disk during clone is skipped; the rest of the scan continues.
What TruffleHog documents
- Integration guide
On Bitbucket Cloud, the guide recommends a Workspace Access Token, which requires Cloud Premium; otherwise use an Atlassian API token. For Data Center using OAuth, an administrator creates an application link with repository read access and obtains a refresh token during setup.
Read the Bitbucket integration guide
Sources checked .
Scan setup and permissions
Set it up
Enterprise paths come from Truffle’s public docs.
Web interface or local configuration
- 1Identify Bitbucket Cloud or Server/Data Center and list the repositories in scope.
- 2On Cloud with Premium, create a Workspace Access Token under Workspace settings → Access tokens with read:repository:bitbucket and read:workspace:bitbucket. Without Premium, create an Atlassian API token (ATAT prefix) with the same scopes and pair it with the account email.
- 3On Server or Data Center, use a scanner account with basic auth, an Atlassian API token, or OAuth. For OAuth, an administrator creates an incoming application link with repository read access, then generates the refresh token with the guide’s helper script.
Suggested contact (Atlas suggestion) · Bitbucket workspace or instance administrator
Suggested first check (Atlas suggestion) · Check that the chosen credential can enumerate a named pilot repository. An empty list on Cloud usually means the wrong token type.
Setup reference checked 2026-11-24 · Local configuration, Bitbucket Cloud with Workspace Access Token, Bitbucket Cloud / Data Center with API Token, Bitbucket Data Center OAuth setup, Troubleshooting
In the web UI
- Configure from the Integrations page in TruffleHog
Config file options (10)
Options for sources.Bitbucket in a local YAML config. Required fields come first.
All 10 config options0 required
| Field | What it does | Type |
|---|---|---|
endpointDepends | Endpoint URI for Bitbucket. Required for basic auth and OAuth modes. | string |
oauthAuthorizationEndpointDepends | OAuth authorization endpoint for Bitbucket Data Center. Required for OAuth mode. | string |
oauthTokenEndpointDepends | OAuth token endpoint for Bitbucket Data Center. Required for OAuth mode. | string |
oauthScopesDepends | OAuth scopes for the access token, typically REPO_READ only. Required for OAuth mode. | list |
repositories | Explicit list of repositories to scan. Omit to enumerate instead. | list |
ignoreRepos | Repositories to skip during scanning. Typically used with enumeration. | list |
skipBinaries | Skip binary files. | boolean |
skipArchives | Skip archive files. | boolean |
installationType | One of autodetect, CLOUD, or DATA_CENTER. Override when autodetection fails against Data Center.Default autodetect. | string |
allowSecretsManagerWrite | Let TruffleHog overwrite its config secret to keep the OAuth refresh token current. AWS Secrets Manager only. | boolean |
Access
How the scanner authenticates and what it’s allowed to read. Write access is highlighted.
Read-only by default. Optional write: secretsmanager:PutSecretValue.
Auth methods
- Workspace Access Token (Cloud)
- API token (Cloud, Server and Data Center)
- basic auth (Server and Data Center)
- OAuth (Server and Data Center)
Cloud Workspace Access Token
2 permissionsread:repository:bitbucketread accessread:workspace:bitbucketread access
Atlassian API token
2 permissionsread:repository:bitbucketread accessread:workspace:bitbucketread access
Data Center OAuth
1 permissionREPO_READrepository read access
Permissions
1 permission · 1 optional writesecretsmanager:PutSecretValueOptionalwrite, only if allowSecretsManagerWrite is on
Before you start
- Git
- rpm2cpio
- binutils
- cpio
If Bitbucket keys leak
The credentials you give this connector are secrets too. These detectors find Bitbucket keys anywhere TruffleHog scans, not only inside Bitbucket.
Provider docs
The provider’s own pages for setting this up. Checked 2026-11-25.
- Workspace access tokens · Atlassian. Creating the Cloud Workspace Access Token the source signs in with.
- Workspace access token permissions · Atlassian. What the read:repository and read:workspace scopes allow.
- Using API tokens (Bitbucket Cloud) · Atlassian. The Atlassian API token option.
- Manage API tokens for your Atlassian account · Atlassian. Creating and revoking Atlassian API tokens.
Recent changes
From TruffleHog’s release notes, after review. Tags show whether each change is in Enterprise, open source, or both.
4 release-note items mention this connector. The Atlas hasn’t checked them yet, so they aren’t listed here. See all release notes
Sources and related tools
Evidence
Possible issue in Truffle’s docs
- The page names the API token mode inconsistently: the mode list says Server / Data Center, the section heading says Cloud / Data Center, and its example uses a bitbucket.org endpoint. The migration note and Troubleshooting refer to a "Bitbucket Cloud with basic auth" section and a basic auth block that the page does not have; the API token example uses an apiToken block.
- The Capabilities table lists Pre-commit and Pre-receive. These are hooks run with the TruffleHog CLI in a Git workflow, not features of the Enterprise source integration.
- The Notes say existing app-password configurations continue to work. Atlassian said all remaining Bitbucket Cloud app passwords would be permanently disabled on 9 Jun 2026 (https://www.atlassian.com/blog/bitbucket/bitbucket-cloud-enters-phase-2-of-app-password-deprecation, read 2026-11-24).
Shown here as the docs state it. All docs issues.
Docs scraped 2026-11-17. Each docs page was fetched with Firecrawl twice (an overview pass and a detail pass for capabilities, options, permissions and notes) and read by an extraction prompt. Descriptions are short paraphrases. Open-source CLI facts are parsed from main.go at the pinned TruffleHog commit. Not reviewed by a person. Pinned commit ffdee00. Check the source before quoting a detail, or review this connector so the badge says so.
- Source docs pageUpdated 14 Oct 2026
- Sources indexStatus, edition, deployment
- Category grouping