-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Security update for storageURL field of ApplicationPackage #28957
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
| Thanks for your contribution! The pull request validation has started. Please revisit this comment for updated status. |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
There was a problem hiding this comment.
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 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 |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 9 out of 9 changed files in this pull request and generated no new comments.
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
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.