finnhub.go 636 B

12345678910111213141516171819202122232425
  1. package rules
  2. import (
  3. "github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
  4. "github.com/zricethezav/gitleaks/v8/config"
  5. )
  6. func FinnhubAccessToken() *config.Rule {
  7. // define rule
  8. r := config.Rule{
  9. RuleID: "finnhub-access-token",
  10. Description: "Found a Finnhub Access Token, risking unauthorized access to financial market data and analytics.",
  11. Regex: generateSemiGenericRegex([]string{"finnhub"}, alphaNumeric("20"), true),
  12. Keywords: []string{
  13. "finnhub",
  14. },
  15. }
  16. // validate
  17. tps := []string{
  18. generateSampleSecret("finnhub", secrets.NewSecret(alphaNumeric("20"))),
  19. }
  20. return validate(r, tps, nil)
  21. }