Skip to content

feat(vulnerabilities): add additional severity indicators and improve layout - #20363

Merged
secustor merged 2 commits into
renovatebot:mainfrom
Churro:feat-vulnerability-description
Feb 13, 2023
Merged

secustor merged 2 commits into
renovatebot:mainfrom
Churro:feat-vulnerability-description

Conversation

@Churro

@Churro Churro commented Feb 13, 2023 •

Copy link
Copy Markdown
Collaborator

Changes

Refines the presentation of OSV-provided vulnerabilities:

  • Prevent showing Unknown severity whenever possible:
    • ~15% of GitHub advisories only provide a severity description, no CVSS score. The change in this PR causes Critical, Moderate, etc. to be shown, if there is no CVSS information available.
    • 254 / 1051 RUSTSEC vulnerabilities (and probably others too) store the CVSS score in affected.database_specific.cvss -> read it, if no CVSS information is given in the top-level severity field.
  • Cosmetics:
    • Prepend CVSS to the severity score. Score is ambiguous, as there are different scoring schemes for vulnerabilities.
    • Refer to the CVSS vector as "Vector String", as it is also named as such in the CVSS 3.1 specification.
    • Sometimes vuln details make use of Markdown headings. The change in this PR coerces them to be hierarchically lower than Details in order to preserve the foreseen layout.
    • Indentation of items under "More information" is increased to make Details, Severity, and References better distinguishable from the initial summary. Also looks more appealing on Bitbucket, where no fold-out is supported.

Context

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • No documentation update is required

How I've tested my work (please select one)

I have verified these changes via:

  • Code inspection only, or
  • Newly added/modified unit tests, or
  • No unit tests but ran on a real repository, or
  • Both unit tests + ran on a real repository

Direct comparison:

@viceice
viceice requested review from rarkins and secustor February 13, 2023 06:08
@secustor

Copy link
Copy Markdown
Member

As we start to beautify this feature, do you have considered to move the CVEs in a nested collapsibale?
Like we already do on the dependency dashboard with managers and deps.

The header should only show up if there are any and the first layer would be the current headlines.

@Churro

Churro commented Feb 13, 2023 •

Copy link
Copy Markdown
Collaborator Author

As we start to beautify this feature, do you have considered to move the CVEs in a nested collapsibale?

Good suggestion. I already tried this but as always there are some constraints, e.g.:

  • Collapsing is not supported on Bitbucket and looks different on Github and Gitlab in terms of spacing
  • Different advisories can describe the same CVE with different text / severity. Grouping by CVE would require combining them. Summary, description and severity may still differ for the same CVE
  • Not all vulnerabilities have CVEs assigned, sometimes only GHSA or RUSTSEC advisories without CVE alias exist

I'll give the collapsing another try but not in this PR👍

@secustor
secustor enabled auto-merge (squash) February 13, 2023 17:29
@secustor
secustor merged commit a9ef562 into renovatebot:main Feb 13, 2023
@renovate-release

Copy link
Copy Markdown

🎉 This PR is included in version 34.136.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Mar 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants