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

Added the deprecated_by field to CPEs #2751

Merged
merged 4 commits into from
Feb 23, 2021

Conversation

y0urself
Copy link
Member

What:

  • Added the deprecated_by field to CPEs (again?)

Why:

  • This field was missing. While refactoring CPEs for GraphQL I came across this field in the details.js. So I parsed the field in the model:
    image

How:

Checklist:

@y0urself y0urself requested a review from a team February 23, 2021 11:38
@codecov
Copy link

codecov bot commented Feb 23, 2021

Codecov Report

Merging #2751 (79f1b9c) into gsa-21.04 (34466a4) will increase coverage by 0.14%.
The diff coverage is 100.00%.

Impacted file tree graph

@@              Coverage Diff              @@
##           gsa-21.04    #2751      +/-   ##
=============================================
+ Coverage      53.71%   53.86%   +0.14%     
=============================================
  Files           1072     1074       +2     
  Lines          26223    26210      -13     
  Branches        7474     7474              
=============================================
+ Hits           14086    14117      +31     
+ Misses         11019    10977      -42     
+ Partials        1118     1116       -2     
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% <ø> (ø)
gsa/src/gmp/collection/parser.js 61.70% <ø> (ø)
gsa/src/gmp/command.js 100.00% <ø> (ø)
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 262 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 d339258...342f709. Read the comment docs.

@@ -51,6 +51,12 @@ class Cpe extends Info {
delete ret.update_time;
}

if (isDefined(ret.raw_data) && isDefined(ret.raw_data['cpe-item'])) {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if (isDefined(ret.raw_data) && isDefined(ret.raw_data['cpe-item'])) {
if (isDefined(ret?.raw_data['cpe-item'])) {

gsa/src/gmp/models/cpe.js Outdated Show resolved Hide resolved
gsa/src/web/pages/cpes/details.js Outdated Show resolved Hide resolved
@@ -36,7 +38,7 @@ import TableRow from 'web/components/table/row.js';

import {Col} from 'web/entity/page';

const CpeDetails = ({entity}) => {
const CpeDetails = ({entity, links = true}) => {
const {title, nvd_id, deprecated_by, updateTime, status, severity} = entity;
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
const {title, nvd_id, deprecated_by, updateTime, status, severity} = entity;
const {title, nvd_id, deprecatedBy, updateTime, status, severity} = entity;

gsa/src/web/pages/cpes/details.js Outdated Show resolved Hide resolved
gsa/src/gmp/models/__tests__/cpe.js Outdated Show resolved Hide resolved
gsa/src/gmp/models/__tests__/cpe.js Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
@swaterkamp swaterkamp merged commit 97d65d9 into greenbone:gsa-21.04 Feb 23, 2021
@y0urself
Copy link
Member Author

@bjoernricks is it possible to use Mergify to backport this to master?

y0urself added a commit that referenced this pull request Feb 24, 2021
Added the deprecated_by field to CPEs (bp #2751)
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