mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-30 05:04:22 +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>
25 lines
662 B
Go
25 lines
662 B
Go
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)
|
|
}
|