Skip to content

.NET: Dotnet: Add approval reuse considerations - #9389

Merged
westey (westey-m) merged 3 commits into
microsoft:mainfrom
westey-m:dotnet-toolapprovals-approvalreuse
Oct 14, 2026
Merged

westey (westey-m) merged 3 commits into
microsoft:mainfrom
westey-m:dotnet-toolapprovals-approvalreuse

Conversation

@westey-m

Copy link
Copy Markdown
Collaborator

Motivation & Context

Improve documentation around what to consider when doing standing approvals with agent upgrades / multiple agents.

Description & Review Guide

Improve documentation around what to consider when doing standing approvals with agent upgrades / multiple agents.

Related Issue

Fixes #

AI Assistance

  • No material AI assistance was used.
  • This is an AI-assisted contribution. I reviewed, understood, and verified all submitted content and accept responsibility for it.

AI assistance details:

Contribution Checklist

  • The code builds clean without any errors or warnings
  • All unit tests pass, and I have added new tests where possible
  • The PR follows the Contribution Guidelines
  • This PR links to an agreed issue with no competing open PR, or the Related Issue section documents a trivial-change or repository-automation exception.
  • This is not a breaking change. If it is a breaking change, add the breaking change label (or add "[BREAKING]" to the title prefix, before or after any language prefix) — a workflow keeps the label and title prefix in sync automatically.

Copilot AI balanced review requested due to automatic review settings October 14, 2026 16:42
@agent-framework-automation agent-framework-automation Bot added the .NET Usage: [Issues, PRs], Target: .Net label Oct 14, 2026
@github-actions github-actions Bot changed the title Dotnet: Add approval reuse considerations .NET: Dotnet: Add approval reuse considerations Oct 14, 2026

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.

🟡 Changes recommended

The documentation recommends clearing approval state without exposing or documenting a supported way to do so.

1 open finding
What changed in this PR

Adds security guidance for reusing standing tool approvals across agents and changing tool sets.

Changes:

  • Documents session-scoped approval persistence.
  • Warns about name collisions, particularly with MCP tools.
  • Clarifies approval reuse decisions after agent or tool upgrades.
File Description
ToolApprovalRequestContentExtensions.cs Adds reuse guidance to approval helpers.
ToolApprovalAgentBuilderExtensions.cs Adds security guidance to middleware setup.
ToolApprovalAgent.cs Documents risks and upgrade considerations.
AlwaysApproveToolApprovalResponseContent.cs Documents standing-rule scope.

🧠 Review effort: Balanced


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

@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: No findings
Scope: full PR (1 commit(s)): a8fa25f1d7f6
Model: gpt-5.6-sol

Overview

This documentation-only change accurately warns that standing approvals are session-scoped and match tool names and arguments rather than stable tool identities. Existing request binding, exact-argument matching, replay protection, and auto-approval iteration limits constrain adjacent risks, while the underlying cross-tool identity risk remains pre-existing behavior that this PR explicitly documents. No PR-introduced Critical, High, or Medium defect was established.

Reviewed the supplied pull-request change set across correctness, security/reliability, architecture, and failure behavior.
No publishable findings remained after source verification for this scope.

Removed reference to clearing the standing approval state in remarks.

Co-authored-by: Copilot Autofix powered by AI <[email protected]>
@westey-m
westey (westey-m) added this pull request to the merge queue Oct 14, 2026
Merged via the queue into microsoft:main with commit 1ab3430 Oct 14, 2026
31 checks passed
@westey-m
westey (westey-m) deleted the dotnet-toolapprovals-approvalreuse branch October 14, 2026 17:29

This branch was previously deployed

2 inactive deployments
github-app-auth — 2faf709d Deployed Oct 14, 2026 by westey-m via add_label #25354
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

.NET Usage: [Issues, PRs], Target: .Net

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants