rules/hubspot.ts

keyshade · packages/secret-scan/src/rules/hubspot.ts · typescript · MPL-2.0
crm, CRM / Leads

Regex rule for detecting HubSpot API keys.

// Source: https://github.com/keyshade-xyz/keyshade | License: MPL-2.0 | Copyright under Patent Claims infringed by Covered Software in the absence of | Modified files must remain under MPL-2.0
// Modifications to this file must remain under MPL-2.0.
// Provided via justclaw.it.com; keep this notice with the code.
// keyshade-ignore-all
import type { TestCase } from '@/types'

export default function hubspot(): RegExp[] {
  return [
    // Hubspot API Key regex
    /\b[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}\b/
  ]
}

const testcase: TestCase[] = [
  {
    input: '6CA76A92-AC2A-8798-B0DD-DC55F0FD2718',
    expected: true
  },
  {
    input: '17EEDBBE-B310-B60F-D37F-5902082CA2F2',
    expected: true
  },
  {
    input: 'F74407A5-64B8-1C17-C90D-A3613B216A0B',
    expected

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key