How to fix: DigitalOcean PAT in source
dop_v1_* tokens allow full control over droplets, databases, spaces, and Kubernetes clusters.
Why it matters
An exposed DigitalOcean PAT gives an attacker full API access to your entire DigitalOcean account, including creating and deleting Droplets, accessing managed databases, reading Spaces object storage, and controlling Kubernetes clusters.
dop_v1_* tokens allow full control over droplets, databases, spaces, and Kubernetes clusters.
How to fix it
- 1Revoke immediately: DigitalOcean control panel → API → Tokens → Revoke
- 2Generate a new token with read/write scopes limited to required services
- 3Store the new token in a secrets manager, not in environment variables
Code examples
Revoke via DigitalOcean API
# Check what the token has access to
curl -X GET 'https://api.digitalocean.com/v2/account' \
-H 'Authorization: Bearer YOUR_TOKEN'
# Revoke at the control panel (no API endpoint for self-revocation):
# https://cloud.digitalocean.com/account/api/tokensReferences
Detected automatically by VulnRadar. The check id is secret-digitalocean-pat, stable across every scan so you can filter or diff on it.
More secrets checks
Questions
- How severe is DigitalOcean PAT 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-digitalocean-pat, which stays the same between runs so you can filter, diff, or gate CI on it.
- Which standards does DigitalOcean PAT 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.