How can I address false positives being detected with atlassian/git-secrets-scan?

Daniel Carrington
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 26, 2023

I have a repository with variious shell scripts. One of those scripts sets some standard variables, but it's getting flagged "found security credentials" but what it's flagging is not credentials.

How can I address these false positives so that the check doesn't not fail erroneously?

Thanks!

1 answer

1 vote
Aron Gombas _Midori_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 27, 2023

You can find the documentation here: https://bitbucket.org/atlassian/git-secrets-scan/src/master/

You can include/exclude files.

Because you can't customize the built-in pattern, only add new custom patterns, exclude the with false positives seems to be the only tool to address your problem. Unfortunately, it also means that the leaked secrets in that file will not found, either.

Daniel Carrington
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 27, 2023

Well...that's a bummer. I'd still like the file to be part of the check, but I guess that won't be posslble.

Thanks!

Like Aron Gombas _Midori_ likes this
Igor Stoyanov
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 30, 2023

@Daniel Carrington hi.
Maybe you could split your file to two files, first file will contain only variables that should be ignored and you will exclude it from scan, and the second file will contain all other standard variables that you will scan.

Regards, Igor

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events