Digital Ocean OAuth Client Secret
ID |
digital_ocean_oauth_key |
Severity |
critical |
Vendor |
Digital Ocean |
Family |
API Token |
Description
DigitalOcean is a cloud infrastructure provider which provides developers, startups, and SMBs with cloud infrastructure-as-a-service platforms.
It provides an API to programmatically access its products and services where a user can manage all the features available in the control panel.
This detector looks for OAuth2 authentication credentials with a client id and secret.
Security
Any hardcoded Digital Ocean OAuth credential is a potential secret reported by this detector.
Accidentally checking-in the key to source control repositories could compromise your Digital Ocean account.
The Digital Ocean Dashboard provides a list of all actions (login, resource creation and deletion) that happened in the last 12 months. This can be accessed from the My Profile/Security section of the dashboard.
Examples
DIGITALOCEAN_CLIENT_SECRET="K8pfQHIMpqZ42g0kdDR0FwMm3siVdamNMZ7ih9xnq7d73p90TRkdDR0FwMm3siVd"
Mitigation / Fix
-
Remove the credential from the source code or committed configuration file.
-
Follow your policy for handling leaked secrets, which typically require revoking the secret in the target system(s). Go to your dashboard to revoke the credential.
-
If under a git repository, you may remove unwanted files from the repository history using tools like
git filter-repo
orBFG Repo-Cleaner
. You may follow the procedure listed here for GitHub.
You should consider any sensitive data in commits with secrets as compromised. Remember that secrets may be removed from history in your projects, but not in other users' cloned or forked repositories. |