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

Adjust parsing in cve model #2294

Merged
merged 5 commits into from
Jul 3, 2020
Merged

Conversation

sarahd93
Copy link
Contributor

@sarahd93 sarahd93 commented Jul 3, 2020

Fix parsing in cve model.

This fixes

  • missing reference identifiers
  • disappearing vulnerable products section
  • missing published and last updated dates

It also removes the cwe id as this has not been displayed starting with GOS 5 and seems not to be needed anymore.

Checklist:

@sarahd93 sarahd93 marked this pull request as ready for review July 3, 2020 07:37
@sarahd93 sarahd93 requested review from a team, bjoernricks and swaterkamp July 3, 2020 07:37
@sarahd93 sarahd93 marked this pull request as draft July 3, 2020 07:41
@codecov
Copy link

codecov bot commented Jul 3, 2020

Codecov Report

Merging #2294 into gsa-9.0 will increase coverage by 2.89%.
The diff coverage is 88.17%.

Impacted file tree graph

@@             Coverage Diff             @@
##           gsa-9.0    #2294      +/-   ##
===========================================
+ Coverage    47.36%   50.25%   +2.89%     
===========================================
  Files         1045     1070      +25     
  Lines        24129    25159    +1030     
  Branches      6745     7143     +398     
===========================================
+ Hits         11428    12644    +1216     
+ Misses       11560    11370     -190     
- Partials      1141     1145       +4     
Impacted Files Coverage Δ
gsa/src/gmp/cancel.js 100.00% <ø> (ø)
gsa/src/gmp/capabilities/capabilities.js 100.00% <ø> (ø)
gsa/src/gmp/capabilities/everything.js 100.00% <ø> (ø)
gsa/src/gmp/collection/collectioncounts.js 82.60% <ø> (+30.43%) ⬆️
gsa/src/gmp/command.js 100.00% <ø> (ø)
gsa/src/gmp/commands/agents.js 30.43% <ø> (ø)
gsa/src/gmp/commands/alerts.js 14.28% <ø> (ø)
gsa/src/gmp/commands/audits.js 52.45% <ø> (ø)
gsa/src/gmp/commands/auth.js 100.00% <ø> (ø)
gsa/src/gmp/commands/certbund.js 63.63% <ø> (ø)
... and 324 more

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 c9dd20e...489457f. Read the comment docs.

@sarahd93 sarahd93 marked this pull request as ready for review July 3, 2020 11:55
ret.publishedTime = parseDate(entry['published-datetime'].__text);
ret.lastModifiedTime = parseDate(entry['last-modified-datetime'].__text);
ret.publishedTime = parseDate(entry['published-datetime']);
ret.lastModifiedTime = parseDate(entry['last-modified-datetime']);

ret.references = map(entry.references, ref => ({
name: ref.reference.__text,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is still working with __text and ret.source is not?

Copy link
Contributor Author

@sarahd93 sarahd93 Jul 3, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem is not that __text is not working anymore. The difference is having <foo>text</foo> and <foo id=123>text</foo> or <foo>text <bar /></foo>. For the first one __text does not work anymore but for the other two it does work and is actually needed.

@sarahd93 sarahd93 merged commit 907d615 into greenbone:gsa-9.0 Jul 3, 2020
@sarahd93 sarahd93 deleted the cve_references_gsa9 branch July 3, 2020 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants