frameio.go 720 B

12345678910111213141516171819202122
  1. package rules
  2. import (
  3. "github.com/zricethezav/gitleaks/v8/cmd/generate/config/utils"
  4. "github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
  5. "github.com/zricethezav/gitleaks/v8/config"
  6. "github.com/zricethezav/gitleaks/v8/regexp"
  7. )
  8. func FrameIO() *config.Rule {
  9. // define rule
  10. r := config.Rule{
  11. Description: "Found a Frame.io API token, potentially compromising video collaboration and project management.",
  12. RuleID: "frameio-api-token",
  13. Regex: regexp.MustCompile(`fio-u-(?i)[a-z0-9\-_=]{64}`),
  14. Keywords: []string{"fio-u-"},
  15. }
  16. // validate
  17. tps := utils.GenerateSampleSecrets("frameio", "fio-u-"+secrets.NewSecret(utils.AlphaNumericExtended("64")))
  18. return utils.Validate(r, tps, nil)
  19. }