Skip to main content
CriticalSecretsOWASP A07:2021CWE-798

How to fix: Bitbucket app password in source

Bitbucket app passwords (with associated username) grant repo, project, and account API access. Easy to misuse because they look like strings.

Why it matters

A Bitbucket app password combined with the account username grants API-level access to repositories, pipelines, and project settings, allowing an attacker to clone private repos, push malicious commits, or modify CI/CD variables to inject backdoors.

Bitbucket app passwords (with associated username) grant repo, project, and account API access. Easy to misuse because they look like strings.

How to fix it

  1. 1Revoke the app password at Bitbucket Settings → App passwords
  2. 2Migrate to repository access tokens with expiry dates and minimum required permissions
  3. 3For CI/CD, use Bitbucket Pipelines' built-in BITBUCKET_REPO_FULL_NAME and step credentials

Code examples

Repository access token (preferred over app passwords)

bash
# Revoke the exposed app password at:
# https://bitbucket.org/account/settings/app-passwords/

# For CI/CD, use Pipelines-provided variables instead:
# BITBUCKET_REPO_FULL_NAME, BITBUCKET_BUILD_NUMBER, etc.
# Store secrets in: Repository Settings → Repository variables (masked)

References

Detected automatically by VulnRadar. The check id is secret-bitbucket-app-password, stable across every scan so you can filter or diff on it.

See every secrets check

Questions

How severe is Bitbucket app password in source?
VulnRadar rates this critical severity in the secrets category. The severity is fixed per check, not scored per site, so the same finding is the same severity on every scan.
Does VulnRadar check for this automatically?
Yes. It runs as part of every scan under the check id secret-bitbucket-app-password, which stays the same between runs so you can filter, diff, or gate CI on it.
Which standards does Bitbucket app password in source map to?
It maps to CWE-798. In the OWASP Top 10 it falls under A07:2021.

Missing a check?

The detection set is open. If you know a misconfiguration this does not catch, propose it: the issue template asks for the threat model, how to detect it, the false-positive risk, and a test fixture, which is the same thing a maintainer would have to work out anyway.

Propose a checkHow a check is built

Scan your own site for bitbucket app password in source

VulnRadar runs this check and hundreds more against a URL in seconds. No agent to install, just paste a URL.

Or scan this site as a demoRead the docs

How to fix: Bitbucket app password in source | VulnRadar