maxmind.go 618 B

123456789101112131415161718192021
  1. package rules
  2. import (
  3. "github.com/zricethezav/gitleaks/v8/cmd/generate/config/utils"
  4. "github.com/zricethezav/gitleaks/v8/config"
  5. )
  6. func MaxMindLicenseKey() *config.Rule {
  7. // define rule
  8. r := config.Rule{
  9. RuleID: "maxmind-license-key",
  10. Description: "Discovered a potential MaxMind license key.",
  11. Regex: utils.GenerateUniqueTokenRegex(`[A-Za-z0-9]{6}_[A-Za-z0-9]{29}_mmk`, false),
  12. Entropy: 4,
  13. Keywords: []string{"_mmk"},
  14. }
  15. // validate
  16. tps := utils.GenerateSampleSecrets("maxmind", `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`) // gitleaks:allow
  17. return utils.Validate(r, tps, nil)
  18. }