coinbase.go 694 B

1234567891011121314151617181920212223242526
  1. package rules
  2. import (
  3. "github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
  4. "github.com/zricethezav/gitleaks/v8/config"
  5. )
  6. func CoinbaseAccessToken() *config.Rule {
  7. // define rule
  8. r := config.Rule{
  9. RuleID: "coinbase-access-token",
  10. Description: "Detected a Coinbase Access Token, posing a risk of unauthorized access to cryptocurrency accounts and financial transactions.",
  11. Regex: generateSemiGenericRegex([]string{"coinbase"},
  12. alphaNumericExtendedShort("64"), true),
  13. Keywords: []string{
  14. "coinbase",
  15. },
  16. }
  17. // validate
  18. tps := []string{
  19. generateSampleSecret("coinbase",
  20. secrets.NewSecret(alphaNumericExtendedShort("64"))),
  21. }
  22. return validate(r, tps, nil)
  23. }