hubspot.go 605 B

1234567891011121314151617181920212223
  1. package rules
  2. import (
  3. "github.com/zricethezav/gitleaks/v8/config"
  4. )
  5. func HubSpot() *config.Rule {
  6. // define rule
  7. r := config.Rule{
  8. Description: "Found a HubSpot API Token, posing a risk to CRM data integrity and unauthorized marketing operations.",
  9. RuleID: "hubspot-api-key",
  10. Regex: generateSemiGenericRegex([]string{"hubspot"},
  11. `[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}`, true),
  12. Keywords: []string{"hubspot"},
  13. }
  14. // validate
  15. tps := []string{
  16. `const hubspotKey = "12345678-ABCD-ABCD-ABCD-1234567890AB"`, // gitleaks:allow
  17. }
  18. return validate(r, tps, nil)
  19. }