-
Notifications
You must be signed in to change notification settings - Fork 239
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
npm audit for a not yet installed package #232
base: main
Are you sure you want to change the base?
Conversation
I believe it should be an opt-out, so everytime an user runs |
@ruyadorno how would that affect |
So, even though there have been no new comments here, I was pretty convinced last week that putting this information into the However, @ruyadorno I agree with you that this is package data and it should possibly be available as output by npm view by default. So, I added the output to npm view too. @ljharb I added a I have updated the RFC accordingly. |
@Christian24 I think we only discussed making this optional information for I'd probably revert & keep this RFC scoped to As I think I also noted in the last call, we're going to probably need to create a temp directory to install into & resolve the package's dependencies. How the information will look when it's logged from I think we can circle back on this once you've updated/added detail on how the implementation/output would work/look (as noted above). P.S. For fun, I wrote a quick bash script to do this/walk through the steps in the interim https://gist.github.com/darcyclarke/6d9e9de555997e9aa9fe828fe1fdef7d |
Do note, because of |
@darcyclarke thanks for the feedback.
Not that I am against this, but I remember @ruyadorno pointing out it should be opt-out and @ljharb has a use case for
Okay, fine by me. I think adding it to
How the information will look when it's logged from There is some info in the RFC already, but I will check it against v7 and will try to update with some implementation details.
I will try the script tomorrow at work and see if it works in our strict environment. :) |
I was on the camp of moving it to Making the link with a previous discussion we had about validating license files, it was proposed that the license validation should also live along with audit and the main reason being that auditing was from its inception always intended to be more than just vulnerabilities check and it should encompass multiple kinds of validation for your project. With that in mind it seems to me that having individual auditing of packages live in |
@darcyclarke I tried your script. With npm v6 at least I get a 403 here. Couldn't try npm v7, because corporate restrictions. @ruyadorno Understood. I will remove all references to |
Sorry folks, this took quite a while. Since @darcyclarke's script does not work for me, I tried to go the route of adding a new endpoint for the CLI to query. I added some ideas of how this could be implemented. This might potentially be wrong, so it would be cool if @ruyadorno, @isaacs or someone from the CLI team could take a look. Additionally, I added some information on the |
Describes functionality for the CLI that allows users to request an advisory (aka npm audit report) on a package before installing it.
References
Closes #223