-
Notifications
You must be signed in to change notification settings - Fork 43
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
[Feature]: Fail on whitelisted advisories that are not found #136
Comments
Hi there, Thanks for this great writeup! I wholeheartedly agree that we should at least a flag to enforce this behaviour. I will work on that soon 😄 I agree that The other option we have is to introduce a breaking change Introducing this behaviour as default would most likely break some CIs, but this is appropriate for most environments IMO. Would love some more feedback! CC: @andy-patt |
Thanks Quinn. Personally, I'd welcome the breaking change to have fail-by-default behaviour because |
I think not failing by default is reasonable as the impact of the original CVE, which was whitelisted, hasn't changed now that a fix has been made available. IMO keeping dependencies always up to date is out of scope for this tool and should be handled with other tooling. That being said, it's not a problem to use the default being discussed here - just providing my opinion.
Can this actually happen? I would think a new CVE would have to be created. For example, CVEs always include the year. If this were to re-appear a year later, I would think the year would be updated. I think the use case of re-assessing after the use of a library has changed is relevant, but not entirely solved by the change being discussed. Perhaps adding an expiry to the whitelist could also help. |
I missed that we have the flag I propose to merge them into a single flag that allows users to specify their desired behaviour. The configurable behaviours would be something along the lines of: Some ideas for the flag name are: To exhaust all possibilities for this configuration, there's also the option of having per-package overrides for the To me, it seems like more work as the end-user to handle manually configuring which not-found vulnerable dependencies to |
So, probably more into than anyone needs to read because I'm happy with the flag suggestions above, but just to clarify my edge case: The CVE 'reappearance' would be if the 'unpatched' version of a transitive dependency that was previously 'fixed' for one library, appears as a transitive dependency in another library. Say Time passes...
Time passes A develop adds And if you followed that, well done! It's niche, I admit. |
TL;DR: the Let's consider some workflows: If a user is using a lock file ( If a user is not using a lock file, the transitive dependencies will be updated automatically. The whitelist will be redundant, but in an intrusive manner. The build will break because a vulnerability has been fixed automatically. IMO, the There are three types of whitelists that users can perform with this tool: In the case that @dgjbge provided, this would be a non-issue if the original whitelist was performed using However, if the author used either the Thus, this problem comes down to the usage of the This package doesn't make distinctions between dependencies and devDependencies for many reasons. All in all, the |
Just a note on the module path whitelist as sometimes it's not practical. Last month we many hundreds of reported vulns in per project due to a CVE in "acorn" that was included many times in the many dependencies of jest and webpack. So, while path whitelists might be the 'right way', I don't think anyone is going to add 100's of paths over multiple repos! |
Hi, thanks for this great tool, here's an idea I've been thinking about:
The process for managing CVEs is typically to attempt to patch the affected libraries and if no patch is available, verify the risk of the CVE and if it is low, whitelist the CVE.
At some point the issue is fixed in an dependency, and the CVE no longer needs to be whitelisted and audit-ci helpfully gives a message about this, but since a CI build somewhere does not fail, this message is generally ignored.
This potentially becomes an issue in cases where the CVE reappears in the future, maybe in a different library, or maybe in the same one, but after the use of that library has materially changed. In these cases the CVE should be reassessed, but because the whitelist lingered in the config if is missed.
If there were a flag to give an error code .e.g.
--fail-not-found
then the above would be mitigated and it would also catch copy/paste mistakes where excessive advisories are whitelisted across multiple repos.Any thoughts?
Dave
The text was updated successfully, but these errors were encountered: