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

Addressing issues with CredScan #16944

Merged
merged 2 commits into from
Mar 3, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions eng/CredScanSuppression.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,13 @@
{
"file":[
"sdk/keyvault/azure-keyvault-certificates/tests/ca.key",
"sdk/identity/azure-identity/tests/ec-certificate.pem"
"sdk/identity/azure-identity/tests/ec-certificate.pem",
"sdk/core/azure-servicemanagement-legacy/tests/legacy_mgmt_settings_fake.py",
Copy link
Member

Choose a reason for hiding this comment

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

We want to be careful about excluding entire files because that means if there ever becomes an individual secret in one of them that we will not detect it. We are trying to only exclude files if the entire file is a fake key/certificate that is used for testing.

Copy link
Contributor

Choose a reason for hiding this comment

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

I have checked this file. The purpose of this file is to add fake key in common place and use variables in tests. If people do not abuse the file with real key, then it is supposed to suppress in this way.

Copy link
Member

Choose a reason for hiding this comment

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

OK yeah I think those cases are also reasonable. The approach also might be interesting for other languages if they need something similar.

"sdk/storage/azure-storage-blob/tests/blob_settings_fake.py",
"sdk/storage/azure-storage-file-datalake/tests/data_lake_settings_fake.py",
"tools/azure-sdk-tools/devtools_testutils/mgmt_settings_fake.py"
],
"_justification": "File contains private key used by test code."
}
}
]
}