[AKS] az aks install-desktop: Add AKS Desktop installation - #34100
Open
Tom Gamble (gambtho) wants to merge 3 commits into
Open
Tom Gamble (gambtho) wants to merge 3 commits into
Tom Gamble (gambtho) wants to merge 3 commits into
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Tom Gamble (gambtho)
requested review from
a team and
FumingZhang
as code owners
September 18, 2026 19:12
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
microsoft-github-policy-service
Bot
requested review from
elvazhu521,
Yu Chen (jsntcy),
ZelinWang (wangzelin007),
Julie Zhu (yanzhudd) and
Yong Zhang (yonzhan)
September 18, 2026 19:13
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Critical archive traversal and other unresolved installation and validation issues must be addressed.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Adds cross-platform az aks install-desktop support with secure release downloads, integrity verification, native installation, and Linux archive handling.
Changes:
- Registers the command,
--version, and help examples. - Implements platform/release selection, downloads, verification, extraction, and installation.
- Adds mocked workflow tests.
File summaries
| File | Summary and findings |
|---|---|
src/azure-cli/azure/cli/command_modules/acs/tests/latest/test_custom.py |
Adds installer tests. Nit (1 vote): cleanup assertion is vacuous because the mock does not create the downloaded path. |
src/azure-cli/azure/cli/command_modules/acs/custom.py |
Implements the installation workflow. Critical (1 vote): archive extraction remains vulnerable to traversal through symlink members. Moderate (3 votes): temporary DMG/DEB files may be deleted before desktop handlers finish consuming them. Moderate (1 vote): null digests raise TypeError instead of ClientRequestError. Moderate (1 vote): an empty --version bypasses validation and installs the latest release. |
src/azure-cli/azure/cli/command_modules/acs/commands.py |
Registers the new command. |
src/azure-cli/azure/cli/command_modules/acs/_params.py |
Adds the --version parameter. |
src/azure-cli/azure/cli/command_modules/acs/_help.py |
Adds command help and examples. |
Review details
Suppressed comments (3)
src/azure-cli/azure/cli/command_modules/acs/custom.py:2504
- When the GitHub asset payload contains an explicit
"digest": null,asset.getreturnsNoneandre.fullmatchraisesTypeErrorinstead of the intendedClientRequestError. Treat non-string values as an invalid digest so malformed or older release metadata fails cleanly.
if not re.fullmatch(r'sha256:[0-9a-fA-F]{64}', digest):
src/azure-cli/azure/cli/command_modules/acs/custom.py:2422
- Because this guard is truthiness-based,
az aks install-desktop --version ""skips semantic-version validation and silently falls through to/latest, installing a different version than the user supplied. Use an explicitis not Nonecheck so every supplied value, including an empty string, is rejected.
if version:
src/azure-cli/azure/cli/command_modules/acs/tests/latest/test_custom.py:1052
- This cleanup assertion is vacuous:
mock_downloadis a mock and never creates the path, soexistsis already false even ifTemporaryDirectoryfails to remove a downloaded artifact. Make the mock createdestinationbefore returning, then assert that the path is absent after the workflow.
self.assertFalse(os.path.exists(mock_download.call_args[0][1]))
- Files reviewed: 5/5 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Member
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
Member
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
az aks install-desktop: Add AKS Desktop installation
Member
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
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.
🤖 PR Validation —⚠️ Review suggested
Summary
az aks install-desktopwith latest-stable installation by default and optional--versionValidation
test_customsuite: 80 tests run, 1 skipped, no failures.xdg-openhandoff with an isolated harmless handler confirms the retained installer remains readable after the command returns.git diff --checkpass.az aks install-desktop -hrenders the arguments, examples and installer-retention guidance./polishand CodeRabbit reviews completed; review findings were addressed.