Check for .nsprc files in dependencies #53
Replies: 3 comments 27 replies
-
I think that is a great initiative we could start here, it shouldn't be a problem to look through the dependencies chain for the Perhaps we could start by simply checking if there is any The other issue that you raised; I have moved it over to the discussion board, I think that is a better place built for discussion rather than treating it as an "issue". (Side note: I'm actually working on the |
Beta Was this translation helpful? Give feedback.
-
Yes, it would be good to see what sort of information the tool can find in the The only danger I can imagine is a situation where someone is maintaining package (So it's not as simple as just taking the union of all |
Beta Was this translation helpful? Give feedback.
-
To provide some more context, you might be interested to read about a discussion in the React community titled "Help, npm audit says I have a vulnerability in react-scripts!" (issue 11174 of the Create React App repo). I won't link directly to the issue from here, as it might not be the right time to bring their attention to better-npm-audit yet, but it does seem like there is widespread demand for a tool that lets developers confirm that a specific vulnerability in one of their dependencies doesn't in practice make their package vulnerable. Once you've implemented a full version the feature request discussed above, you could offer this package as a solution, or I would be happy to mention it on your behalf, as a positive review from a satisfied user. 😄 |
Beta Was this translation helpful? Give feedback.
-
I don't know if the tool already does this, but it would be really great for the ecosystem if the maintainers of popular packages could include an
.nsprc
file in the packages they distribute. I'm imagining a situation where a package has a dependency on another packages which has a vulnerability reported against it, but the parent package isn't in practice exploitable because it doesn't use the affected code path.The tool would have to look at the dependency chain from the top level project down to the vulnerable package, and check all the relevant subdirectories of node_modules for an
.nsprc
file covering that vulnerability. However, it might not be possible to extract the necessary information from the vanillanpm audit
output, and we don't want excluded vulnerabilities from one package to influence the determination of validity of that vulnerability in another package, so this will require some careful consideration of edge cases.(By the way, I'm a little surprised that you've already closed the other ticket I filed this month, and limited conversation on it. If someone else came up with the same idea, they wouldn't be able to find my ticket by doing a search of the open Issues, and even if they did find it, they wouldn't be able to make improvement suggestions because of the restriction on commenting. Nevertheless, I do trust you that you won't forget about that ticket, and I look forward to trying the next update whenever it is released).
Beta Was this translation helpful? Give feedback.
All reactions