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

feat: paths always shown where available #1480

Merged
merged 1 commit into from
Oct 28, 2020

Conversation

iamtmrobinson
Copy link
Contributor

@iamtmrobinson iamtmrobinson commented Oct 16, 2020

  • Ready for review
  • Follows CONTRIBUTING rules
  • Reviewed by Snyk internal team

What does this PR do?

Currently paths for top-level dependencies that have a vuln are only shown if the all flag is passed to --show-vulnerable-paths. This can be a bit confusing and some people don't understand why they're not seeing an "introduced by:" line for these top-level deps (e.g. if you have a direct dependency of adm-zip@0.4.7)

This PR changes that so that whenever a path is available it will also be shown when the default of some is used for show-vulnerable-paths

@iamtmrobinson iamtmrobinson requested review from a team as code owners October 16, 2020 15:53
@ghost ghost requested review from admons and anthogez October 16, 2020 15:53
@iamtmrobinson iamtmrobinson force-pushed the feature/paths-always-displayed-when-available branch from 0b6645c to bbe872a Compare October 16, 2020 16:59
@github-actions
Copy link
Contributor

github-actions bot commented Oct 16, 2020

Expected release notes (by @iamtmrobinson)

features:
paths always shown where available (bbe872a)

  • I hereby acknowledge these release notes are 🥙 AWESOME 🥙

if (
testOptions.showVulnPaths === 'some' &&
paths &&
paths.find((p) => p.length > 2)
paths.find((p) => p.length > 1)
Copy link
Contributor

@JackuB JackuB Oct 19, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just curious, should this affect JSON output as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JackuB off the top of your head, do you know if the JSON output is affected by the --show-vulnerable-paths option?

@iamtmrobinson iamtmrobinson merged commit 10396d1 into master Oct 28, 2020
@iamtmrobinson iamtmrobinson deleted the feature/paths-always-displayed-when-available branch October 28, 2020 16:41
@snyksec
Copy link

snyksec commented Oct 28, 2020

🎉 This PR is included in version 1.421.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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