mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-30 21:24:21 +01:00
Make config generation utils public (#1480)
* chore(generate): make utils public * chore(generate): change validate log messages * chore(generate): split functions into files * chore(config): add warning for public funcs
This commit is contained in:
1 parent
3be7faa1ff
commit
bd81872eee
114 files changed
+862
-713
No files matched your search
@@ -1,6 +1,7 @@
|
||||
package rules
|
||||
|
||||
import (
|
||||
"github.com/zricethezav/gitleaks/v8/cmd/generate/config/utils"
|
||||
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||
"github.com/zricethezav/gitleaks/v8/config"
|
||||
)
|
||||
@@ -10,7 +11,7 @@ func CodecovAccessToken() *config.Rule {
|
||||
r := config.Rule{
|
||||
RuleID: "codecov-access-token",
|
||||
Description: "Found a pattern resembling a Codecov Access Token, posing a risk of unauthorized access to code coverage reports and sensitive data.",
|
||||
Regex: generateSemiGenericRegex([]string{"codecov"}, alphaNumeric("32"), true),
|
||||
Regex: utils.GenerateSemiGenericRegex([]string{"codecov"}, utils.AlphaNumeric("32"), true),
|
||||
Keywords: []string{
|
||||
"codecov",
|
||||
},
|
||||
@@ -18,7 +19,7 @@ func CodecovAccessToken() *config.Rule {
|
||||
|
||||
// validate
|
||||
tps := []string{
|
||||
generateSampleSecret("codecov", secrets.NewSecret(alphaNumeric("32"))),
|
||||
utils.GenerateSampleSecret("codecov", secrets.NewSecret(utils.AlphaNumeric("32"))),
|
||||
}
|
||||
return validate(r, tps, nil)
|
||||
return utils.Validate(r, tps, nil)
|
||||
}
|
||||
Reference in new issue
Block a user