Salesforce Oauth2 Keys

ID

salesforce_oauth2

Severity

low

Vendor

Salesforce

Family

API Token

Description

Salesforce provides customer relationship management software and applications focused on sales, customer service, marketing automation, analytics, and application development.

The OAuth credentials are used to get access tokens which may be used to authenticate with the APIs to make requests on behalf of the users.

Security

Any hardcoded Salesforce Key is a potential secret reported by this detector.

Accidentally checking-in the keys to source control repositories could compromise your Salesforce account.

Examples

client_id=3MVG9vtNU9U6t8pXICEq7ksI8G5MrQbQ2Z.tS70ggC49VUHytoh3DQ3PVX2gCOKIXRqpgbW5JH6kK45Rr5XXCa4f

Mitigation / Fix

  1. Remove the Key from the source code or committed configuration file.

  2. Follow your policy for handling leaked secrets, which typically require revoking the secret in the target system(s). API Key revocation can be handled from the App Manager.

  3. If under a git repository, you may remove unwanted files from the repository history using tools like git filter-repo or BFG 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.