Skip to content

[npm] Only shortcut search when non-vuln version of advisory dep is found#5796

Merged
mctofu merged 1 commit intomainfrom
mctofu/vuln-shortcut
Sep 27, 2022
Merged

[npm] Only shortcut search when non-vuln version of advisory dep is found#5796
mctofu merged 1 commit intomainfrom
mctofu/vuln-shortcut

Conversation

@mctofu
Copy link
Copy Markdown
Contributor

@mctofu mctofu commented Sep 26, 2022

There can be other deps marked as vulnerable that aren't the advisory dep (locking parents) and we can't be sure that a non-vulnerable version of those deps doesn't still have a vulnerable version of the advisory dep as a child.

For ex for an advisory on C:

A -> B (vuln) -> C (vuln)
| -> D -> B(not vuln) -> C (vuln)

I haven't found real examples of this occurring yet but this is worth fixing since it could lead to PRs that don't fully fix an alert.

@mctofu mctofu marked this pull request as ready for review September 26, 2022 23:01
@mctofu mctofu requested a review from a team as a code owner September 26, 2022 23:01
Copy link
Copy Markdown
Contributor

@bdragon bdragon left a comment

Choose a reason for hiding this comment

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

Took me a second to wrap my brain around this, but makes sense 👍

There can be other deps marked as vulnerable that aren't the
advisory dep (locking parents) and we can't be sure that a
non-vulnerable version of those deps doesn't still have a
vulnerable version of the advisory dep as a child.
@mctofu mctofu force-pushed the mctofu/vuln-shortcut branch from cfd0650 to 4556f50 Compare September 26, 2022 23:51
@mctofu mctofu merged commit 086a2e0 into main Sep 27, 2022
@mctofu mctofu deleted the mctofu/vuln-shortcut branch September 27, 2022 01:10
@pavera pavera mentioned this pull request Oct 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants