mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-12-01 13:34:23 +01:00
Standardize/alphabetize rules, add cmd/generate/config package (#840)
This commit is contained in:
1 parent
e784980515
commit
606bb1a13b
62 files changed
+2959
-642
No files matched your search
@@ -0,0 +1,38 @@
|
||||
package rules
|
||||
|
||||
import (
|
||||
"github.com/zricethezav/gitleaks/v8/config"
|
||||
)
|
||||
|
||||
func AsanaClientID() *config.Rule {
|
||||
// define rule
|
||||
r := config.Rule{
|
||||
Description: "Asana Client ID",
|
||||
RuleID: "asana-client-id",
|
||||
Regex: generateSemiGenericRegex([]string{"asana"}, numeric16),
|
||||
SecretGroup: 1,
|
||||
Keywords: []string{"asana"},
|
||||
}
|
||||
|
||||
// validate
|
||||
tps := []string{
|
||||
"asanaKey := \"" + sampleNumeric16 + "\"",
|
||||
}
|
||||
return validate(r, tps)
|
||||
}
|
||||
|
||||
func AsanaClientSecret() *config.Rule {
|
||||
// define rule
|
||||
r := config.Rule{
|
||||
Description: "Asana Client Secret",
|
||||
RuleID: "asana-client-secret",
|
||||
Regex: generateSemiGenericRegex([]string{"asana"}, alphaNumeric32),
|
||||
Keywords: []string{"asana"},
|
||||
}
|
||||
|
||||
// validate
|
||||
tps := []string{
|
||||
"asanaKey := \"" + sampleAlphaNumeric32Token + "\"",
|
||||
}
|
||||
return validate(r, tps)
|
||||
}
|
||||
Reference in new issue
Block a user