mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-29 04:34:46 +01:00
1 parent
d8cd93cabe
commit
3474c58c9e
58 files changed
+264
-337
No files matched your search
@@ -3,6 +3,7 @@ package rules
|
||||
import (
|
||||
"regexp"
|
||||
|
||||
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||
"github.com/zricethezav/gitleaks/v8/config"
|
||||
)
|
||||
|
||||
@@ -16,7 +17,9 @@ func GitHubPat() *config.Rule {
|
||||
}
|
||||
|
||||
// validate
|
||||
tps := []string{"gihubPAT := \"ghp_" + sampleAlphaNumeric36Token + "\""}
|
||||
tps := []string{
|
||||
generateSampleSecret("github", "ghp_"+secrets.NewSecret(alphaNumeric("36"))),
|
||||
}
|
||||
return validate(r, tps)
|
||||
}
|
||||
|
||||
@@ -30,7 +33,9 @@ func GitHubOauth() *config.Rule {
|
||||
}
|
||||
|
||||
// validate
|
||||
tps := []string{"gihubAuth := \"gho_" + sampleAlphaNumeric36Token + "\""}
|
||||
tps := []string{
|
||||
generateSampleSecret("github", "gho_"+secrets.NewSecret(alphaNumeric("36"))),
|
||||
}
|
||||
return validate(r, tps)
|
||||
}
|
||||
|
||||
@@ -44,7 +49,10 @@ func GitHubApp() *config.Rule {
|
||||
}
|
||||
|
||||
// validate
|
||||
tps := []string{"gihubAuth := \"ghs_" + sampleAlphaNumeric36Token + "\""}
|
||||
tps := []string{
|
||||
generateSampleSecret("github", "ghu_"+secrets.NewSecret(alphaNumeric("36"))),
|
||||
generateSampleSecret("github", "ghs_"+secrets.NewSecret(alphaNumeric("36"))),
|
||||
}
|
||||
return validate(r, tps)
|
||||
}
|
||||
|
||||
@@ -58,6 +66,8 @@ func GitHubRefresh() *config.Rule {
|
||||
}
|
||||
|
||||
// validate
|
||||
tps := []string{"gihubAuth := \"ghr_" + sampleAlphaNumeric36Token + "\""}
|
||||
tps := []string{
|
||||
generateSampleSecret("github", "ghr_"+secrets.NewSecret(alphaNumeric("36"))),
|
||||
}
|
||||
return validate(r, tps)
|
||||
}
|
||||
Reference in new issue
Block a user