-
Notifications
You must be signed in to change notification settings - Fork 9
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
Ability to ignore vulns #57
Conversation
src/lib.rs
Outdated
|
||
pub fn filter_vulnerabilities(packages: &mut Vec<Coordinate>, exclude_vuln_file_path: String) { | ||
let filter_list_str = fs::read_to_string(exclude_vuln_file_path).expect("Unable to read file"); | ||
let filter_list_json: FilterList = serde_json::from_str(&filter_list_str).expect("JSON was not well formatted"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would probably be a good idea to do something like this serde example which uses from_reader
with a BufReader
to stream the data from disk directly to the parser. It will be slightly more performant
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In: 546bb80
Much of the rust ecosystem uses TOML rather than JSON. Are we expecting to have cross-over with |
@amy-keibler not so much crossover, but just like, keeping it common amongst the tools. It's different in Nancy, however, so who knows 🤷 |
Do they only filter by the UUID or is there a more user-facing way to build up the filter file? (I'm not super familiar with the way we specify vulnerabilities yet, so I added a |
@amy-keibler in nancy we allowed filtering by title, but auditjs we only do uuid (which I suspect is reasonable, as long as we output it, whichhhh I should do in this too). |
This is largely a transposition of what we do in
auditjs
, but I doubt it's right, so opening a PR for feedback!This pull request makes the following changes:
filter_vulnerabilities
tolib.rs
, I didn't think this fully merited a huge implementation quite yetauditjs
which is:ignore_file
param forpants
It relates to the following issue #s: