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

Hash verification will fail if a package updated without changing download path #848

Closed
ChungZH opened this issue May 23, 2020 · 11 comments
Closed
Labels
Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work.
Milestone

Comments

@ChungZH
Copy link

ChungZH commented May 23, 2020

Description of the new feature/enhancement

Now, I found a problem with winget. The installer downloaded by some software packages does not specify a version.

For example, the WeChat:
image

This installer does not specify a certain version like WeChatSetup-2.9.exe. Therefore, when this program is updated, the value of SHA256 changes and you cannot install it. You must wait for someone to update this SHA256.

AND, the problem isn't only on WeChat. There are many softwares does not provide a certain version of the installation package.

Proposed technical implementation details (optional)

@ChungZH ChungZH added the Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. label May 23, 2020
@jamierocks
Copy link
Contributor

Yep, this keeps coming up sadly :(

@LightDestory
Copy link
Contributor

I agree, a lot of application that I would like to push uses a "latest" link option.
For now the user can only choose to continue the installation despite the hash missmatch, which is a very unsecure.
I tried to ask a software developer to provide a static download link to a fixed version but unfortunately it didn't work out.

@AgentK7
Copy link
Contributor

AgentK7 commented May 24, 2020

Yeah, that would be a problem but as already said

many publishers are doing it this way. Unfortunatly any solution that comes up my mind would pose a risk one way or another.

@ChungZH
Copy link
Author

ChungZH commented May 24, 2020

Maybe winget can learn from apt or other package managers, store the installer itself.
When the software is updated, let the contributors update him in winget repo!

@jamierocks
Copy link
Contributor

Maybe winget can learn from apt or other package managers, store the installer itself.
When the software is updated, let the contributors update him in winget repo!

The problem then becomes redistribution rights.

@AgentK7
Copy link
Contributor

AgentK7 commented May 24, 2020

And an Automatic Rehashing and update of the Manifest would pose a security risk because Microsoft can't know IF a Installer was simply updated OR swapped aut with an malicious one.

@jamierocks
Copy link
Contributor

jamierocks commented May 24, 2020

And an Automatic Rehashing and update of the Manifest would pose a security risk because Microsoft can't know IF a Installer was simply updated OR swapped aut with an malicious one.

Could always handle this by creating proposed PRS on this repo, that would need manual verification to merge.

@ghost
Copy link

ghost commented May 25, 2020

Some related issues: #278, #295, #627, microsoft/winget-cli#147, microsoft/winget-cli#307.

Also, as a suggestion, you may like to change the issue title to something more specific like "Hash verification will fail if a package updated without changing download path".

@ChungZH ChungZH changed the title A winget current problem Hash verification will fail if a package updated without changing download path May 25, 2020
@SoftCreatR SoftCreatR mentioned this issue May 30, 2020
@denelon
Copy link
Contributor

denelon commented Jan 6, 2021

We've implemented some automation to check when installers have changed behind vanity URLs. We generate a new manifest and if it passes validation, it gets merged.

@ghost ghost added the No-Recent-Activity No activity has occurred on this work item for seven days. label Jan 13, 2021
@ghost
Copy link

ghost commented Jan 13, 2021

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 7 days. It will be closed if no further activity occurs within 7 days of this comment.

@ghost ghost closed this as completed Jan 20, 2021
@lychichem
Copy link
Contributor

We've implemented some automation to check when installers have changed behind vanity URLs. We generate a new manifest and if it passes validation, it gets merged.

I have made two PRs to update tencent.wechat, but all of them fails at hash verification. And the bot didn't update the manifest too. So I wonder how long the pipeline caches a certain version installer? Or the donload site will provide an old installer to the pipeline server?

@ghost ghost removed the No-Recent-Activity No activity has occurred on this work item for seven days. label Jun 22, 2021
@denelon denelon added this to the 1.7 Packages milestone Nov 1, 2023
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work.
Projects
None yet
Development

No branches or pull requests

6 participants