Improve Report UI
nprail opened this issue Β· 18 comments
The report UI doesn't look super great and could be better. Let's improve it.
To-Do
- Improve Report UI
Hi @nprail,
I have a suggestions for you:
- Would be good to have an option for CLI to enable/disable showing unique vulnerabilities. For example if you have installed
imagemin-webpack-plugin@2.3.0
then you will have 6 vulnerabilities, because oftunnel-agent@0.4.3
but they are same vulnerabilities. - Also as you can see here I have added collapsable for "Reasons" section (which makes sense if point 1 is a case). Note that it is CSS only solution, mainly because these kind of reports are used in CI-s where you don't want to (or can't) have JS.
Is someone still interested in working on this? I landed here because I was looking for a way to filter a table of just the high risk vulnerabilities.
Is someone still interested in working on this?
To be honest, is in my ToDo list in a while, but I didn't have time to see it yet. Feel free to open a PR, because i'm not part of the team. :P
@giocodes I am planning on working on this at some point soon. But like @AdrianoCahete said, PRs are welcome!
Are you looking for filtering after the report was generated or during? For example, you could achieve filtering by doing this:
npm audit --json --audit-level=high | npm-audit-html
Okay, so turns out that --json
outputs everything regardless of the other flags like --audit-level
or --only
(although, --production
does affect the JSON output). So filtering does have to be done by npm-audit-html
.
Aw too bad the flag does not work.
Yeah, I'll be happy to help. πWhat do you all have in mind for the new UI to look like?
I want to suggest a table where vulnerabilities can be sorted and users can choose the columns (information) they want to see. Similar to what Jira has for the issues view:
For npm-audit-html
it would be a lot simpler, no sidebar or tabs. Just the filters on top and the sortable table. Let me know what you think @nprail @SAIGlobal
@giocodes Actually, determining what the improved look should be is most of why I haven't done it yet. So feedback like this is great! πππ
I like the idea of a sortable/filterable table that you can open collapses (or modals) to see more details for each vulnerability.
@AdrianoCahete @giocodes
What primary information do you think should be visible/sortable? My thoughts are name, severity, and vulnerable module name at least. Maybe a date published and/or link to the advisory as well?
What primary information do you think should be visible/sortable? My thoughts are name, severity, and vulnerable module name at least. Maybe a date published and/or link to the advisory as well?
If possible, everything (why not give the user that degree of customization?). But the most important ones are severity
, CVE
, name
and module name, I think.
About the UI, my first idea was design an UI for this, but I'm with a lack of time this months. :(
@AdrianoCahete Sure, giving the option to add any sortable columns to the table would be best. I just meant, what should the default columns be.
The trouble with CVE is that it is an array of CVEs. There can be more than one. Would it make sense to group them all into one column?
Example:
Name | Severity | Module | CVEs |
---|---|---|---|
Arbitrary File Overwrite | High | fstream | CWE-59, CVE-2019-13173 |
Is the palette easy to change? On my screen the green colors don't seem to have enough contrast.
Maybe you could try the color palette from https://material.io/design/color/dark-theme.html#anatomy
Yep, totally. I think I'll add a CLI option for dark or light mode.
I'll definitely be making adjustments to the color palette too.
Hope this will roll out soon. I have a small suggestion, It would be great if there is a breakdown of total no of issues based on the severity also.
@nikhilgeo I'll be working on finishing this up and hopefully releasing a new version with it tomorrow!
I'm probably going to make dark mode an option but not the default.
Awesome, thank you for the new looks. Looking forward for the new release.
π This issue has been resolved in version 1.4.0 π
The release is available on:
Your semantic-release bot π¦π