Skip to content

Conversation

@wiboris
Copy link
Member

@wiboris wiboris commented Dec 5, 2025

Description

Mandatory Checklist

  • SHOULD update ChangeLog.md file(s) appropriately
    • Update src/{{SERVICE}}/{{SERVICE}}/ChangeLog.md.
      • A snippet outlining the change(s) made in the PR should be written under the ## Upcoming Release header in the past tense.
    • Should not change ChangeLog.md if no new release is required, such as fixing test case only.
  • SHOULD regenerate markdown help files if there is cmdlet API change. Instruction
  • SHOULD have proper test coverage for changes in pull request.
  • SHOULD NOT adjust version of module manually in pull request

Copilot AI review requested due to automatic review settings December 5, 2025 06:37
@azure-client-tools-bot-prd
Copy link

Thanks for your contribution! The pull request validation has started. Please revisit this comment for updated status.

Copilot finished reviewing on behalf of wiboris December 5, 2025 06:40
@isra-fel
Copy link
Member

isra-fel commented Dec 5, 2025

/azp run

@azure-pipelines
Copy link
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

Copy link
Contributor

Copilot AI left a 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 GetStorageUrl method to remove the out parameter and split existence checking into a separate AppPackageExists method
  • Commented out StorageUrl assignment in ConvertGetApplicationPackageResponseToApplicationPackage to prevent exposing SAS tokens
  • Updated test to use -FilePath parameter instead of -ActivateOnly flag

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

@isra-fel
Copy link
Member

isra-fel commented Dec 5, 2025

/azp run

@azure-pipelines
Copy link
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

Copilot AI review requested due to automatic review settings December 5, 2025 19:47
Copy link
Contributor

Copilot AI left a 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.

@isra-fel
Copy link
Member

isra-fel commented Dec 5, 2025

/azp run

@azure-pipelines
Copy link
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

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