HubSpot API Key

ID

hubspot_apikey

Severity

low

Vendor

HubSpot

Family

API Token

Description

HubSpot is a CRM platform that connects everything scaling companies need to deliver a best-in-class customer experience into one place.

They provide an API to handle settings management.

Security

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

Accidentally checking-in the token to source control repositories could compromise your HubSpot account.

Examples

var options = {
  method: 'POST',
  url: 'https://api.hubapi.com/crm/v3/objects/contacts',
  qs: { hapikey: '1816e278-334f-4911-b0e1-2f6f3898c900' }
}

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 your HubSpot dashboard. See Regenerating an API Key.

  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.