Skip to content

Python: [Breaking] Remove unsupported service auth mode from Copilot Studio agent - #14306

Merged
SergeyMenshykh merged 5 commits into
microsoft:mainfrom
SergeyMenshykh:sergeymenshykh-update-sha1-justification
Aug 20, 2026
Merged

SergeyMenshykh merged 5 commits into
microsoft:mainfrom
SergeyMenshykh:sergeymenshykh-update-sha1-justification

Conversation

@SergeyMenshykh

@SergeyMenshykh SergeyMenshykh commented Aug 19, 2026 •

Copy link
Copy Markdown
Contributor

Motivation and Context

The Copilot Studio agent exposed a SERVICE authentication mode that was never reachable — it was guarded to always raise before its implementation ran. Its dormant credential handling also triggered certificate-related static analysis alerts.

Description

Removes the service authentication path along with its settings, parameters, tests, and documentation. CopilotStudioAgentAuthMode is kept with its INTERACTIVE member, which is the only supported mode. Interactive authentication is unchanged.

Service authentication can be reintroduced later as a complete, tested feature.

Contribution Checklist

Expand the inline justification so automated validation can recognize it. No runtime behavior changes.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 25dd6e2a-f759-4148-a630-40110e90eff2
Keep the static analysis annotation on one line during automated formatting.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 25dd6e2a-f759-4148-a630-40110e90eff2
Copilot AI lite review requested due to automatic review settings August 19, 2026 11:55
@SergeyMenshykh
SergeyMenshykh requested a review from a team as a code owner August 19, 2026 11:55
Keep the static analysis justification without an additional formatter directive.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 25dd6e2a-f759-4148-a630-40110e90eff2

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This pull request updates a static-analysis suppression annotation in the Python Copilot Studio agent to provide clearer justification context, while preserving a single-line layout for formatting tools. It is intended as a comment/annotation-only change with no runtime behavior impact.

Changes:

  • Expanded the inline justification text for the CodeQL suppression on the SHA-1 X.509 x5t thumbprint computation line.
  • Added a formatting directive to keep the annotation in a single line during automated formatting.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@SergeyMenshykh SergeyMenshykh self-assigned this Aug 19, 2026
@SergeyMenshykh SergeyMenshykh moved this to In Review in Agent Framework Aug 19, 2026
@SergeyMenshykh SergeyMenshykh moved this to Sprint: In Review in Semantic Kernel Aug 19, 2026
@github-actions

github-actions Bot commented Aug 19, 2026 •

Copy link
Copy Markdown
Contributor

Python Test Coverage

Python Test Coverage Report •
FileStmtsMissCoverMissing
agents/copilot_studio
   copilot_studio_agent.py2144180%80, 84–86, 90–93, 95, 171–173, 177–182, 225, 233, 235, 239, 242, 364, 413, 460, 466–467, 469, 471–472, 480, 482–484, 527–529, 537, 546, 569
   copilot_studio_agent_settings.py210100% 
TOTAL28984559980% 

Python Unit Test Overview

Tests Skipped Failures Errors Time
4090 22 💤 0 ❌ 0 🔥 2m 16s ⏱️

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

MAF Automated Review — Iteration 1

Result: Findings reported
Scope: full PR (2 commit(s)): 857f871f5f4a, 06f669e96fbb
Model: claude-opus-4.8

Overview

This is a comment-only change to a single line: it expands the # CodeQL [SM02167]
suppression justification and appends # fmt: skip to the SHA-1 thumbprint call in
copilot_studio_agent.py. The runtime behavior is genuinely unchanged (the executable
expression is byte-identical to base) and the security posture is intact — the SHA-1 use
is a legitimate X.509 x5t thumbprint identifier with usedforsecurity=False, and the
[SM02167] scoping token still applies to exactly this one line. The # fmt: skip is
load-bearing: without it ruff format reflows the over-length line and detaches the CodeQL
annotation. The one residual issue is that expanding the comment pushed the line to 148
characters, newly violating the repo's configured 120-char limit (E501), which # fmt: skip
does not silence.

Reviewed the supplied pull-request change set across correctness, security/reliability, architecture, and failure behavior.
1 verified finding remained after source verification (1 medium) across 1 file. Details are attached to the affected lines below.

Affected areas: python/semantic_kernel/agents/copilot_studio/copilot_studio_agent.py

Comment thread python/semantic_kernel/agents/copilot_studio/copilot_studio_agent.py Outdated
Split digest formatting from its calculation so the inline static analysis annotation remains within the configured line length.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 25dd6e2a-f759-4148-a630-40110e90eff2
The SERVICE auth mode was unreachable and its dormant credential handling triggered certificate-related static analysis alerts. The auth mode enum is kept with INTERACTIVE, the only supported mode.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 25dd6e2a-f759-4148-a630-40110e90eff2
@SergeyMenshykh SergeyMenshykh changed the title Python: Clarify static analysis annotation Python: Remove unsupported service auth mode from Copilot Studio agent Aug 19, 2026
@SergeyMenshykh SergeyMenshykh changed the title Python: Remove unsupported service auth mode from Copilot Studio agent Python: [Breaking] Remove unsupported service auth mode from Copilot Studio agent Aug 19, 2026
@SergeyMenshykh
SergeyMenshykh added this pull request to the merge queue Aug 19, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 19, 2026
@TaoChenOSU
Tao Chen (TaoChenOSU) added this pull request to the merge queue Aug 19, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 19, 2026
@SergeyMenshykh
SergeyMenshykh added this pull request to the merge queue Aug 20, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 20, 2026
@SergeyMenshykh
SergeyMenshykh added this pull request to the merge queue Aug 20, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 20, 2026
@SergeyMenshykh
SergeyMenshykh merged commit b39d95a into microsoft:main Aug 20, 2026
32 checks passed
@github-project-automation github-project-automation Bot moved this from In Review to Done in Agent Framework Aug 20, 2026
@github-project-automation github-project-automation Bot moved this from Sprint: In Review to Sprint: Done in Semantic Kernel Aug 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done
Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants