‹tool› stores a login token in plain text (‹path›)
What this means
‹path› holds ‹plaintext tokens› login token(s) for ‹tool›, written out in full. Anything that can read your home folder, a backup, or a package install script that goes looking can copy them and act as you on that service.
How to fix it
Move the token into your system keychain, then delete it from the file and revoke the old one.
GitHub CLI: run
gh auth logoutandgh auth loginon a machine with a keyring (secret-service, macOS Keychain or Windows Credential Manager) so the token is not written to hosts.yml.Cargo: set
global-credential-providers = ["cargo:libsecret"](or “cargo:macos-keychain”, “cargo:wincred”) in ~/.cargo/config.toml, thencargo loginagain.Terraform: use a credentials helper, or set TF_TOKEN_<host> from your password manager instead of credentials.tfrc.json.
RubyGems: pass the key through GEM_HOST_API_KEY from your password manager when publishing.
Composer: provide auth through the COMPOSER_AUTH environment variable from your password manager.
netrc: use your tool's credential helper (for Git, a keychain-backed helper) instead of passwords in .netrc.
Check it yourself
Run a scan and look for BLWK-CRED-009 in the results:
bulwark scanInstalled the standalone CLI package instead of the app? The command is bulwarkctl.
How Bulwark decides
Bulwark reads credential_stores and reports this check when:
kind in ["gh_hosts", "cargo_credentials", "terraform_credentials", "gem_credentials", "composer_auth", "netrc"] and plaintext_tokens > 0If a value can't be read, Bulwark reports the check as undetermined rather than passing it. View the rule source.
References
Related checks
- A long-lived AWS access key is stored on disk ·
BLWK-CRED-001 - Git stores passwords and tokens in plain text (‹path›) ·
BLWK-CRED-002 - Docker registry logins are stored in the config file ·
BLWK-CRED-003 - A credential file can be read by other users ·
BLWK-CRED-004 - Secrets are written into a shell startup file (‹path›) ·
BLWK-CRED-005 - An npm token is stored in plain text (‹path›) ·
BLWK-CRED-006