Fix guide · critical · hubspot_api_key
HubSpot API key in your client bundle
What this rule means
A string matching pat-na1-* / pat-eu1-* / pat-na2-* UUID-shaped was found in your deployed JavaScript.
Why it matters
Read/write access to your CRM, contacts, deals, marketing emails. Attackers can exfiltrate customer lists or send mail from your HubSpot. Automated scrapers harvest these keys from public bundles within hours; assume the key is compromised the moment it shipped.
How to fix it
- Revoke the key immediately at https://app.hubspot.com/private-apps/.
- Move the new key to server-only env vars. Never use a name with the
NEXT_PUBLIC_,VITE_, orPUBLIC_prefix. - Pattern your calls as client → your API → HubSpot. Never client → HubSpot directly.
- Set a spend or rate limit in the HubSpot console as a safety net.
- Add a CI gate to fail any future deploy that includes the key pattern:
vibecheck https://your-deploy.com --exit-on critical.
Did vibecheck flag this on your app?
If you reached this page from a vibecheck inspection report, the redacted match in your scan output is the exact string we found in your bundle. After applying the fix above, run the inspection again — the finding should clear.
Run another inspection