.NET: [BREAKING] fix: use allow list for configuration keys - #8200
Draft
Vincent Biret (baywet) wants to merge 47 commits into
Draft
Vincent Biret (baywet) wants to merge 47 commits into
Vincent Biret (baywet) wants to merge 47 commits into
Conversation
Signed-off-by: Vincent Biret <vibiret@microsoft.com>
Vincent Biret (baywet)
temporarily deployed
to
github-app-auth
September 9, 2026 16:46 — with
GitHub Actions
Inactive
Vincent Biret (baywet)
temporarily deployed
to
github-app-auth
September 9, 2026 16:46 — with
GitHub Actions
Inactive
Vincent Biret (baywet)
had a problem deploying
to
integration
September 9, 2026 16:46 — with
GitHub Actions
Failure
Vincent Biret (baywet)
temporarily deployed
to
integration
September 9, 2026 16:46 — with
GitHub Actions
Inactive
Vincent Biret (baywet)
temporarily deployed
to
github-app-auth
September 9, 2026 16:46 — with
GitHub Actions
Inactive
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
Vincent Biret (baywet)
temporarily deployed
to
github-app-auth
September 9, 2026 17:25 — with
GitHub Actions
Inactive
Vincent Biret (baywet)
temporarily deployed
to
integration
September 9, 2026 17:25 — with
GitHub Actions
Inactive
Vincent Biret (baywet)
temporarily deployed
to
integration
September 9, 2026 17:25 — with
GitHub Actions
Inactive
This comment was marked as outdated.
This comment was marked as outdated.
Vincent Biret (baywet)
temporarily deployed
to
github-app-auth
September 9, 2026 17:38 — with
GitHub Actions
Inactive
Vincent Biret (baywet)
had a problem deploying
to
integration
September 9, 2026 17:39 — with
GitHub Actions
Error
Vincent Biret (baywet)
had a problem deploying
to
integration
September 9, 2026 17:39 — with
GitHub Actions
Error
…ect' Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
Vincent Biret (baywet)
temporarily deployed
to
github-app-auth
September 9, 2026 17:39 — with
GitHub Actions
Inactive
Co-authored-by: baywet <7905502+baywet@users.noreply.github.com>
Signed-off-by: Vincent Biret <vibiret@microsoft.com>
Signed-off-by: Vincent Biret <vibiret@microsoft.com>
…arer Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Vincent Biret <vibiret@microsoft.com>
Signed-off-by: Vincent Biret <vibiret@microsoft.com>
Signed-off-by: Vincent Biret <vibiret@microsoft.com>
Signed-off-by: Vincent Biret <vibiret@microsoft.com>
Signed-off-by: Vincent Biret <vibiret@microsoft.com>
…een net and netfx Signed-off-by: Vincent Biret <vibiret@microsoft.com>
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
Sensitivity-aware counterparts are missing for two newly restricted expression APIs, and the Question egress guard lacks direct coverage.
Review details
Suppressed comments (2)
Previously missed (2) — in code that hasn't changed since the last review.
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/Kit/IWorkflowContextExtensions.cs:170
- The new sensitive-result behavior has no equivalent opt-in path for this API.
EvaluateListAsyncnow throws for a sensitive list, but only scalarEvaluateValueWithSensitivityAsyncwas added; likewise, the newConvertValueWithSensitivityAsyncsupports key/scope conversion but not the expression-basedConvertValueAsyncoverload. Callers therefore cannot perform the documented migration while retaining the existing list conversion or expression conversion semantics. Add sensitivity-aware counterparts for these two expression APIs (with tests and public API baselines).
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/ObjectModel/QuestionExecutor.cs:194 - This new egress guard is not covered by
QuestionExecutorTest; the added question test only verifies sensitivity on the assigned default value. Add a test whose prompt (or retry/default prompt) references a sensitiveEnvvalue and assert thatDeclarativeActionExceptionis raised before aMessageActivityEventor external request is emitted, matching the coverage added for the other message egress guards.
- Files reviewed: 62/62 changed files
- Comments generated: 0 new
- Review effort level: Balanced
Signed-off-by: Vincent Biret <vibiret@microsoft.com>
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 & Context
This change hardens declarative Power Fx configuration handling so agent and workflow definitions no longer receive broad access to host configuration or ambient process environment values by default. The goal is to align the .NET declarative pipeline with the safe-by-default posture used by Python and to prevent secrets from being accidentally surfaced through workflow messages or persisted state transitions.
Description & Review Guide
Envreferences.AllowProcessEnvironmentVariableFallbackis explicitly enabled.SendActivity,Question,AddConversationMessage,CopyConversationMessages, andInvokeAzureAgentinput messages.Set(...)disabled because it is not integrated with workflow scoped state/checkpoint sensitivity.AllowProcessEnvironmentVariableFallback = truein addition to allowing the variable name.FormatTemplateAsync,EvaluateValueAsync,EvaluateListAsync, or expression-basedConvertValueAsyncmay now receiveDeclarativeActionExceptionfor sensitive results; use the corresponding sensitivity-aware APIs when the value must be handled programmatically.10000unless the host configures a higher limit.Related Issue
No linked issue.
Contribution Checklist
breaking changelabel (or add "[BREAKING]" to the title prefix, before or after any language prefix) — a workflow keeps the label and title prefix in sync automatically.Signed-off-by: Vincent Biret vibiret@microsoft.com