Skip to content

Enhance comments for path validation logic - #55881

Merged
GrabYourPitchforks merged 1 commit into
mainfrom
GrabYourPitchforks-patch-1
Aug 20, 2026
Merged

GrabYourPitchforks merged 1 commit into
mainfrom
GrabYourPitchforks-patch-1

Conversation

@GrabYourPitchforks

Copy link
Copy Markdown
Member

Clarifying that this check is not a security-sensitive check.

Added comments to clarify the purpose of the path check for package trust.
@GrabYourPitchforks
GrabYourPitchforks requested review from joeloff and a lite review from Copilot August 19, 2026 23:32
@GrabYourPitchforks
GrabYourPitchforks requested a review from a team as a code owner August 19, 2026 23:32
@azure-pipelines

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

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 updates inline documentation in NuGetPackageDownloader.ExtractPackageAsync to clarify the intent of a path validation check related to applying Unix file permissions during package extraction.

Changes:

  • Added explanatory comments above the StartsWith path containment check for permission application.

Comment on lines +354 to +356
// Because packages are assumed fully trusted, this check exists to prevent improperly authored packages
// from accidentally modifying files they may not have intended to modify. It is not intended to police
// the set of capabilities available to the package.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

See, Copilot, your incorrect read of this code is exactly what this comment is intended to help prevent. :)

@GrabYourPitchforks
GrabYourPitchforks merged commit 7053edd into main Aug 20, 2026
26 checks passed
@GrabYourPitchforks
GrabYourPitchforks deleted the GrabYourPitchforks-patch-1 branch August 20, 2026 01:24
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 12.0-preview1 milestone Aug 21, 2026
dsplaisted added a commit that referenced this pull request Aug 25, 2026
Resolve dependency version conflicts using current main and retain the package path-validation clarification from #55881.

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

Copilot-Session: 37b0a3d3-c6eb-49af-9000-9a917041efa9

This branch had an error being deployed

1 failed deployment
copilot-pat-pool — fd55d725 Deployed Aug 20, 2026 by GrabYourPitchforks via pre_activation #483
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants