Skip to content

Add security comment to DictionaryWrapper.cs - #132640

Open
GrabYourPitchforks wants to merge 1 commit into
mainfrom
GrabYourPitchforks-patch-1
Open

Add security comment to DictionaryWrapper.cs#132640
GrabYourPitchforks wants to merge 1 commit into
mainfrom
GrabYourPitchforks-patch-1

Conversation

@GrabYourPitchforks

@GrabYourPitchforks GrabYourPitchforks commented Aug 21, 2026

Copy link
Copy Markdown
Member

The logic newly added to System.Diagnostics.Process appears to be security-sensitive, but it is not. This deserves a source code clarification.

Ref: https://github.com/dotnet/core/blob/main/Documentation/security-foundations/baseline-security-assumptions.md#22-environment-variables-are-trusted-as-a-control-plane-mechanism

Added security comment regarding environment block handling.
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).
13 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @dotnet/area-system-diagnostics-process
See info in area-owners.md if you want to be subscribed.

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 PR adds a source comment in System.Diagnostics.Process’s internal DictionaryWrapper to clarify that the environment-variable validation performed in the indexer setter is not intended as a primary security mitigation.

Changes:

  • Adds a security-context comment above the Validate calls in DictionaryWrapper.this[string].set.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants