-
Notifications
You must be signed in to change notification settings - Fork 238
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
Topic: discuss npm-audit-resolver
needs
#372
Comments
The main idea behind ignoring issues using audit-resolver is the precision with which it works. The vulnerability is ignored not on the package level, but a specific path in dependency tree and if the same vulnerable package surfaces elsewhere - potentially as a dependency of a dependency where it does get called in production code. In that case the warning needs to come back. npm7's audit output is not structured the way it used to in npm6, but it contains almost all of the necessary information. I can reindex it to produce paths in dependency tree that audit-resolver uses. The only thing that's missing is deduplication. Example:
But I don't need all of them. ASK1: An indicatoin of thta fact with a simple boolean or Current audit doesn't seem to have enough information available in it to construct a valid fix command - install or update, dev dependency or not, depth, that's missing from the audit output in npm7 and audit-resolver doesn't have a command to run to fix an individual issue and record the fact it was fixed. ASK2: add a ASK3: tell me how to check it or add a field explaining if it's a production or dev dependency |
@darcyclarke Sorry I didn't make it for the previous meeting. Can we get it in tomorrow? |
iirc I thought there was an issue with the |
@G-Rath I'm done implementing the reindexing that lets me go back to using |
@naugtur I've been working on implementing using Just wanted to let you know in case you didn't already know that, as for me this is currently a pretty big blocker since its not feasible to require a successful I've proposed implementing a Alternatively of course this wouldn't be an issue if the v7 audit results included the version and path information like v6 did 🤷 |
Thanks for letting me know. It didn't come up in my testing. On the most recent npm RFC meeting we reviewed what resolver depends on and I got some pointers that help address my asks. I found where I want to add it in arborist, but don't know how to figure out it's a top level dependency yet. Anyway, I'll add a boolean field denoting if an item is a direct dependency and that eliminates the need for npm ls. |
@naugtur if the only information you're missing is if something is a top level dependency, could you not just read the |
I'd need to implement all the npm features re. finding the right package.json location. With npmrc and workspaces etc. |
Isn't that something you already have to do to call |
btw, I've had a closer re-look into the audit output of v7, and it doesn't seem to be properly mappable to a full and complete set of dependency paths with IMO this all points to the need to have a formalised format that audit data includes to ensure that this data is just available to us as part of the audit, rather than having to try and piece it back together after the fact. For me, the critical missing properties are which versions of the vulnerable packages are actually installed (which has to be known by the auditor in order to be able to order in the first place), and the full path to those packages in the dependency tree (which again the auditor should know already). |
What you're describing seems more like a bug than missing feature TBH. |
I agree 🙂 |
The text was updated successfully, but these errors were encountered: