-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
[Core] CredScan: handle false positives #23505
Comments
@heaths, can you look at this, please? |
@kinelski can't we just add azure-sdk-for-net/sdk/core/Azure.Core/tests/PemReaderTests.cs to the suppression list? |
I would advise against doing so because this would prevent us from identifying possible other leaks in this file in the future. I think actual leaks are only likely to happen in recording files, though. @weshaggard What do you think? |
We have been trying to avoid adding entire source files to the suppression list unless the file is known to only contain test/fake secrets like a cert file or a fakes file but for any standard cs files we don't add them to the suppression list to avoid potential leaks. |
Resolves Azure#23505 and resolves Azure#23502
Issue
We currently have 2 test secrets in Core Track 2 library being detected by CredScan (report).
These are the secrets being detected:
1.
azure-sdk-for-net/sdk/core/Azure.Core/tests/PemReaderTests.cs
Lines 304 to 331 in 303b753
2.
azure-sdk-for-net/sdk/core/Azure.Core/tests/PemReaderTests.cs
Lines 368 to 395 in 303b753
Goal
We need to move the certificate keys to a separate file and make tests read them from there. After that's done, the file path must be added to the suppression file as well:
azure-sdk-for-net/eng/CredScanSuppression.json
Lines 53 to 58 in 303b753
Here's an example.
The text was updated successfully, but these errors were encountered: