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

Checking for known vulnerabilities #2204

Open
nx10 opened this issue May 31, 2022 · 7 comments
Open

Checking for known vulnerabilities #2204

nx10 opened this issue May 31, 2022 · 7 comments
Labels
Catalog-Health Some scenarios related to install/upgrade/import need improvements Issue-Feature This is a feature request for the Windows Package Manager client.

Comments

@nx10
Copy link

nx10 commented May 31, 2022

Description of the new feature / enhancement

winget should be able to check if there are known vulnerabilities for installed applications.

Proposed technical implementation details

Similar to npm audit which uses the GitHub advisory database, winget could list installed applications with known vulnerabilities with the command winget audit.

It should then list:

  • Severity
  • Vulnerabilty type
  • Link to security advisory (more information)

It should also show if there is a newer version available which fixes the vulnerability.

The main technical difficulty would be choosing and the maintaining database backend. Maybe the Github advisory database could be expanded.

@nx10 nx10 added the Issue-Feature This is a feature request for the Windows Package Manager client. label May 31, 2022
@ghost ghost added the Needs-Triage Issue need to be triaged label May 31, 2022
@denelon denelon removed the Needs-Triage Issue need to be triaged label May 31, 2022
@jedieaston
Copy link
Contributor

jedieaston commented May 31, 2022

Related to this: #872 (in which I commented the functionality could be used for this purpose)

@birbilis
Copy link

birbilis commented Jun 3, 2022

There's also a chance a newer version than you have installed has new (compared to ones existing in old version) known vulnerabilities. Shouldn't it similarly (not sure if doing by default would slow things down) warn before installing update?

Question is where would it get this info?

Also would it list vulnerabilities introduced by dependencies?

@nx10
Copy link
Author

nx10 commented Jun 3, 2022

There's also a chance a newer version than you have installed has new (compared to ones existing in old version) known vulnerabilities. Shouldn't it similarly (not sure if doing by default would slow things down) warn before installing update?

I think there should be a (possibly configurable) warning before installing applications with known vulnerabilities.

Question is where would it get this info?

As specified in the issue, I think the GitHub advisory database would fit well, but I left this purposefully vague as I am non a security expert.

Also would it list vulnerabilities introduced by dependencies?

Possibly. However depending on how (what features of) the dependencies are used a vulnerable dependency does not necessarily lead to a vulnerable downstream application.

@Trenly
Copy link
Contributor

Trenly commented Jun 16, 2023

@denelon - is this also Catalog-Health ?

@denelon denelon added the Catalog-Health Some scenarios related to install/upgrade/import need improvements label Jun 16, 2023
@denelon
Copy link
Contributor

denelon commented Jun 16, 2023

We've also looked at https://cve.mitre.org/ as another possible source for some of this data, but the mapping to WinGet package identifiers isn't straight-forward.

@jaytea33
Copy link

I tried using nvd.nist.gov because it goes by CPE name over CVE and (seemingly) aggregates with GitHub advisories and mitre, so with NVD going by CPE it makes it arguably the better option.

However, I ran into way too many issues trying to correlate the winget package names with CPE names to flag 0 or 1 for whether your current app version that winget detects has a known vulnerability or not, so denelon is right, it's difficult to match up with the package names, regardless of the source. You also have to space out the API calls carefully in your script to avoid rate limits unless you're especially skilled at grouping them together in a single API call.

Maybe someone more skilled than me with scripting can do it but I couldn't figure out a universal way to correlate the package names with the CPE names from NVD, there's so many special characters and truncations needed per app name

@denelon
Copy link
Contributor

denelon commented Mar 25, 2024

We've recently added a link to Repology over at the main README.md for the WinGet Community Repository. We're currently looking into better ways to handle correlation between WinGet package identifiers and reported CVE data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Catalog-Health Some scenarios related to install/upgrade/import need improvements Issue-Feature This is a feature request for the Windows Package Manager client.
Projects
None yet
Development

No branches or pull requests

6 participants