fastly.go 564 B

1234567891011121314151617181920212223
  1. package rules
  2. import (
  3. "github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
  4. "github.com/zricethezav/gitleaks/v8/config"
  5. )
  6. func FastlyAPIToken() *config.Rule {
  7. // define rule
  8. r := config.Rule{
  9. Description: "Fastly API key",
  10. RuleID: "fastly-api-token",
  11. Regex: generateSemiGenericRegex([]string{"fastly"}, alphaNumericExtended("32")),
  12. SecretGroup: 1,
  13. Keywords: []string{"fastly"},
  14. }
  15. // validate
  16. tps := []string{
  17. generateSampleSecret("fastly", secrets.NewSecret(alphaNumericExtended("32"))),
  18. }
  19. return validate(r, tps, nil)
  20. }