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

'npm audit' alternative #5840

Closed
maximousblk opened this issue May 25, 2020 · 5 comments
Closed

'npm audit' alternative #5840

maximousblk opened this issue May 25, 2020 · 5 comments
Labels
feat new feature (which has been agreed to/accepted)

Comments

@maximousblk
Copy link

I don't know enough about how npm listed vulnerabilities about dependencies, but I was wondering if there is a solution or a plan for such a solution. This would be required when deno gets a bit more mainstream and new vulnerabilities are discovered. Then there has to be a system to notify the users of such issues for them to take action.

Just a thought.

@nayeemrmn
Copy link
Collaborator

As I commented there, we should consider documenting #5161 for this use.

@ry
Copy link
Member

ry commented May 25, 2020

There isn't a solution nor a plan for it. It's certainly useful functionality. I'll leave this issue marked as feature, tho I'm not sure if this belongs in the CLI itself or should be done by source repositories.

@ry ry added the feat new feature (which has been agreed to/accepted) label May 25, 2020
@maximousblk
Copy link
Author

maximousblk commented May 25, 2020

In order for this to work, there needs to be a way to mark certain versions as deprecated or vulnerable. This is impossible to do by editing the file itself due to the integrity check.

A new module can be made for assigning files as insecure.

This would work like this:

In a separate file, an array of insecure versions are listed.

Then in the main module, the "security check function" is imported from the "security" module and passed in the current version of the module. If it matches any of the listed versions, it logs a message about the vulnerability listed in the separate file.


One thing to consider about this solution is that it adds to the "boilerplate noise".

That's just a quick little workaround but I'm sure there can be better solutions.

Edit: backed off from the idea of a new standard module.

@maximousblk
Copy link
Author

maximousblk commented May 26, 2020

here is an example: maximousblk/audit

@maximousblk
Copy link
Author

Discussion moved to #8699

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat new feature (which has been agreed to/accepted)
Projects
None yet
Development

No branches or pull requests

3 participants