36 #include <libxml/xmlreader.h>
37 #include <libxml/xmlwriter.h>
40 #include "common/util.h"
44 #define CVSSMAX(a, b) ((a) > (b) ? (a) : (b))
50 CVSS_KEY_NONE = CVSS_NONE,
52 CVSS_KEY_access_vector = CVSS_BASE,
53 CVSS_KEY_access_complexity,
54 CVSS_KEY_authentication,
55 CVSS_KEY_confidentiality_impact,
56 CVSS_KEY_integrity_impact,
57 CVSS_KEY_availability_impact,
59 CVSS_KEY_BASE_NUM = CVSS_KEY_BASE_END_ - CVSS_BASE,
61 CVSS_KEY_exploitability = CVSS_TEMPORAL,
62 CVSS_KEY_remediation_level,
63 CVSS_KEY_report_confidence,
64 CVSS_KEY_TEMPORAL_END_,
65 CVSS_KEY_TEMPORAL_NUM = CVSS_KEY_TEMPORAL_END_ - CVSS_TEMPORAL,
67 CVSS_KEY_collateral_damage_potential = CVSS_ENVIRONMENTAL,
68 CVSS_KEY_target_distribution,
69 CVSS_KEY_confidentiality_requirement,
70 CVSS_KEY_integrity_requirement,
71 CVSS_KEY_availability_requirement,
72 CVSS_KEY_ENVIRONMENTAL_END_,
73 CVSS_KEY_ENVIRONMENTAL_NUM = CVSS_KEY_ENVIRONMENTAL_END_ - CVSS_ENVIRONMENTAL,
77 #define CVSS_CATEGORY(key) ((key) & ~0xff)
79 #define CVSS_KEY_IDX(key) ((key) & 0xff)
91 char *upgraded_from_version;
92 char *generated_on_datetime;
94 unsigned BASE[CVSS_KEY_BASE_NUM];
95 unsigned TEMPORAL[CVSS_KEY_TEMPORAL_NUM];
96 unsigned ENVIRONMENTAL[CVSS_KEY_ENVIRONMENTAL_NUM];
97 unsigned ANY[CVSSMAX(CVSSMAX(CVSS_KEY_BASE_NUM, CVSS_KEY_TEMPORAL_NUM), CVSS_KEY_ENVIRONMENTAL_NUM)];
101 struct cvss_impact *cvss_impact_new_from_xml(xmlTextReaderPtr reader);
102 bool cvss_impact_export(
const struct cvss_impact *imp, xmlTextWriterPtr writer);
103 struct cvss_metrics *cvss_metrics_new_from_xml(xmlTextReaderPtr reader);
104 bool cvss_metrics_export(
const struct cvss_metrics *m, xmlTextWriterPtr writer);
CVSS impact.
Definition: cvss_priv.h:81
CVSS metrics.
Definition: cvss_priv.h:87
cvss_category
CVSS score category.
Definition: cvss_score.h:47
Interface to Common Vulnerability Scoring System Version 2.