Repository navigation
Python: Document x5t certificate thumbprint hashing in Copilot Studio agent - #14270
Merged
SergeyMenshykh merged 2 commits intoAug 5, 2026
Conversation
… agent The certificate thumbprint sent to MSAL is the X.509 `x5t` value, which MSAL and Microsoft Entra ID require to be computed with SHA-1. Add a comment explaining that this is an identifier, not a security primitive, and annotate the call so static analysis does not flag it. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: d2b7d3e7-a125-4569-b976-a6534c1837ae
Contributor
There was a problem hiding this comment.
Pull request overview
Documents why SHA-1 is intentionally used when computing the X.509 certificate thumbprint for the Copilot Studio agent’s MSAL certificate-based authentication flow, and adds an inline static-analysis suppression annotation (no functional behavior change).
Changes:
- Add an explanatory comment clarifying that SHA-1 is required for the MSAL/Entra ID
thumbprint(x5t) thumbprint identifier, not used as a security primitive. - Add an inline “CodeQL [SM02167]” annotation to reduce static-analysis noise for the SHA-1 usage.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
Python Test Coverage Report •
Python Unit Test Overview
|
||||||||||||||||||||||||||||||
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
SergeyMenshykh
enabled auto-merge
August 4, 2026 19:53
Evan Mattson (moonbox3)
approved these changes
Aug 5, 2026
westey (westey-m)
approved these changes
Aug 5, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Aug 5, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Aug 5, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Aug 5, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Aug 5, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Aug 5, 2026
Peter Ibekwe (peibekwe)
approved these changes
Aug 5, 2026
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.
Motivation and Context
_CopilotStudioAgentTokenFactory._cert_thumbprintcomputes the X.509 certificate thumbprint that is passed to MSAL as thethumbprintclient credential. This value is the JWTx5theader, which MSAL and Microsoft Entra ID require to be a SHA-1 digest - any other digest would be rejected by the token endpoint.Because it is a plain digest call, static analysis tooling flags it even though the hash is used purely as a certificate identifier, not as a cryptographic/security primitive (the call already passes
usedforsecurity=False).Description
Adds a comment explaining why SHA-1 is required here and annotates the call so static analysis does not flag it. No behavior change.
Note: MSAL itself carries the same annotation on its own
x5tfingerprint computation.Contribution Checklist