Skip to content

Winget COM API - Allow lower trust registration#2714

Merged
Martí Climent (marticliment) merged 3 commits intoDevolutions:mainfrom
Schtenk:main
Sep 14, 2024
Merged

Winget COM API - Allow lower trust registration#2714
Martí Climent (marticliment) merged 3 commits intoDevolutions:mainfrom
Schtenk:main

Conversation

@Schtenk
Copy link
Copy Markdown
Contributor

  • I have read the [contributing guidelines] (https://github.com/marticliment/WingetUI/blob/main/CONTRIBUTING.md#coding), and I agree with the Code of Conduct.
  • Have you checked that there aren't other open pull requests for the same changes?
  • Have you tested that the committed code can be executed without errors?
  • This PR is not composed of garbage changes used to farm GitHub activity to enter potential Crypto AirDrops.
    Any user suspected of farming GitHub activity with crypto purposes will get banned. Submitting broken code wastes the contributors' time, who have to spend their free time reviewing, fixing, and testing code that does not even compile breaks other features, or does not introduce any useful changes. Thank you for your understanding.

Fixes winget class registration failing when running as admin by allowing lower trust registration.

Adds a toggle for allowing lower trust registration in winget section of UnigetUI settings.


Closes #XXXX

Relates to #XXXX

@Schtenk
Copy link
Copy Markdown
Contributor Author

From my limited understanding of the windows registry, light research and personal testing it seems that winget COM API only registers as a lower than admin trust (or current user, i.e. not local machine wide), because of this allowing lower trust registration is needed when running as admin.

@marticliment
Copy link
Copy Markdown
Collaborator

Do you think enabling this setting by default is a security concern? I couldn't find any docs on microsoft learn, I'll continue my research though

@Schtenk
Copy link
Copy Markdown
Contributor Author

I don't feel I can confidently say since I don't know all the ins and outs of the windows registry and user privileges in windows.
The documentation and mentions about the flag seems very scarce.

The first search result in google and the only usage I could find was in ComUtils.cs from the WingetCLI github repo.
Which is then used through LocalServerInstanceInitializer.cs
in the test in InstanceInitializersSource.cs all from said repo.

@marticliment Martí Climent (marticliment) changed the title Winget COM APO - Allow lower trust registration Winget COM API - Allow lower trust registration Sep 14, 2024
@marticliment Martí Climent (marticliment) merged commit b14906a into Devolutions:main Sep 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants