heroku.go 563 B

12345678910111213141516171819202122
  1. package rules
  2. import (
  3. "github.com/zricethezav/gitleaks/v8/config"
  4. )
  5. func Heroku() *config.Rule {
  6. // define rule
  7. r := config.Rule{
  8. Description: "Detected a Heroku API Key, potentially compromising cloud application deployments and operational security.",
  9. RuleID: "heroku-api-key",
  10. Regex: generateSemiGenericRegex([]string{"heroku"}, hex8_4_4_4_12(), true),
  11. Keywords: []string{"heroku"},
  12. }
  13. // validate
  14. tps := []string{
  15. `const HEROKU_KEY = "12345678-ABCD-ABCD-ABCD-1234567890AB"`, // gitleaks:allow
  16. }
  17. return validate(r, tps, nil)
  18. }