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

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