hubspot.go 535 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: "HubSpot API Token",
  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}`),
  12. SecretGroup: 1,
  13. Keywords: []string{"hubspot"},
  14. }
  15. // validate
  16. tps := []string{
  17. `const hubspotKey = "12345678-ABCD-ABCD-ABCD-1234567890AB"`, // gitleaks:allow
  18. }
  19. return validate(r, tps, nil)
  20. }