Security update for storageURL field of ApplicationPackage#28957
Merged
wyunchi-ms merged 12 commits intoAzure:mainfrom Dec 12, 2025
Merged
Security update for storageURL field of ApplicationPackage#28957wyunchi-ms merged 12 commits intoAzure:mainfrom
wyunchi-ms merged 12 commits intoAzure:mainfrom
Conversation
| Thanks for your contribution! The pull request validation has started. Please revisit this comment for updated status. |
Member
|
/azp run |
Contributor
|
Azure Pipelines successfully started running 3 pipeline(s). |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR implements a security update to prevent exposing the storageUrl field (which contains SAS tokens) in the PSApplicationPackage object returned to users. The code refactors the application package upload workflow by separating the existence check from the storage URL retrieval, and comments out the StorageUrl assignment in the response converter.
Key changes:
- Refactored
GetStorageUrlmethod to remove theoutparameter and split existence checking into a separateAppPackageExistsmethod - Commented out
StorageUrlassignment inConvertGetApplicationPackageResponseToApplicationPackageto prevent exposing SAS tokens - Updated test to use
-FilePathparameter instead of-ActivateOnlyflag
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/Batch/Batch/Models/BatchClient.ApplicationPackages.cs | Refactored application package upload logic; split existence check and storage URL retrieval; commented out StorageUrl field assignment |
| src/Batch/Batch.Test/ScenarioTests/BatchApplicationPackageTests.ps1 | Changed test parameter from -ActivateOnly to -FilePath to match updated API |
| src/Batch/Batch.Test/SessionRecords/*.json | Updated test recordings with new timestamps, request IDs, and API version 4.0.0 reflecting the code changes |
dpwatrous
reviewed
Dec 5, 2025
src/Batch/Batch.Test/ScenarioTests/BatchApplicationPackageTests.ps1
Outdated
Show resolved
Hide resolved
dpwatrous
reviewed
Dec 5, 2025
Member
|
/azp run |
Contributor
|
Azure Pipelines successfully started running 3 pipeline(s). |
dpwatrous
approved these changes
Dec 5, 2025
Member
|
/azp run |
Member
Author
|
@wyunchi-ms updated changelog |
Member
|
/azp run |
Contributor
|
Azure Pipelines successfully started running 3 pipeline(s). |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
src/Batch/Batch.Test/ScenarioTests/BatchApplicationPackageTests.ps1
Outdated
Show resolved
Hide resolved
Member
|
/azp run |
Contributor
|
Azure Pipelines successfully started running 3 pipeline(s). |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Member
|
/azp run |
Contributor
|
Azure Pipelines successfully started running 3 pipeline(s). |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
src/Batch/Batch.Test/ScenarioTests/BatchApplicationPackageTests.ps1
Outdated
Show resolved
Hide resolved
Member
|
/azp run |
Contributor
|
Azure Pipelines successfully started running 3 pipeline(s). |
Member
Author
|
@wyunchi-ms PR should be ready for review |
wyunchi-ms
approved these changes
Dec 12, 2025
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.
Description
Mandatory Checklist
Please choose the target release of Azure PowerShell. (⚠️ Target release is a different concept from API readiness. Please click below links for details.)
Check this box to confirm: I have read the Submitting Changes section of
CONTRIBUTING.mdand reviewed the following information:ChangeLog.mdfile(s) appropriatelysrc/{{SERVICE}}/{{SERVICE}}/ChangeLog.md.## Upcoming Releaseheader in the past tense.ChangeLog.mdif no new release is required, such as fixing test case only.