finicity.go 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  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. )
  7. func FinicityClientSecret() *config.Rule {
  8. // define rule
  9. r := config.Rule{
  10. Description: "Identified a Finicity Client Secret, which could lead to compromised financial service integrations and data breaches.",
  11. RuleID: "finicity-client-secret",
  12. Regex: utils.GenerateSemiGenericRegex([]string{"finicity"}, utils.AlphaNumeric("20"), true),
  13. Keywords: []string{"finicity"},
  14. }
  15. // validate
  16. tps := utils.GenerateSampleSecrets("finicity", secrets.NewSecret(utils.AlphaNumeric("20")))
  17. return utils.Validate(r, tps, nil)
  18. }
  19. func FinicityAPIToken() *config.Rule {
  20. // define rule
  21. r := config.Rule{
  22. Description: "Detected a Finicity API token, potentially risking financial data access and unauthorized financial operations.",
  23. RuleID: "finicity-api-token",
  24. Regex: utils.GenerateSemiGenericRegex([]string{"finicity"}, utils.Hex("32"), true),
  25. Keywords: []string{"finicity"},
  26. }
  27. // validate
  28. tps := utils.GenerateSampleSecrets("finicity", secrets.NewSecret(utils.Hex("32")))
  29. return utils.Validate(r, tps, nil)
  30. }