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

Add Remediation advice to each library vuln #3524

Closed
benschwarz opened this issue Oct 10, 2017 · 11 comments · Fixed by #14194
Closed

Add Remediation advice to each library vuln #3524

benschwarz opened this issue Oct 10, 2017 · 11 comments · Fixed by #14194

Comments

@benschwarz
Copy link
Contributor

The no-vulnerable-libraries audit detects and lists security vulnerabilities, but is not able to be used "offline" because there is no remediation advice to go with the vulns.

This means we're not able to format lighthouse 'advice' or 'opportunities' as we do elsewhere.

Current output from no-vulnerable-libraries audit:

screen shot 2017-10-11 at 9 22 50 am

Information we don't have in the audit but need:

https snyk io partners api v2 vulndb clientside json 2017-10-11 09-57-42

Having the semver ranges would be useful, but we'd also need to know the current released version of a given library (Snyk vuln page):

cross-site scripting xss snyk 2017-10-11 09-27-46

If we can have the current released version of a given library added to the snyk client API, then I think we'll be able to do everything that we want.

Ping @tkadlec

@paulirish
Copy link
Member

Without explicit remediation advice in the JSON we can still do something similar. We can use the semver lib to interpret the affected version ranges. From that we can calculate the highest affected version.

That means we couldn't necessarily say "You need to upgrade to version 3 or higher" but we could say something like "You gotta upgrade this lib to a version over 2.6.1".

Good second/third bug here. :) @benschwarz you interested in taking this?

@benschwarz
Copy link
Contributor Author

Yep. Leaving it on my list

@evenstensberg
Copy link
Contributor

@benschwarz if you're full I can take it

@3Q5278
Copy link

3Q5278 commented Feb 23, 2019

good

@connorjclark
Copy link
Collaborator

@benschwarz @evenstensberg any takers? :)

@evenstensberg
Copy link
Contributor

evenstensberg commented May 21, 2019

Could work on this in June. Wrapping up some other work first.

@evenstensberg
Copy link
Contributor

I'll take it

@evenstensberg
Copy link
Contributor

evenstensberg commented May 27, 2019

I've asked a guy that works at Snyk for any help regarding getting that prop from the vuln db, but what I think we could do, is to add the fixedIn property from the vulnDB and use that to figure out which actions to take. That prop is already present in the vuln db, along with semver ranges for unaffected versions.

Edit: Fixed in is our source of truth. Has a prop that indicates what we should output disregarding semver ranges.

Should I go for that?

@patrickhulce
Copy link
Collaborator

Sounds great to me @evenstensberg! In fact, I actually think if we don't have any fixedIn value we shouldn't surface the vuln at all to prevent cases like #8409 #8748

@evenstensberg
Copy link
Contributor

Yup. @lirantal from snyk is following up on this

@lirantal
Copy link
Contributor

lirantal commented Sep 15, 2019

hey fellas, @evenstensberg @patrickhulce 👋
notice that we (@aviadatsnyk) added a fixedIn field to the clientside.json file we're sending you so you should be able to use that to get more insights out in terms of available fixed version.

Notice that to get the data you probably need to tweak the pruned data here to include it https://github.com/GoogleChrome/lighthouse/blob/master/lighthouse-core/scripts/cleanup-vuln-snapshot.js#L56 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants