Skip to content
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

ElevationRequirement: elevationProhibited appears to not be respected unless it's at the root level. #155885

Open
stephengillie opened this issue May 30, 2024 · 1 comment
Labels
Area-Validation-Pipeline Issues related to the manifest validation pipeline. Issue-Bug It either shouldn't be doing this or needs an investigation.

Comments

@stephengillie
Copy link
Collaborator

stephengillie commented May 30, 2024

Brief description of your issue

Why does 910cce4 pass validation (comment), but 84484dc fail validation (comment)? The only difference being ElevationRequirement: elevationProhibited in the YAML root (pass) vs individual installer nodes (fail)?

Steps to reproduce

  • Have a manifest for a package which requires ElevationRequirement: elevationProhibited.
  • Move that node from the root level to under the Installers level.

Expected behavior

The package manager would install the pacakge in a non-elevated way.

Actual behavior

The package manager attempts an elevated install, which fails.

Environment

#154823 (comment)

Windows Package Manager v1.7.11261
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.19044.1288
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.22.11261.0

Winget Directories
-----------------------------------------------------------------------------------------------------------------------
Logs                               %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\Diag…
User Settings                      %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\sett…
Portable Links Directory (User)    %LOCALAPPDATA%\Microsoft\WinGet\Links
Portable Links Directory (Machine) C:\Program Files\WinGet\Links
Portable Package Root (User)       %LOCALAPPDATA%\Microsoft\WinGet\Packages
Portable Package Root              C:\Program Files\WinGet\Packages
Portable Package Root (x86)        C:\Program Files (x86)\WinGet\Packages
Installer Downloads                %USERPROFILE%\Downloads

Links
---------------------------------------------------------------------------
Privacy Statement   https://aka.ms/winget-privacy
License Agreement   https://aka.ms/winget-license
Third Party Notices https://aka.ms/winget-3rdPartyNotice
Homepage            https://aka.ms/winget
Windows Store Terms https://www.microsoft.com/en-us/storedocs/terms-of-sale

Admin Setting                             State
--------------------------------------------------
LocalManifestFiles                        Enabled
BypassCertificatePinningForMicrosoftStore Disabled
InstallerHashOverride                     Disabled
LocalArchiveMalwareScanOverride           Enabled
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Triage This work item needs to be triaged by a member of the core team. label May 30, 2024
@Trenly
Copy link
Contributor

Trenly commented May 31, 2024

Based on the behavior shown in the mentioned PR, the CLI is actually doing the right thing. This is indicated by the error being thrown by the CLI and not the Spotify Installer

2024-05-27 10:36:49.959 [CLI ] The installer cannot be run from an administrator context.

In this case, it's the validation pipelines that aren’t doing the right thing, so this issue should be moved to the winget-pkgs repo

@microsoft-github-policy-service microsoft-github-policy-service bot removed the Needs-Triage This work item needs to be triaged by a member of the core team. label May 31, 2024
@denelon denelon transferred this issue from microsoft/winget-cli May 31, 2024
@denelon denelon added Area-Validation-Pipeline Issues related to the manifest validation pipeline. Issue-Bug It either shouldn't be doing this or needs an investigation. labels May 31, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Triage This work item needs to be triaged by a member of the core team. label May 31, 2024
@denelon denelon removed the Needs-Triage This work item needs to be triaged by a member of the core team. label May 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Validation-Pipeline Issues related to the manifest validation pipeline. Issue-Bug It either shouldn't be doing this or needs an investigation.
Projects
None yet
Development

No branches or pull requests

3 participants