fixed regex typo that was causing conf uuid's to be surfaced as non-live atlassian secrets. (#5029)
* fixed regex typo that was causing conf uuid's to be surfaced as non-live atlassian secrets. * changed data to dummy info
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user