mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-12-01 05:24:22 +01:00
More rule fixes (#1586)
* feat: tweak more rules * fix(curl): update pattern & ignore more stuff * chore: update .gitleaksignore
This commit is contained in:
1 parent
5407c44e0c
commit
455ae0aab7
47 files changed
+531
-374
No files matched your search
@@ -11,8 +11,8 @@ func Prefect() *config.Rule {
|
||||
r := config.Rule{
|
||||
RuleID: "prefect-api-token",
|
||||
Description: "Detected a Prefect API token, risking unauthorized access to workflow management and automation services.",
|
||||
Regex: utils.GenerateUniqueTokenRegex(`pnu_[a-z0-9]{36}`, true),
|
||||
|
||||
Regex: utils.GenerateUniqueTokenRegex(`pnu_[a-zA-Z0-9]{36}`, false),
|
||||
Entropy: 2,
|
||||
Keywords: []string{
|
||||
"pnu_",
|
||||
},
|
||||
@@ -22,5 +22,8 @@ func Prefect() *config.Rule {
|
||||
tps := []string{
|
||||
utils.GenerateSampleSecret("api-token", "pnu_"+secrets.NewSecret(utils.AlphaNumeric("36"))),
|
||||
}
|
||||
return utils.Validate(r, tps, nil)
|
||||
fps := []string{
|
||||
`PREFECT_API_KEY = "pnu_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"`,
|
||||
}
|
||||
return utils.Validate(r, tps, fps)
|
||||
}
|
||||
Reference in new issue
Block a user