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

Fall back to cvss_base when severity subelement is missing from NVT severities #2944

Merged
merged 3 commits into from
May 26, 2021

Conversation

swaterkamp
Copy link
Member

What:
Fall back to cvss_base when severity subelement is missing from NVT severities

Why:
It's possible that after some migration without gvmd -rebuild the severity subelement is missing in the NVT severities. GSA broke in that case and just threw an error without proper fallback.

How:
Added a new test. Also manual check which information is shown on the detailspage for which condition.

Checklist:

  • Tests
  • CHANGELOG Entry
  • Labels for ports to other branches

@swaterkamp swaterkamp added port-to-main Use mergifiy to port PR to master port-to-21.10 labels May 26, 2021
@swaterkamp swaterkamp self-assigned this May 26, 2021
@swaterkamp swaterkamp requested a review from a team as a code owner May 26, 2021 13:07
@codecov
Copy link

codecov bot commented May 26, 2021

Codecov Report

Merging #2944 (7c16bf5) into gsa-21.04 (da7c00e) will increase coverage by 0.01%.
The diff coverage is 50.00%.

Impacted file tree graph

@@              Coverage Diff              @@
##           gsa-21.04    #2944      +/-   ##
=============================================
+ Coverage      53.84%   53.85%   +0.01%     
=============================================
  Files           1075     1075              
  Lines          26250    26250              
  Branches        7506     7506              
=============================================
+ Hits           14133    14136       +3     
+ Misses         11000    10997       -3     
  Partials        1117     1117              
Impacted Files Coverage Δ
gsa/src/gmp/parser/cvss.js 100.00% <ø> (ø)
gsa/src/web/pages/results/detailspage.js 12.32% <0.00%> (ø)
gsa/src/gmp/models/nvt.js 99.00% <100.00%> (ø)
gsa/src/web/entities/container.js 45.71% <0.00%> (+1.22%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a4d2e9d...7c16bf5. Read the comment docs.

@saberlynx saberlynx merged commit ddc17af into greenbone:gsa-21.04 May 26, 2021
@swaterkamp swaterkamp deleted the missingseverity branch May 26, 2021 13:45
saberlynx added a commit that referenced this pull request May 28, 2021
Fall back to cvss_base when severity subelement is missing from NVT severities (backport #2944)
saberlynx added a commit that referenced this pull request May 28, 2021
Fall back to cvss_base when severity subelement is missing from NVT severities (backport #2944)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
port-to-main Use mergifiy to port PR to master
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants