Skip to content

[Identity] Add suppression comments#46788

Open
pvaneck wants to merge 1 commit intoAzure:mainfrom
pvaneck:codeql-suppression
Open

[Identity] Add suppression comments#46788
pvaneck wants to merge 1 commit intoAzure:mainfrom
pvaneck:codeql-suppression

Conversation

@pvaneck
Copy link
Copy Markdown
Member

@pvaneck pvaneck commented May 8, 2026

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

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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).

@pvaneck pvaneck force-pushed the codeql-suppression branch from 34f1ab8 to 734e9b1 Compare May 8, 2026 00:46
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>
@pvaneck pvaneck force-pushed the codeql-suppression branch from 734e9b1 to a628fae Compare May 8, 2026 00:55
@pvaneck pvaneck marked this pull request as ready for review May 8, 2026 00:57
@pvaneck pvaneck requested review from a team and xiangyan99 as code owners May 8, 2026 00:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Untriaged

Development

Successfully merging this pull request may close these issues.

[CodeQL.SM02167] 'Weak hashes' in /azure_identity/_internal/aadclient_certificate.py

2 participants