Adding a bunch of new rules, update allowlist to include node_modules… (#896)

* Adding a bunch of new rules, update allowlist to include node_modules and vendor folders, extend helper config functions

* use func instead of function in stopwords
This commit is contained in:
Zachary Rice authored and GitHub committed 2022-06-25 11:43:51 -05:00
1 parent d196b83ca6
commit 73a3cf8afb
33 files changed
+1243 -25

No files matched your search

+27
View File
@@ -0,0 +1,27 @@
package rules
import (
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
"github.com/zricethezav/gitleaks/v8/config"
)
func RapidAPIAccessToken() *config.Rule {
// define rule
r := config.Rule{
RuleID: "rapidapi-access-token",
Description: "RapidAPI Access Token",
Regex: generateSemiGenericRegex([]string{"rapidapi"},
alphaNumericExtendedShort("50")),
SecretGroup: 1,
Keywords: []string{
"rapidapi",
},
}
// validate
tps := []string{
generateSampleSecret("rapidapi",
secrets.NewSecret(alphaNumericExtendedShort("50"))),
}
return validate(r, tps, nil)
}