fastly.go 662 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: "Uncovered a Fastly API key, which may compromise CDN and edge cloud services, leading to content delivery and security issues.",
  10. RuleID: "fastly-api-token",
  11. Regex: generateSemiGenericRegex([]string{"fastly"}, alphaNumericExtended("32"), true),
  12. Keywords: []string{"fastly"},
  13. }
  14. // validate
  15. tps := []string{
  16. generateSampleSecret("fastly", secrets.NewSecret(alphaNumericExtended("32"))),
  17. }
  18. return validate(r, tps, nil)
  19. }