From 3ba3fdb3cf7480ab75d6eba8ac44dbae21c9d220 Mon Sep 17 00:00:00 2001 From: Timo Pollmeier Date: Wed, 26 May 2021 16:20:59 +0200 Subject: [PATCH 1/2] Add NVT tag "deprecated" The script tag "deprecated" is added to the custom tags stored in the NVTs "tag" field. --- src/manage_sql_nvts.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/manage_sql_nvts.c b/src/manage_sql_nvts.c index dbe52c445..50f359bfb 100644 --- a/src/manage_sql_nvts.c +++ b/src/manage_sql_nvts.c @@ -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; @@ -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; } From 6b8d2e6c2dc6365e3fdbe7d661a66a598e424ee2 Mon Sep 17 00:00:00 2001 From: Timo Pollmeier Date: Wed, 26 May 2021 16:27:15 +0200 Subject: [PATCH 2/2] Add CHANGELOG entry for NVT tag "deprecated" --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 36ddfdb1b..8b5773a90 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,6 +29,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) + ### Fixed - Improve VT version handling for CVE & OVAL results [#1496](https://github.com/greenbone/gvmd/pull/1496) - Update subject alternative name in certificate generation [#1503](https://github.com/greenbone/gvmd/pull/1503)