From 314955ac78e1dff11e1d2043e7ca8f50d1e82568 Mon Sep 17 00:00:00 2001 From: Matthew Burket Date: Mon, 3 Jun 2024 08:59:12 -0500 Subject: [PATCH] Clean up references for removals of CVE/CVSS/CVRF --- CMakeLists.txt | 1 - src/common/oscapxml.c | 4 ---- src/common/public/oscap.h | 2 -- src/source/doc_type.c | 6 ------ src/source/oscap_source.c | 6 ------ src/source/schematron.c | 1 - src/source/validate.c | 2 -- utils/oscap-info.c | 8 -------- 8 files changed, 30 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index cafc8cbe37..71bdba54b7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -561,7 +561,6 @@ include_directories( "src/common/" "src/common/public/" "src/CPE/public/" - "src/CVE/public/" "src/DS/public/" "src/OVAL/public/" "src/OVAL/probes/public/" diff --git a/src/common/oscapxml.c b/src/common/oscapxml.c index 3c44b9c5d0..1c63a0380d 100644 --- a/src/common/oscapxml.c +++ b/src/common/oscapxml.c @@ -160,10 +160,6 @@ const char *oscap_document_type_to_string(oscap_document_type_t type) return "CPE Language"; case OSCAP_DOCUMENT_ARF: return "ARF Result Datastream"; - case OSCAP_DOCUMENT_CVE_FEED: - return "CVE NVD Feed"; - case OSCAP_DOCUMENT_CVRF_FEED: - return "CVRF Feed"; case OSCAP_DOCUMENT_OCIL: return "OCIL Questionnaire"; default: diff --git a/src/common/public/oscap.h b/src/common/public/oscap.h index cf110bcace..14e55f3af0 100644 --- a/src/common/public/oscap.h +++ b/src/common/public/oscap.h @@ -91,13 +91,11 @@ typedef enum oscap_document_type { OSCAP_DOCUMENT_XCCDF, ///< XCCDF benchmark file OSCAP_DOCUMENT_CPE_LANGUAGE, ///< CPE language file OSCAP_DOCUMENT_CPE_DICTIONARY, ///< CPE dictionary file - OSCAP_DOCUMENT_CVE_FEED, ///< CVE NVD feed OSCAP_DOCUMENT_SCE_RESULT, ///< SCE result file OSCAP_DOCUMENT_SDS, ///< Source Data Stream file OSCAP_DOCUMENT_ARF, ///< Result Data Stream file OSCAP_DOCUMENT_XCCDF_TAILORING, ///< XCCDF tailoring file OSCAP_DOCUMENT_OCIL, ///< OCIL Definitions file - OSCAP_DOCUMENT_CVRF_FEED ///< CVRF feed // If you are adding a new enum here, make sure you add support for it // to utils/oscap-info.c! } oscap_document_type_t; diff --git a/src/source/doc_type.c b/src/source/doc_type.c index 2734aed492..84f0eb70d5 100644 --- a/src/source/doc_type.c +++ b/src/source/doc_type.c @@ -73,12 +73,6 @@ int oscap_determine_document_type_reader(xmlTextReader *reader, oscap_document_t else if (!strcmp("platform-specification", elm_name)) { *doc_type = OSCAP_DOCUMENT_CPE_LANGUAGE; } - else if (!strcmp("nvd", elm_name)) { - *doc_type = OSCAP_DOCUMENT_CVE_FEED; - } - else if (!strcmp("cvrfdoc", elm_name)) { - *doc_type = OSCAP_DOCUMENT_CVRF_FEED; - } else if (!strcmp("data-stream-collection", elm_name)) { *doc_type = OSCAP_DOCUMENT_SDS; } diff --git a/src/source/oscap_source.c b/src/source/oscap_source.c index c4f09ce306..8d953ea063 100644 --- a/src/source/oscap_source.c +++ b/src/source/oscap_source.c @@ -425,12 +425,6 @@ const char *oscap_source_get_schema_version(struct oscap_source *source) case OSCAP_DOCUMENT_CPE_LANGUAGE: source->origin.version = cpe_lang_model_detect_version_priv(reader); break; - case OSCAP_DOCUMENT_CVE_FEED: - source->origin.version = oscap_strdup("2.0"); - break; - case OSCAP_DOCUMENT_CVRF_FEED: - source->origin.version = oscap_strdup("1.1"); - break; case OSCAP_DOCUMENT_SCE_RESULT: source->origin.version = oscap_strdup("1.0"); break; diff --git a/src/source/schematron.c b/src/source/schematron.c index 67359e3ae6..b815f7ed1b 100644 --- a/src/source/schematron.c +++ b/src/source/schematron.c @@ -673,7 +673,6 @@ int oscap_source_validate_schematron_priv(struct oscap_source *source, oscap_doc /* Skip document types that don't have a schematron available */ if (scap_type == OSCAP_DOCUMENT_CPE_LANGUAGE || scap_type == OSCAP_DOCUMENT_CPE_DICTIONARY || - scap_type == OSCAP_DOCUMENT_CVE_FEED || scap_type == OSCAP_DOCUMENT_SCE_RESULT || scap_type == OSCAP_DOCUMENT_OCIL) { fprintf(outfile_fd, "Skipped\n"); diff --git a/src/source/validate.c b/src/source/validate.c index ffc54f5503..50dadda512 100644 --- a/src/source/validate.c +++ b/src/source/validate.c @@ -237,8 +237,6 @@ struct oscap_schema_table_entry OSCAP_SCHEMAS_TABLE[] = { {OSCAP_DOCUMENT_CPE_DICTIONARY, "2.2", "cpe/2.2/cpe-dictionary_2.2.xsd"}, {OSCAP_DOCUMENT_CPE_DICTIONARY, "2.3", "cpe/2.3/cpe-dictionary_2.3.xsd"}, {OSCAP_DOCUMENT_CPE_LANGUAGE, "2.3", "cpe/2.3/cpe-language_2.3.xsd"}, - {OSCAP_DOCUMENT_CVE_FEED, "2.0", "cve/nvd-cve-feed_2.0.xsd"}, - {OSCAP_DOCUMENT_CVRF_FEED, "1.1", "cvrf/1.1/cvrf_1.1.xsd"}, {0, NULL, NULL } }; diff --git a/utils/oscap-info.c b/utils/oscap-info.c index 0f2f158766..63d0339e67 100644 --- a/utils/oscap-info.c +++ b/utils/oscap-info.c @@ -751,14 +751,6 @@ static int app_info(const struct oscap_action *action) print_time(action->file); _print_xccdf_tailoring(source, "", 0); break; - case OSCAP_DOCUMENT_CVE_FEED: - printf("Document type: CVE Feed\n"); - // TODO: Provide more info about CVE feeds - break; - case OSCAP_DOCUMENT_CVRF_FEED: - printf("Document type: CVRF Feed\n"); - // TODO: Provide more info about CVRF feeds - break; case OSCAP_DOCUMENT_SCE_RESULT: printf("Document type: SCE Result File\n"); // Currently, we do not have any SCE result file parsing capabilities.