Skip to content

Commit

Permalink
Merge pull request #1537 from greenbone/mergify/bp/gvmd-21.04/pr-1536
Browse files Browse the repository at this point in the history
Add NVT tag "deprecated" (backport #1536)
  • Loading branch information
timopollmeier authored May 28, 2021
2 parents e73382f + fe3e7e3 commit 49b36f9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [21.4.1] (unreleased)

### Added
- Add NVT tag "deprecated" [#1536](https://github.com/greenbone/gvmd/pull/1536)

### Changed
- Update default log config [#1501](https://github.com/greenbone/gvmd/pull/1501)

Expand Down
8 changes: 7 additions & 1 deletion src/manage_sql_nvts.c
Original file line number Diff line number Diff line change
Expand Up @@ -1244,7 +1244,7 @@ nvti_from_vt (entity_t vt)
const char *id;
entity_t name, summary, insight, affected, impact, detection, solution;
entity_t creation_time, modification_time;
entity_t refs, ref, custom, family, category;
entity_t refs, ref, custom, family, category, deprecated;
entity_t severities, severity;

entities_t children;
Expand Down Expand Up @@ -1468,6 +1468,12 @@ nvti_from_vt (entity_t vt)
}
nvti_set_category (nvti, atoi (entity_text (category)));

deprecated = entity_child (custom, "deprecated");
if (deprecated)
{
nvti_add_tag (nvti, "deprecated", entity_text (deprecated));
}

return nvti;
}

Expand Down

0 comments on commit 49b36f9

Please sign in to comment.