mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-12-01 13:34:23 +01:00
* Initial secret set * Covered off all rule types in comments * Finished Azure and Ansible rules * About to run go run main.go * Fixed some rules, but tests need work * Initial secret set for Azure Needs work - many tests fail * Fix remaining Azure secrets - but couldn't get XML to work * Update .gitignore Co-authored-by: Jesse Houwing <jesse.houwing@gmail.com> --------- Co-authored-by: Jesse Houwing <jesse.houwing@gmail.com>
This commit is contained in:
1 parent
463d24618f
commit
7911ac60d7
5 files changed
+685
-1
No files matched your search
@@ -0,0 +1,24 @@
|
||||
package rules
|
||||
|
||||
import (
|
||||
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets"
|
||||
"github.com/zricethezav/gitleaks/v8/config"
|
||||
)
|
||||
|
||||
func AnsibleVaultToken() *config.Rule {
|
||||
// define rule
|
||||
r := config.Rule{
|
||||
Description: "CSCAN0270 - Found Azure Subscription Token Cache.",
|
||||
RuleID: "ansible-vault-token",
|
||||
SecretGroup: 1,
|
||||
Regex: generateUniqueTokenRegex(`ANSIBLE_VAULT;[0-9]\.[0-9];AES256;[\r\n]+[0-9]+`),
|
||||
Keywords: []string{"ANSIBLE_VAULT;", "AES256;"},
|
||||
}
|
||||
|
||||
// validate
|
||||
tps := []string{
|
||||
generateSampleSecret("ansible-vault-token",
|
||||
"ANSIBLE_VAULT;1.0;AES256;\n" + secrets.NewSecret(numeric("32"))),
|
||||
}
|
||||
return validate(r, tps, nil)
|
||||
}
|
||||
Reference in new issue
Block a user