[Identity] Add suppression comments#46788
Open
pvaneck wants to merge 1 commit intoAzure:mainfrom
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds inline CodeQL suppression comments for SHA1 certificate fingerprinting in azure-identity, documenting that SHA1 usage is retained for backwards compatibility (e.g., certain ADFS scenarios) and addressing the CodeQL.SM02167 “Weak hashes” alert referenced in issue #46198.
Changes:
- Annotated SHA1 fingerprint lines with
CodeQL [SM02167]suppression context in the internal AAD certificate helper. - Annotated SHA1 fingerprint lines with
CodeQL [SM02167]suppression context in certificate loading helpers (PEM and PKCS12).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| sdk/identity/azure-identity/azure/identity/_internal/aadclient_certificate.py | Adds a CodeQL suppression comment to the SHA1 fingerprint used for thumbprints (kept for compatibility). |
| sdk/identity/azure-identity/azure/identity/_credentials/certificate.py | Adds CodeQL suppression comments to SHA1 fingerprinting during PEM/PKCS12 certificate loading (kept for compatibility). |
34f1ab8 to
734e9b1
Compare
Some CodeQL comment were added for SHA1 lines. This is still needed for backwards compatibility and for certain scenarios like ADFS. SHA1 is only used for certificate thumbprints, and is not considered a security vulnerability. Signed-off-by: Paul Van Eck <paulvaneck@microsoft.com>
734e9b1 to
a628fae
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Some CodeQL comments were added for SHA1 lines. This is still needed for backwards compatibility and for certain scenarios like ADFS. SHA1 is only used for certificate thumbprints and is not considered a security vulnerability. In most cases, SHA256 would be used in any case.
Closes: #46198