Find, verify, and analyze leaked credentials
Go credentialsdevsecopsdynamic-analysisprecommitscanningsecretsecret-managementsecretssecuritysecurity-toolstrufflehogverification
fixed regex typo that was causing conf uuid's to be surfaced as non-live atlassian secrets. (#5029)
Jordan Tunstill9b6b5326bfe2
diff --git a/pkg/detectors/atlassian/v1/atlassian.go b/pkg/detectors/atlassian/v1/atlassian.goindex a1d45830c..689c33b8a 100644--- a/pkg/detectors/atlassian/v1/atlassian.go+++ b/pkg/detectors/atlassian/v1/atlassian.go@@ -35,7 +35,7 @@ var _ detectors.Versioner = (*Scanner)(nil)var (defaultClient = common.SaneHttpClient()// Make sure that your group is surrounded in boundary characters such as below to reduce false positives.- keyPat = regexp.MustCompile(detectors.PrefixRegex([]string{"atlassian"}) + `\b([a-zA-Z-0-9]{24})\b`)+ keyPat = regexp.MustCompile(detectors.PrefixRegex([]string{"atlassian"}) + `\b([a-zA-Z0-9]{24})\b`))// Keywords are used for efficiently pre-filtering chunks.diff --git a/pkg/detectors/atlassian/v1/atlassian_test.go b/pkg/detectors/atlassian/v1/atlassian_test.goindex 335f4bdaa..3724bde41 100644--- a/pkg/detectors/atlassian/v1/atlassian_test.go+++ b/pkg/detectors/atlassian/v1/atlassian_test.go@@ -41,6 +41,15 @@ func TestAtlassian_Pattern(t *testing.T) {`,want: []string{"r6RkiQao3PgqY9MOKtonpJdU"},},+ {+ name: "confluence macro-id near atlassian url - no match",+ input: `+ <a href="https://example.atlassian.net/wiki/spaces/X">link</a>+ <ac:structured-macro ac:name="jira" ac:schema-version="1" ac:macro-id="11112222-3333-4444-5555-666677778888">+ <ac:structured-macro ac:name="roadmap" ac:schema-version="1" ac:macro-id="aaaabbbb-cccc-dddd-eeee-ffff00001111">+ `,+ want: nil,+ },}for _, test := range tests {