Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1079 #1291

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

1079 #1291

wants to merge 6 commits into from

Conversation

StephenHogg
Copy link

@StephenHogg StephenHogg commented Nov 16, 2023

Description:

Closes #539 - adds Azure rules

Checklist:

  • Does your PR pass tests?
  • Have you written new tests for your changes?
  • Have you lint your code locally prior to submission?

Comment on lines +39 to +57
func AzureStorageCredential86char() *config.Rule {
// define rule
r := config.Rule{
Description: "CSCAN0030, CSCAN0090, CSCAN0150 - Found Azure storage credential in source code file.",
RuleID: "azure-storage-credential-86char",
SecretGroup: 1,
Regex: generateUniqueTokenRegex(`[ \t]{0,10}[a-zA-Z0-9/+]{86}==`, true),
Keywords: []string{"=="},
}

// validate
tps := []string{
generateSampleSecret("azure-storage-credential-86char",
secrets.NewSecret(alphaNumeric("86")+"==")),
}
return validate(r, tps, nil)
}

func AzureStorageCredential43char() *config.Rule {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've tested both these out and they're far too noisy as-is. I'm not sure how they can be improved beyond adding a prefix for "accountkey", though that may overlap with an existing pattern.

@StephenHogg
Copy link
Author

StephenHogg commented Nov 17, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Gitleaks misses quite a few Azure rules.
2 participants