Open SCAP Library: cvrf.h Source File

Open SCAP Library

cvrf.h
Go to the documentation of this file.
1
29 #ifndef _CVRF_H_
30 #define _CVRF_H_
31
32 #include <stdbool.h>
33 #include "oscap.h"
34 #include "oscap_source.h"
35 #include "cvss_score.h"
36
37
38 /************************************************************************************************
39 * @struct cvrf_product_status
40 * Structure holding CVRF Status element (within a ProductStatuses container)
41 * Contains a list of ProductIDs and their status with respect to the parent Vulnerability
42 *
43 * PARENT NODE: ProductStatuses container (which is child of Vulnerability)
44 * REQUIRED: Type attribute [max. 1], ProductID(s) [min. 1, max. unbounded]
45 */
46 struct cvrf_product_status;
47
53 struct cvrf_product_status *cvrf_product_status_new(void);
54
60 void cvrf_product_status_free(struct cvrf_product_status *status);
61
67 struct cvrf_product_status *cvrf_product_status_clone(const struct cvrf_product_status *stat);
68
74 struct oscap_string_iterator *cvrf_product_status_get_ids(struct cvrf_product_status *stat);
75
76
77 /************************************************************************************************
78 * @struct cvrf_threat
79 * Gives context about the type of Vulnerability and how much threat it poses
80 * Contained within a list representing a Threats container in Vulnerability structure
81 *
82 * PARENT NODE: Threats container (which is child of Vulnerability)
83 * REQUIRED: Type attribute [max 1], Description element [max. 1]
84 * OPTIONAL: ProductID(s) [min. 0, max. unbounded], GroupID(s) [min. 0, max.unbounded]
85 */
86 struct cvrf_threat;
87
93 struct cvrf_threat *cvrf_threat_new(void);
94
100 void cvrf_threat_free(struct cvrf_threat *threat);
101
107 struct cvrf_threat *cvrf_threat_clone(const struct cvrf_threat *threat);
108
115 const char *cvrf_threat_get_date(const struct cvrf_threat *threat);
116
123 const char *cvrf_threat_get_description(const struct cvrf_threat *threat);
124
132 struct oscap_string_iterator *cvrf_threat_get_product_ids(struct cvrf_threat *threat);
133
141 struct oscap_string_iterator *cvrf_threat_get_group_ids(struct cvrf_threat *threat);
142
149 bool cvrf_threat_set_date(struct cvrf_threat *threat, const char *date);
150
157 bool cvrf_threat_set_description(struct cvrf_threat *threat, const char *description);
158
159
160 /************************************************************************************************
161 * @struct cvrf_remediation
162 * Structure holding info for handling or fixing a particular Vulnerability
163 *
164 * PARENT NODE: Remediations container (which is child of Vulnerability)
165 * REQUIRED: Type attribute [max: 1], Description element [max: 1]
166 * OPTIONAL: ProductID(s) [min: 0, max: unbounded], GroupID(s) [min: 0, max: unbounded],
167 * Entitlement element [min: 0, max: 1], URL element [min: 0, max: 1]
168 */
169 struct cvrf_remediation;
170
176 struct cvrf_remediation *cvrf_remediation_new(void);
177
183 void cvrf_remediation_free(struct cvrf_remediation *remed);
184
190 struct cvrf_remediation *cvrf_remediation_clone(const struct cvrf_remediation *remed);
191
198 const char *cvrf_remediation_get_date(const struct cvrf_remediation *remed);
199
206 const char *cvrf_remediation_get_description(const struct cvrf_remediation *remed);
207
214 const char *cvrf_remediation_get_url(const struct cvrf_remediation *remed);
215
222 const char *cvrf_remediation_get_entitlement(const struct cvrf_remediation *remed);
223
231 struct oscap_string_iterator *cvrf_remediation_get_product_ids(struct cvrf_remediation *remed);
232
240 struct oscap_string_iterator *cvrf_remediation_get_group_ids(struct cvrf_remediation *remed);
241
248 bool cvrf_remediation_set_date(struct cvrf_remediation *remed, const char *date);
249
256 bool cvrf_remediation_set_description(struct cvrf_remediation *remed, const char *description);
257
264 bool cvrf_remediation_set_url(struct cvrf_remediation *remed, const char *url);
265
272 bool cvrf_remediation_set_entitlement(struct cvrf_remediation *remed, const char *entitlement);
273
274
275 /************************************************************************************************
276 * @struct cvrf_score_set
277 * Contains CVSS metrics for a given Vulnerability. No ProductID indicates that it pertains to all
278 * Products in a given CVRF file
279 *
280 * PARENT NODE: CVSSScoreSets container (which is child of Vulnerability)
281 * REQUIRED: BaseScore element [max: 1]
282 * OPTIONAL: TemporalScore element [min: 0, max:1], EnvironmentalScore element [min: 0, max: 1],
283 * ProductID(s) [min: 0, max: unbounded], Vector element [min: 0, max: 1]
284 */
285 struct cvrf_score_set;
286
292 struct cvrf_score_set *cvrf_score_set_new(void);
293
299 void cvrf_score_set_free(struct cvrf_score_set *score_set);
300
306 struct cvrf_score_set *cvrf_score_set_clone(const struct cvrf_score_set *score_set);
307
314 const char *cvrf_score_set_get_vector(const struct cvrf_score_set *score_set);
315
323 struct oscap_string_iterator *cvrf_score_set_get_product_ids(struct cvrf_score_set *score_set);
324
330 struct cvss_impact *cvrf_score_set_get_impact(const struct cvrf_score_set *score_set);
331
338 char *cvrf_score_set_get_base_score(const struct cvrf_score_set *score_set);
339
346 char *cvrf_score_set_get_environmental_score(const struct cvrf_score_set *score_set);
347
354 char *cvrf_score_set_get_temporal_score(const struct cvrf_score_set *score_set);
355
362 bool cvrf_score_set_set_vector(struct cvrf_score_set *score_set, const char *vector);
363
370 bool cvrf_score_set_set_impact(struct cvrf_score_set *score_set, struct cvss_impact *impact);
371
379 bool cvrf_score_set_add_metric(struct cvrf_score_set *score_set, enum cvss_category category, const char *score);
380
381
382 /************************************************************************************************
383 * @struct cvrf_involvement
384 * Gives information about the Document Publisher's level of involvement
385 * The 'Party' attribute gives the type of publisher (identical to DocumentPublisher Type)
386 *
387 * PARENT NODE: Involvements container
388 * REQUIRED: Status attribute [max: 1], Party attribute [max: 1]
389 * OPTIONAL: Description element [min: 0, max: 1]
390 */
391 struct cvrf_involvement;
392
398 struct cvrf_involvement *cvrf_involvement_new(void);
399
405 void cvrf_involvement_free(struct cvrf_involvement *involve);
406
412 struct cvrf_involvement *cvrf_involvement_clone(const struct cvrf_involvement *involve);
413
420 const char *cvrf_involvement_get_description(const struct cvrf_involvement *involve);
421
428 bool cvrf_involvement_set_description(struct cvrf_involvement *involve, const char *description);
429
430 /************************************************************************************************
431 * @struct cvrf_vulnerability_cwe
432 *
433 * PARENT NODE: Vulnerability
434 * REQUIRED: ID attribute [max: 1], CWE string content [max: 1]
435 */
436 struct cvrf_vulnerability_cwe;
437
443 struct cvrf_vulnerability_cwe *cvrf_vulnerability_cwe_new(void);
444
450 void cvrf_vulnerability_cwe_free(struct cvrf_vulnerability_cwe *cwe);
451
457 struct cvrf_vulnerability_cwe *cvrf_vulnerability_cwe_clone(const struct cvrf_vulnerability_cwe *cwe);
458
465 const char *cvrf_vulnerability_cwe_get_cwe(const struct cvrf_vulnerability_cwe *vuln_cwe);
466
473 const char *cvrf_vulnerability_cwe_get_id(const struct cvrf_vulnerability_cwe *vuln_cwe);
474
475
482 bool cvrf_vulnerability_cwe_set_cwe(struct cvrf_vulnerability_cwe *vuln_cwe, const char *cwe);
483
490 bool cvrf_vulnerability_cwe_set_id(struct cvrf_vulnerability_cwe *vuln_cwe, const char *id);
491
492 /************************************************************************************************
493 * @struct cvrf_vulnerability
494 * Provides information about Vulnerabilities for products and packages referenced in
495 * ProductTree branches and relationships
496 *
497 * PARENT NODE: cvrfdoc
498 * REQUIRED: Ordinal attribute [max: 1]
499 * OPTIONAL: Title element [min: 0, max:1], ID element [min: 0, max: 1], DiscoveryDate element [min: 0, max: 1],
500 * ReleaseDate element [min: 0, max: 1], Description element [min: 0, max: 1], CVE element [min: 0, max: 1],
501 * CWE ID(s) [min: 0, max: unbounded]
502 *
503 * CONTAINERS: Notes, Involvements, ProductStatuses, Threats, CVSSScoreSets, Remediations,
504 * References, Acknowledgments [min: 0, max: 1 for all containers]
505 */
506 struct cvrf_vulnerability;
507
513 struct cvrf_vulnerability *cvrf_vulnerability_new(void);
514
520 void cvrf_vulnerability_free(struct cvrf_vulnerability *vulnerability);
521
527 struct cvrf_vulnerability *cvrf_vulnerability_clone(const struct cvrf_vulnerability *vuln);
528
535 int cvrf_vulnerability_filter_by_product(struct cvrf_vulnerability *vuln, const char *prod);
536
543 int cvrf_vulnerability_get_ordinal(const struct cvrf_vulnerability *vuln);
544
551 const char *cvrf_vulnerability_get_title(const struct cvrf_vulnerability *vuln);
552
559 const char *cvrf_vulnerability_get_system_id(const struct cvrf_vulnerability *vuln);
560
567 const char *cvrf_vulnerability_get_system_name(const struct cvrf_vulnerability *vuln);
568
575 const char *cvrf_vulnerability_get_discovery_date(const struct cvrf_vulnerability *vuln);
576
583 const char *cvrf_vulnerability_get_release_date(const struct cvrf_vulnerability *vuln);
584
591 const char *cvrf_vulnerability_get_cve_id(const struct cvrf_vulnerability *vuln);
592
599 bool cvrf_vulnerability_set_ordinal(struct cvrf_vulnerability *vuln, int ordinal);
600
607 bool cvrf_vulnerability_set_title(struct cvrf_vulnerability *vuln, const char *vulnerability_title);
608
615 bool cvrf_vulnerability_set_system_id(struct cvrf_vulnerability *vuln, const char *id);
616
623 bool cvrf_vulnerability_set_system_name(struct cvrf_vulnerability *vuln, const char *sys_name);
624
631 bool cvrf_vulnerability_set_discovery_date(struct cvrf_vulnerability *vuln, const char *discovery_date);
632
639 bool cvrf_vulnerability_set_release_date(struct cvrf_vulnerability *vuln, const char *release_date);
640
647 bool cvrf_vulnerability_set_cve_id(struct cvrf_vulnerability *vuln, const char *cve_id);
648
649
650 /*-------------------------------------------------------------------------*\
651 | Iterators of child elements of Vulnerability |
652 \*-------------------------------------------------------------------------*/
653
659 struct oscap_iterator *cvrf_vulnerability_get_references(struct cvrf_vulnerability *vuln);
660
666 struct oscap_iterator *cvrf_vulnerability_get_acknowledgments(struct cvrf_vulnerability *vuln);
667
673 struct oscap_iterator *cvrf_vulnerability_get_notes(struct cvrf_vulnerability *vuln);
674
675 /*******************************************
676 * @struct cvrf_vulnerability_cwe_iterator
677 * Iterator representing all CWE elements in the Vulnerability
678 * Contained as a list within the CVRF Vulnerability structure
679 */
680 struct cvrf_vulnerability_cwe_iterator;
681
688 bool cvrf_vulnerability_add_vulnerability_cwe(struct cvrf_vulnerability *vuln, struct cvrf_vulnerability_cwe *vulnerability_cwe);
689
695 struct cvrf_vulnerability_cwe_iterator *cvrf_vulnerability_get_vulnerability_cwes(const struct cvrf_vulnerability *vuln);
696
702 struct cvrf_vulnerability_cwe *cvrf_vulnerability_cwe_iterator_next(struct cvrf_vulnerability_cwe_iterator *it);
703
709 bool cvrf_vulnerability_cwe_iterator_has_more(struct cvrf_vulnerability_cwe_iterator *it);
710
716 void cvrf_vulnerability_cwe_iterator_free(struct cvrf_vulnerability_cwe_iterator *it);
717
723 void cvrf_vulnerability_cwe_iterator_reset(struct cvrf_vulnerability_cwe_iterator *it);
724
730 void cvrf_vulnerability_cwe_iterator_remove(struct cvrf_vulnerability_cwe_iterator *it);
731
732 /*******************************************
733 * @struct cvrf_involvement_iterator
734 * Iterator representing all Involvement elements in the Involvements container
735 * Contained as a list within the CVRF Vulnerability structure
736 */
737 struct cvrf_involvement_iterator;
738
745 bool cvrf_vulnerability_add_involvement(struct cvrf_vulnerability *vuln, struct cvrf_involvement *involvement);
746
752 struct cvrf_involvement_iterator *cvrf_vulnerability_get_involvements(const struct cvrf_vulnerability *vuln);
753
759 struct cvrf_involvement *cvrf_involvement_iterator_next(struct cvrf_involvement_iterator *it);
760
766 bool cvrf_involvement_iterator_has_more(struct cvrf_involvement_iterator *it);
767
773 void cvrf_involvement_iterator_free(struct cvrf_involvement_iterator *it);
774
780 void cvrf_involvement_iterator_reset(struct cvrf_involvement_iterator *it);
781
787 void cvrf_involvement_iterator_remove(struct cvrf_involvement_iterator *it);
788
789 /*******************************************
790 * @struct cvrf_score_set_iterator
791 * Iterator representing all ScoreSet elements in the CVSSScoreSets container
792 * Contained as a list within the CVRF Vulnerability structure
793 */
794 struct cvrf_score_set_iterator;
795
802 bool cvrf_vulnerability_add_score_set(struct cvrf_vulnerability *vuln, struct cvrf_score_set *score_set);
803
809 struct cvrf_score_set_iterator *cvrf_vulnerability_get_score_sets(const struct cvrf_vulnerability *vuln);
810
816 struct cvrf_score_set *cvrf_score_set_iterator_next(struct cvrf_score_set_iterator *it);
817
823 bool cvrf_score_set_iterator_has_more(struct cvrf_score_set_iterator *it);
824
830 void cvrf_score_set_iterator_free(struct cvrf_score_set_iterator *it);
831
837 void cvrf_score_set_iterator_reset(struct cvrf_score_set_iterator *it);
838
844 void cvrf_score_set_iterator_remove(struct cvrf_score_set_iterator *it);
845
846 /*******************************************
847 * @struct cvrf_product_status_iterator
848 * Iterator representing all Status elements in the ProductStatuses container
849 * Contained as a list within the CVRF Vulnerability structure
850 */
851 struct cvrf_product_status_iterator;
852
859 bool cvrf_vulnerability_add_cvrf_product_status(struct cvrf_vulnerability *vuln, struct cvrf_product_status *stat);
860
866 struct cvrf_product_status_iterator *cvrf_vulnerability_get_product_statuses(const struct cvrf_vulnerability *vuln);
867
873 struct cvrf_product_status *cvrf_product_status_iterator_next(struct cvrf_product_status_iterator *it);
874
880 bool cvrf_product_status_iterator_has_more(struct cvrf_product_status_iterator *it);
881
887 void cvrf_product_status_iterator_free(struct cvrf_product_status_iterator *it);
888
894 void cvrf_product_status_iterator_reset(struct cvrf_product_status_iterator *it);
895
901 void cvrf_product_status_iterator_remove(struct cvrf_product_status_iterator *it);
902
903 /*******************************************
904 * @struct cvrf_remediation_iterator
905 * Iterator representing all Remediation elements in the Remediations container
906 * Contained as a list within the CVRF Vulnerability structure
907 */
908 struct cvrf_remediation_iterator;
909
916 bool cvrf_vulnerability_add_remediation(struct cvrf_vulnerability *vuln, struct cvrf_remediation *remed);
917
923 struct cvrf_remediation_iterator *cvrf_vulnerability_get_remediations(const struct cvrf_vulnerability *vuln);
924
930 struct cvrf_remediation *cvrf_remediation_iterator_next(struct cvrf_remediation_iterator *it);
931
937 bool cvrf_remediation_iterator_has_more(struct cvrf_remediation_iterator *it);
938
944 void cvrf_remediation_iterator_free(struct cvrf_remediation_iterator *it);
945
951 void cvrf_remediation_iterator_reset(struct cvrf_remediation_iterator *it);
952
958 void cvrf_remediation_iterator_remove(struct cvrf_remediation_iterator *it);
959
960 /*******************************************
961 * @struct cvrf_threat_iterator
962 * Iterator representing all Threat elements in the Threats container
963 * Contained as a list within the CVRF Vulnerability structure
964 */
965 struct cvrf_threat_iterator;
966
973 bool cvrf_vulnerability_add_threat(struct cvrf_vulnerability *vuln, struct cvrf_threat *threat);
974
980 struct cvrf_threat_iterator *cvrf_vulnerability_get_threats(const struct cvrf_vulnerability *vuln);
981
987 struct cvrf_threat *cvrf_threat_iterator_next(struct cvrf_threat_iterator *it);
988
994 bool cvrf_threat_iterator_has_more(struct cvrf_threat_iterator *it);
995
1001 void cvrf_threat_iterator_free(struct cvrf_threat_iterator *it);
1002
1008 void cvrf_threat_iterator_reset(struct cvrf_threat_iterator *it);
1009
1015 void cvrf_threat_iterator_remove(struct cvrf_threat_iterator *it);
1016
1017 /************************************************************************************************
1018 * @struct cvrf_product_name
1019 * Represents FullProductName element, which is a child of both Branch and Relationship elements
1020 * Links a CPE to its ProductID or a package ProductID. No two FullProductName elements can
1021 * have the same ProductID
1022 *
1023 * PARENT NODE: ProductTree, Branch, or Relationship
1024 * REQUIRED: ProductID attribute [max: 1], CPE element [max: 1]
1025 */
1026 struct cvrf_product_name;
1027
1033 struct cvrf_product_name *cvrf_product_name_new(void);
1034
1040 void cvrf_product_name_free(struct cvrf_product_name *full_name);
1041
1047 struct cvrf_product_name *cvrf_product_name_clone(const struct cvrf_product_name *full_name);
1048
1055 const char *cvrf_product_name_get_product_id(const struct cvrf_product_name *full_name);
1056
1063 const char *cvrf_product_name_get_cpe(const struct cvrf_product_name *full_name);
1064
1071 bool cvrf_product_name_set_product_id(struct cvrf_product_name *full_name, const char *product_id);
1072
1079 bool cvrf_product_name_set_cpe(struct cvrf_product_name *full_name, const char *cpe);
1080
1081 /************************************************************************************************
1082 * @struct cvrf_group
1083 * Structure that categorically groups different products referenced in the document.
1084 * One ProductID is used per group member. The GroupID can be used as a reference for
1085 * other elements.
1086 *
1087 * PARENT NODE: ProductGroups container (which is a child of ProductTree)
1088 * REQUIRED: GroupID attribute [max: 1], ProductID element [min:2, max: unbounded]
1089 * OPTIONAL: Description element [min: 0, max: 1]
1090 */
1091 struct cvrf_group;
1092
1098 struct cvrf_group *cvrf_group_new(void);
1099
1105 void cvrf_group_free(struct cvrf_group *group);
1106
1112 struct cvrf_group *cvrf_group_clone(const struct cvrf_group *group);
1113
1120 const char *cvrf_group_get_group_id(const struct cvrf_group *group);
1121
1128 const char *cvrf_group_get_description(const struct cvrf_group *group);
1129
1136 bool cvrf_group_set_group_id(struct cvrf_group *group, const char *group_id);
1137
1144 bool cvrf_group_set_description(struct cvrf_group *group, const char *description);
1145
1152 struct oscap_string_iterator *cvrf_group_get_product_ids(struct cvrf_group *group);
1153
1154
1155 /************************************************************************************************
1156 * @struct cvrf_relationship
1157 * Structure within a parent ProductTree. Establishes a link between two products (FullProductNames)
1158 * referenced in the document. Thus, at least two FullProductName elements must exist in the document.
1159 *
1160 * PARENT NODE: ProductTree
1161 * REQUIRED: ProductReference attribute [max: 1], RelationType attribute [max: 1],
1162 * RelatesToProductReference attribute [max: 1], FullProductName element [max: 1]
1163 */
1164 struct cvrf_relationship;
1165
1171 struct cvrf_relationship *cvrf_relationship_new(void);
1172
1178 void cvrf_relationship_free(struct cvrf_relationship *relationship);
1179
1185 struct cvrf_relationship *cvrf_relationship_clone(const struct cvrf_relationship *relation);
1186
1193 const char *cvrf_relationship_get_product_reference(const struct cvrf_relationship *relation);
1194
1201 const char *cvrf_relationship_get_relates_to_ref(const struct cvrf_relationship *relation);
1202
1209 struct cvrf_product_name *cvrf_relationship_get_product_name(const struct cvrf_relationship *relation);
1210
1217 bool cvrf_relationship_set_product_reference(struct cvrf_relationship *relation, const char *product_reference);
1218
1225 bool cvrf_relationship_set_relates_to_ref(struct cvrf_relationship *relation, const char *relates_to_ref);
1226
1233 bool cvrf_relationship_set_product_name(struct cvrf_relationship *relation, struct cvrf_product_name *name);
1234
1235 /************************************************************************************************
1236 * @struct cvrf_branch
1237 * Establishes hierarchy and relationships between different CPEs, products, and packages
1238 * Can only have one type of child element: a FullProductName or more Branches
1239 *
1240 * PARENT NODE: ProductTree or Branch
1241 * REQUIRED: Name attribute [max: 1], Type attribute [max: 1], EITHER FullProductName element [max: 1] OR
1242 * child Branch elements [min: 1, max: unbounded]
1243 */
1244 struct cvrf_branch;
1245
1251 struct cvrf_branch *cvrf_branch_new(void);
1252
1258 void cvrf_branch_free(struct cvrf_branch *branch);
1259
1265 struct cvrf_branch *cvrf_branch_clone(const struct cvrf_branch *branch);
1266
1273 const char *cvrf_branch_get_branch_name(const struct cvrf_branch *branch);
1274
1281 struct cvrf_product_name *cvrf_branch_get_product_name(const struct cvrf_branch *branch);
1282
1289 struct oscap_iterator *cvrf_branch_get_subbranches(struct cvrf_branch *branch);
1290
1297 bool cvrf_branch_set_branch_name(struct cvrf_branch *branch, const char *branch_name);
1298
1305 bool cvrf_branch_set_product_name(struct cvrf_branch *branch, struct cvrf_product_name *name);
1306
1307 /************************************************************************************************
1308 *@struct cvrf_product_tree
1309 * Relates information about CPEs, their given ProductIDs, packages and their given ProductIDs through
1310 * Branch and Relationship child elements
1311 *
1312 * PARENT NODE: cvrfdoc
1313 * OPTIONAL: FullProductName element [min: 0, max: unbounded], Branch element [min: 0, max: unbounded],
1314 * Relationship element [min: 0, max: unbounded]
1315 */
1316 struct cvrf_product_tree;
1317
1323 struct cvrf_product_tree *cvrf_product_tree_new(void);
1324
1331 void cvrf_product_tree_free(struct cvrf_product_tree *tree);
1332
1338 struct cvrf_product_tree *cvrf_product_tree_clone(const struct cvrf_product_tree *tree);
1339
1349 const char *get_cvrf_product_id_from_cpe(struct cvrf_product_tree *tree, const char *cpe);
1350
1359 int cvrf_product_tree_filter_by_cpe(struct cvrf_product_tree *tree, const char *cpe);
1360
1361 /*---------------------------------------------------------------------*\
1362 | Iterators of child elements of ProductTree |
1363 \*---------------------------------------------------------------------*/
1364
1365 struct oscap_iterator *cvrf_product_tree_get_branches(struct cvrf_product_tree *tree);
1366
1367 /*******************************************
1368 * @struct cvrf_product_name_iterator
1369 * Iterator representing all FullProductName elements in the ProductTree
1370 * Contained as a list within the CVRF ProductTree structure
1371 */
1372 struct cvrf_product_name_iterator;
1373
1380 bool cvrf_product_tree_add_product_name(struct cvrf_product_tree *tree, struct cvrf_product_name *full_name);
1381
1387 struct cvrf_product_name_iterator *cvrf_product_tree_get_product_names(const struct cvrf_product_tree *tree);
1388
1394 struct cvrf_product_name *cvrf_product_name_iterator_next(struct cvrf_product_name_iterator *it);
1395
1401 bool cvrf_product_name_iterator_has_more(struct cvrf_product_name_iterator *it);
1402
1408 void cvrf_product_name_iterator_free(struct cvrf_product_name_iterator *it);
1409
1415 void cvrf_product_name_iterator_reset(struct cvrf_product_name_iterator *it);
1416
1422 void cvrf_product_name_iterator_remove(struct cvrf_product_name_iterator *it);
1423
1424 /*******************************************
1425 * @struct cvrf_relationship_iterator
1426 * Iterator representing all Relationship elements in the ProductTree
1427 * Contained as a list within the CVRF Relationship structure
1428 */
1429 struct cvrf_relationship_iterator;
1430
1437 bool cvrf_product_tree_add_relationship(struct cvrf_product_tree *tree, struct cvrf_relationship *relation);
1438
1444 struct cvrf_relationship_iterator *cvrf_product_tree_get_relationships(const struct cvrf_product_tree *tree);
1445
1451 struct cvrf_relationship *cvrf_relationship_iterator_next(struct cvrf_relationship_iterator *it);
1452
1458 bool cvrf_relationship_iterator_has_more(struct cvrf_relationship_iterator *it);
1459
1465 void cvrf_relationship_iterator_free(struct cvrf_relationship_iterator *it);
1466
1472 void cvrf_relationship_iterator_reset(struct cvrf_relationship_iterator *it);
1473
1479 void cvrf_relationship_iterator_remove(struct cvrf_relationship_iterator *it);
1480
1481
1482 /*******************************************
1483 * @struct cvrf_group_iterator
1484 * Iterator representing all Group elements in the ProductTree
1485 * Contained as a list within the CVRF ProductTree structure
1486 */
1487 struct cvrf_group_iterator;
1488
1495 bool cvrf_product_tree_add_group(struct cvrf_product_tree *tree, struct cvrf_group *group);
1496
1502 struct cvrf_group_iterator *cvrf_product_tree_get_product_groups(const struct cvrf_product_tree *tree);
1503
1509 struct cvrf_group *cvrf_group_iterator_next(struct cvrf_group_iterator *it);
1510
1516 bool cvrf_group_iterator_has_more(struct cvrf_group_iterator *it);
1517
1523 void cvrf_group_iterator_free(struct cvrf_group_iterator *it);
1524
1530 void cvrf_group_iterator_reset(struct cvrf_group_iterator *it);
1531
1537 void cvrf_group_iterator_remove(struct cvrf_group_iterator *it);
1538
1539
1540 /************************************************************************************************
1541 * @struct cvrf_acknowledgment
1542 * Metadata giving recognition of external parties who provided information, suggestions, or
1543 * other contributions
1544 *
1545 * PARENT NODE: Acknowledgments container (in cvrfdoc or in Vulnerability)
1546 * OPTIONAL: Name element(s) [min: 0, max: unbounded], Organization(s) element [min: 0, max: unbounded],
1547 * Description element [min: 0, max: 1], URL element(s) [min: 0, max: unbounded]
1548 */
1549 struct cvrf_acknowledgment;
1550
1556 struct cvrf_acknowledgment *cvrf_acknowledgment_new(void);
1557
1563 void cvrf_acknowledgment_free(struct cvrf_acknowledgment *ack);
1564
1570 struct cvrf_acknowledgment *cvrf_acknowledgment_clone(const struct cvrf_acknowledgment *ack);
1571
1578 const char *cvrf_acknowledgment_get_description(const struct cvrf_acknowledgment *ack);
1579
1586 bool cvrf_acknowledgment_set_description(struct cvrf_acknowledgment *ack, const char *description);
1587
1594 struct oscap_string_iterator *cvrf_acknowledgment_get_names(const struct cvrf_acknowledgment *ack);
1595
1602 struct oscap_string_iterator *cvrf_acknowledgment_get_organizations(const struct cvrf_acknowledgment *ack);
1603
1610 struct oscap_string_iterator *cvrf_acknowledgment_get_urls(const struct cvrf_acknowledgment *ack);
1611
1612 /************************************************************************************************
1613 * @struct cvrf_note
1614 *
1615 * PARENT NODE: DocumentNotes container or Notes container
1616 * REQUIRED: Type attribute [min: 1, max: 1], Ordinal attribute [min: 1, max: 1],
1617 * OPTIONAL: Audience attribute [min: 0, max: 1], Title attribute [min: 0, max: 1]
1618 */
1619 struct cvrf_note;
1620
1626 struct cvrf_note *cvrf_note_new(void);
1627
1633 void cvrf_note_free(struct cvrf_note *note);
1634
1640 struct cvrf_note *cvrf_note_clone(const struct cvrf_note *note);
1641
1648 int cvrf_note_get_ordinal(const struct cvrf_note *note);
1649
1656 const char *cvrf_note_get_audience(const struct cvrf_note *note);
1657
1664 const char *cvrf_note_get_title(const struct cvrf_note *note);
1665
1672 const char *cvrf_note_get_contents(const struct cvrf_note *note);
1673
1680 bool cvrf_note_set_ordinal(struct cvrf_note *note, int ordinal);
1681
1688 bool cvrf_note_set_audience(struct cvrf_note *note, const char *audience);
1689
1696 bool cvrf_note_set_title(struct cvrf_note *note, const char *title);
1697
1704 bool cvrf_note_set_contents(struct cvrf_note *note, const char *contents);
1705
1706
1707 /************************************************************************************************
1708 * @struct cvrf_revision
1709 * Metadata for tracking the changes made to a CVRF document
1710 *
1711 * PARENT NODE: RevisionHistory container (which is a child of DocumentTracking)
1712 * REQUIRED: Number element [min: 1, max: 1], Date element [min: 1, max: 1],
1713 * Description element [min: 1, max: 1]
1714 */
1715 struct cvrf_revision;
1716
1722 struct cvrf_revision *cvrf_revision_new(void);
1723
1729 void cvrf_revision_free(struct cvrf_revision *revision);
1730
1736 struct cvrf_revision *cvrf_revision_clone(const struct cvrf_revision *revision);
1737
1744 const char *cvrf_revision_get_number(const struct cvrf_revision *revision);
1745
1752 const char *cvrf_revision_get_date(const struct cvrf_revision *revision);
1753
1760 const char *cvrf_revision_get_description(const struct cvrf_revision *revision);
1761
1768 bool cvrf_revision_set_number(struct cvrf_revision *revision, const char *number);
1769
1776 bool cvrf_revision_set_date(struct cvrf_revision *revision, const char *date);
1777
1784 bool cvrf_revision_set_description(struct cvrf_revision *revision, const char *description);
1785
1786 /************************************************************************************************
1787 * @struct cvrf_doc_tracking
1788 * Metadata for referencing origin, changes, release dates, IDs, and other information about
1789 * the document
1790 *
1791 * PARENT NODE: cvrfdoc
1792 * REQUIRED: Identification container [max: 1] { ID element [max: 1], Alias [min: 0, max: unbounded] },
1793 * Status element [max: 1], Version element [max: 1], RevisionHistory container [max: 1],
1794 * InitialReleaseDate [max: 1], CurrentReleaseDate [max: 1],
1795 * Generator container [max: 1] { Engine [min: 0, max: 1], Date [min: 0, max: 1] }
1796 */
1797 struct cvrf_doc_tracking;
1798
1804 struct cvrf_doc_tracking *cvrf_doc_tracking_new(void);
1805
1811 void cvrf_doc_tracking_free(struct cvrf_doc_tracking *tracking);
1812
1818 struct cvrf_doc_tracking *cvrf_doc_tracking_clone(const struct cvrf_doc_tracking *tracking);
1819
1826 const char *cvrf_doc_tracking_get_tracking_id(const struct cvrf_doc_tracking *tracking);
1827
1834 struct oscap_string_iterator *cvrf_doc_tracking_get_aliases(struct cvrf_doc_tracking *tracking);
1835
1842 const char *cvrf_doc_tracking_get_version(const struct cvrf_doc_tracking *tracking);
1843
1850 const char *cvrf_doc_tracking_get_init_release_date(const struct cvrf_doc_tracking *tracking);
1851
1858 const char *cvrf_doc_tracking_get_cur_release_date(const struct cvrf_doc_tracking *tracking);
1859
1866 const char *cvrf_doc_tracking_get_generator_engine(const struct cvrf_doc_tracking *tracking);
1867
1874 const char *cvrf_doc_tracking_get_generator_date(const struct cvrf_doc_tracking *tracking);
1875
1882 bool cvrf_doc_tracking_set_tracking_id(struct cvrf_doc_tracking *tracking, const char *id);
1883
1890 bool cvrf_doc_tracking_set_version(struct cvrf_doc_tracking *tracking, const char *version);
1891
1898 bool cvrf_doc_tracking_set_init_release_date(struct cvrf_doc_tracking *tracking, const char *init_release_date);
1899
1906 bool cvrf_doc_tracking_set_cur_release_date(struct cvrf_doc_tracking *tracking, const char *cur_release_date);
1907
1914 bool cvrf_doc_tracking_set_generator_engine(struct cvrf_doc_tracking *tracking, const char *generator_engine);
1915
1922 bool cvrf_doc_tracking_set_generator_date(struct cvrf_doc_tracking *tracking, const char *generator_date);
1923
1924
1925 /*******************************************
1926 * @struct cvrf_revision_iterator
1927 * Iterator representing all Revision elements in the RevisionHistory container
1928 * Contained as a list within the CVRF DocumentTracking structure
1929 */
1930 struct cvrf_revision_iterator;
1931
1938 bool cvrf_doc_tracking_add_revision(struct cvrf_doc_tracking *tracking, struct cvrf_revision *revision);
1939
1945 struct cvrf_revision_iterator *cvrf_doc_tracking_get_revision_history(const struct cvrf_doc_tracking *tracking);
1946
1952 struct cvrf_revision *cvrf_revision_iterator_next(struct cvrf_revision_iterator *it);
1953
1959 bool cvrf_revision_iterator_has_more(struct cvrf_revision_iterator *it);
1960
1966 void cvrf_revision_iterator_free(struct cvrf_revision_iterator *it);
1967
1973 void cvrf_revision_iterator_reset(struct cvrf_revision_iterator *it);
1974
1980 void cvrf_revision_iterator_remove(struct cvrf_revision_iterator *it);
1981
1982
1983 /************************************************************************************************
1984 * @struct cvrf_doc_publisher
1985 * Metadata about the publisher of the CVRF document
1986 *
1987 * PARENT NODE: cvrfdoc
1988 * REQUIRED: Type attribute [max: 1]
1989 * OPTIONAL: VendorID attribute [min: 0, max: 1], ContactDetails element [min: 0, max: 1],
1990 * IssuingAuthority element [min: 0, max: 1]
1991 */
1992 struct cvrf_doc_publisher;
1993
1999 struct cvrf_doc_publisher *cvrf_doc_publisher_new(void);
2000
2006 void cvrf_doc_publisher_free(struct cvrf_doc_publisher *publisher);
2007
2013 struct cvrf_doc_publisher *cvrf_doc_publisher_clone(const struct cvrf_doc_publisher *publisher);
2014
2021 const char *cvrf_doc_publisher_get_vendor_id(const struct cvrf_doc_publisher *publisher);
2022
2029 const char *cvrf_doc_publisher_get_contact_details(const struct cvrf_doc_publisher *publisher);
2030
2037 const char *cvrf_doc_publisher_get_issuing_authority(const struct cvrf_doc_publisher *publisher);
2038
2045 bool cvrf_doc_publisher_set_vendor_id(struct cvrf_doc_publisher *publisher, const char *vendor_id);
2046
2053 bool cvrf_doc_publisher_set_contact_details(struct cvrf_doc_publisher *publisher, const char *contact_details);
2054
2061 bool cvrf_doc_publisher_set_issuing_authority(struct cvrf_doc_publisher *publisher, const char *issuing_authority);
2062
2063 /************************************************************************************************
2064 * @struct cvrf_reference
2065 * Refers to resources and information outside of the CVRF document itself
2066 *
2067 * PARENT NODE: DocumentReferences container (child of cvrfdoc) or References container (child of Vulnerability)
2068 * REQUIRED: Type attribute [max: 1], URL element [max: 1], Description element [max: 1]
2069 */
2070 struct cvrf_reference;
2071
2077 struct cvrf_reference *cvrf_reference_new(void);
2078
2084 void cvrf_reference_free(struct cvrf_reference *reference);
2085
2091 struct cvrf_reference *cvrf_reference_clone(const struct cvrf_reference *ref);
2092
2099 const char *cvrf_reference_get_url(const struct cvrf_reference *reference);
2100
2107 const char *cvrf_reference_get_description(const struct cvrf_reference *reference);
2108
2115 bool cvrf_reference_set_url(struct cvrf_reference *reference, const char *url);
2116
2123 bool cvrf_reference_set_description(struct cvrf_reference *reference, const char *description);
2124
2125 /************************************************************************************************
2126 * @struct cvrf_document
2127 *
2128 */
2129 struct cvrf_document;
2130
2136 struct cvrf_document *cvrf_document_new(void);
2137
2144 void cvrf_document_free(struct cvrf_document *doc);
2145
2151 struct cvrf_document *cvrf_document_clone(const struct cvrf_document *doc);
2152
2159 const char *cvrf_document_get_doc_distribution(const struct cvrf_document *doc);
2160
2167 const char *cvrf_document_get_aggregate_severity(const struct cvrf_document *doc);
2168
2175 const char *cvrf_document_get_namespace(const struct cvrf_document *doc);
2176
2183 struct cvrf_doc_tracking *cvrf_document_get_tracking(const struct cvrf_document *doc);
2184
2191 struct cvrf_doc_publisher *cvrf_document_get_publisher(const struct cvrf_document *doc);
2192
2199 struct oscap_iterator *cvrf_document_get_notes(struct cvrf_document *doc);
2200
2207 struct oscap_iterator *cvrf_document_get_references(struct cvrf_document *doc);
2208
2215 struct oscap_iterator *cvrf_document_get_acknowledgments(struct cvrf_document *doc);
2216
2223 bool cvrf_document_set_doc_distribution(struct cvrf_document *doc, const char *distribution);
2224
2231 bool cvrf_document_set_aggregate_severity(struct cvrf_document *doc, const char *severity);
2232
2239 bool cvrf_document_set_namespace(struct cvrf_document *doc, const char *ns);
2240
2247 bool cvrf_document_set_publisher(struct cvrf_document *doc, struct cvrf_doc_publisher *publisher);
2248
2255 bool cvrf_document_set_tracking(struct cvrf_document *doc, struct cvrf_doc_tracking *track);
2256
2257 /************************************************************************************************
2258 * @struct cvrf_model
2259 * Top level structure; organizationally divided into 3 components: Document, ProductTree, and
2260 * Vulnerability offshoots. This structure contains all information provided by a CVRF file.
2261 *
2262 * REQUIRED: DocumentTitle element [max: 1], DocumentType element [max: 1]
2263 * OPTIONAL: ProductTree element [min: 0, max: 1], Vulnerability [min: 0, max: unbounded]
2264 */
2265 struct cvrf_model;
2266
2272 struct cvrf_model *cvrf_model_new(void);
2273
2279 void cvrf_model_free(struct cvrf_model *cvrf);
2280
2286 struct cvrf_model *cvrf_model_clone(const struct cvrf_model *model);
2287
2296 int cvrf_model_filter_by_cpe(struct cvrf_model *model, const char *cpe);
2297
2304 const char *cvrf_model_get_doc_title(const struct cvrf_model *model);
2305
2312 const char *cvrf_model_get_doc_type(const struct cvrf_model *model);
2313
2320 bool cvrf_model_set_doc_title(struct cvrf_model *model, const char *doc_title);
2321
2328 bool cvrf_model_set_doc_type(struct cvrf_model *model, const char *doc_type);
2329
2336 struct cvrf_product_tree *cvrf_model_get_product_tree(struct cvrf_model *model);
2337
2345 struct cvrf_document *cvrf_model_get_document(const struct cvrf_model *model);
2346
2352 const char *cvrf_model_get_identification(struct cvrf_model *model);
2353
2360 bool cvrf_model_set_document(struct cvrf_model *model, struct cvrf_document *doc);
2361
2362 /*******************************************
2363 * @struct cvrf_vulnerability_iterator
2364 * Iterator representing all Vulnerabilities in the document
2365 * Contained as a list within the CVRF Model structure
2366 */
2367 struct cvrf_vulnerability_iterator;
2368
2374 struct cvrf_vulnerability_iterator *cvrf_model_get_vulnerabilities(const struct cvrf_model *model);
2375
2382 bool cvrf_model_add_vulnerability(struct cvrf_model *model, struct cvrf_vulnerability *vuln);
2383
2389 struct cvrf_vulnerability *cvrf_vulnerability_iterator_next(struct cvrf_vulnerability_iterator *it);
2390
2396 bool cvrf_vulnerability_iterator_has_more(struct cvrf_vulnerability_iterator *it);
2397
2403 void cvrf_vulnerability_iterator_free(struct cvrf_vulnerability_iterator *it);
2404
2410 void cvrf_vulnerability_iterator_reset(struct cvrf_vulnerability_iterator *it);
2411
2417 void cvrf_vulnerability_iterator_remove(struct cvrf_vulnerability_iterator *it);
2418
2419
2420 /************************************************************************************************
2421 * @struct cvrf_index
2422 * Represents an index of a CVRF feed or directory
2423 * Maintains a list of all CVRF files in the form of cvrf_model structures
2424 */
2425 struct cvrf_index;
2426
2432 struct cvrf_index *cvrf_index_new(void);
2433
2439 void cvrf_index_free(struct cvrf_index *index);
2440
2446 struct cvrf_index *cvrf_index_clone(const struct cvrf_index *index);
2447
2454 const char *cvrf_index_get_source_url(const struct cvrf_index *index);
2455
2462 const char *cvrf_index_get_index_file(const struct cvrf_index *index);
2463
2470 bool cvrf_index_set_source_url(struct cvrf_index *index, const char *url);
2471
2478 bool cvrf_index_set_index_file(struct cvrf_index *index, const char *index_file);
2479
2480 /*******************************************
2481 * @struct cvrf_model_iterator
2482 * Iterator representing all CVRF files from an index, feed, or stream
2483 * Contained as a list within the CVRF Index structure
2484 */
2485 struct cvrf_model_iterator;
2486
2493 bool cvrf_index_add_model(struct cvrf_index *index, struct cvrf_model *model);
2494
2500 struct cvrf_model_iterator *cvrf_index_get_models(const struct cvrf_index *index);
2501
2507 struct cvrf_model *cvrf_model_iterator_next(struct cvrf_model_iterator *it);
2508
2514 bool cvrf_model_iterator_has_more(struct cvrf_model_iterator *it);
2515
2521 void cvrf_model_iterator_free(struct cvrf_model_iterator *it);
2522
2528 void cvrf_model_iterator_reset(struct cvrf_model_iterator *it);
2529
2535 void cvrf_model_iterator_remove(struct cvrf_model_iterator *it);
2536
2537
2538 /************************************************************************************************
2539 * @struct cvrf_session
2540 * Structure that holds and processes import source and import for CVRF models or indices
2541 * for later use during evaluation. Has OVAL definition structure that is used for
2542 * evaluation
2543 */
2544 struct cvrf_session;
2545
2551 struct cvrf_session *cvrf_session_new_from_source_model(struct oscap_source *source);
2552
2558 struct cvrf_session *cvrf_session_new_from_source_index(struct oscap_source *source);
2559
2565 void cvrf_session_free(struct cvrf_session *session);
2566
2572 struct cvrf_model *cvrf_session_get_model(struct cvrf_session *session);
2573
2579 struct cvrf_index *cvrf_session_get_index(const struct cvrf_session *session);
2580
2588 struct oscap_string_iterator *cvrf_session_get_product_ids(struct cvrf_session *session);
2589
2595 const char *cvrf_session_get_os_name(const struct cvrf_session *session);
2596
2603 void cvrf_session_set_model(struct cvrf_session *session, struct cvrf_model *model);
2604
2612 bool cvrf_session_set_index(struct cvrf_session *session, struct cvrf_index *index);
2613
2621 bool cvrf_session_set_os_name(struct cvrf_session *session, const char *os_name);
2622
2623 /************************************************************************************************
2624 * @struct cvrf_rpm_attributes
2625 * Stores dissected information about RPM package names from CVRF files- the EVR format and
2626 * package name. These are used to check the vulnerability of the system by comparing the
2627 * EVR in the CVRF file to the EVR on the system
2628 */
2629 struct cvrf_rpm_attributes;
2630
2636 struct cvrf_rpm_attributes *cvrf_rpm_attributes_new(void);
2637
2643 void cvrf_rpm_attributes_free(struct cvrf_rpm_attributes *attributes);
2644
2650 const char *cvrf_rpm_attributes_get_full_package_name(const struct cvrf_rpm_attributes *attributes);
2651
2658 const char *cvrf_rpm_attributes_get_rpm_name(const struct cvrf_rpm_attributes *attributes);
2659
2667 const char *cvrf_rpm_attributes_get_evr_format(const struct cvrf_rpm_attributes *attributes);
2668
2675 bool cvrf_rpm_attributes_set_full_package_name(struct cvrf_rpm_attributes *attributes, const char *full_package);
2676
2683 bool cvrf_rpm_attributes_set_rpm_name(struct cvrf_rpm_attributes *attributes, const char *rpm_name);
2684
2691 bool cvrf_rpm_attributes_set_evr_format(struct cvrf_rpm_attributes *attributes, const char *evr_format);
2692
2693
2694 /************************************************************************************************/
2695 /************************************************************************************************/
2696
2697
2703 const char * cvrf_model_supported(void);
2704
2712 struct cvrf_index *cvrf_index_import(struct oscap_source *index_source);
2713
2720 struct cvrf_model *cvrf_model_import(struct oscap_source *source);
2721
2728 struct oscap_source *cvrf_index_get_export_source(struct cvrf_index *index);
2729
2736 struct oscap_source *cvrf_model_get_export_source(struct cvrf_model *model);
2737
2746 struct oscap_source *cvrf_model_get_results_source(struct oscap_source *import_source, const char *os_name);
2747
2756 struct oscap_source *cvrf_index_get_results_source(struct oscap_source *import_source, const char *os_name);
2757
2758
2761 #endif /* _CVRF_H_ */
cvrf_vulnerability::cvrf_vulnerability_clone
struct cvrf_vulnerability * cvrf_vulnerability_clone(const struct cvrf_vulnerability *vuln)
Definition: cvrf_priv.c:494
cvrf_doc_tracking::cvrf_doc_tracking_get_aliases
struct oscap_string_iterator * cvrf_doc_tracking_get_aliases(struct cvrf_doc_tracking *tracking)
Definition: cvrf_priv.c:1011
cvss_impact
CVSS impact.
Definition: cvss_priv.h:81
cvrf_score_set::cvrf_score_set_free
void cvrf_score_set_free(struct cvrf_score_set *score_set)
Deallocates memory for a ScoreSet element of the CVSSScoreSets container.
Definition: cvrf_priv.c:193
cvrf_vulnerability::cvrf_vulnerability_set_title
bool cvrf_vulnerability_set_title(struct cvrf_vulnerability *vuln, const char *vulnerability_title)
cvrf_involvement::cvrf_involvement_clone
struct cvrf_involvement * cvrf_involvement_clone(const struct cvrf_involvement *involve)
Definition: cvrf_priv.c:349
cvrf_product_name::cvrf_product_name_set_cpe
bool cvrf_product_name_set_cpe(struct cvrf_product_name *full_name, const char *cpe)
cvrf_revision::cvrf_revision_get_number
const char * cvrf_revision_get_number(const struct cvrf_revision *revision)
cvrf_doc_tracking::cvrf_doc_tracking_get_revision_history
struct cvrf_revision_iterator * cvrf_doc_tracking_get_revision_history(const struct cvrf_doc_tracking *tracking)
cvrf_product_tree::cvrf_product_tree_free
void cvrf_product_tree_free(struct cvrf_product_tree *tree)
Deallocates memory for a ProductTree element and all its child Branches, Relationships, and FullProductNames, if they exist.
Definition: cvrf_priv.c:779
cvrf_document::cvrf_document_set_publisher
bool cvrf_document_set_publisher(struct cvrf_document *doc, struct cvrf_doc_publisher *publisher)
cvrf_reference::cvrf_reference_set_description
bool cvrf_reference_set_description(struct cvrf_reference *reference, const char *description)
cvrf_vulnerability_cwe
Definition: cvrf_priv.c:361
cvrf_doc_tracking::cvrf_doc_tracking_get_generator_date
const char * cvrf_doc_tracking_get_generator_date(const struct cvrf_doc_tracking *tracking)
cvrf_acknowledgment::cvrf_acknowledgment_clone
struct cvrf_acknowledgment * cvrf_acknowledgment_clone(const struct cvrf_acknowledgment *ack)
Definition: cvrf_priv.c:881
cvrf_model::cvrf_model_get_vulnerabilities
struct cvrf_vulnerability_iterator * cvrf_model_get_vulnerabilities(const struct cvrf_model *model)
cvrf_relationship::cvrf_relationship_set_product_reference
bool cvrf_relationship_set_product_reference(struct cvrf_relationship *relation, const char *product_reference)
cvrf_relationship::cvrf_relationship_get_product_reference
const char * cvrf_relationship_get_product_reference(const struct cvrf_relationship *relation)
cvrf_vulnerability::cvrf_vulnerability_add_involvement
bool cvrf_vulnerability_add_involvement(struct cvrf_vulnerability *vuln, struct cvrf_involvement *involvement)
cvrf_model::cvrf_model_get_export_source
struct oscap_source * cvrf_model_get_export_source(struct cvrf_model *model)
Export CVRF Model to the export source as an XML doc.
Definition: cvrf.c:89
cvrf_acknowledgment::cvrf_acknowledgment_get_urls
struct oscap_string_iterator * cvrf_acknowledgment_get_urls(const struct cvrf_acknowledgment *ack)
Definition: cvrf_priv.c:854
cvrf_doc_tracking::cvrf_doc_tracking_free
void cvrf_doc_tracking_free(struct cvrf_doc_tracking *tracking)
Deallocates memory for a DocumentTracking element.
Definition: cvrf_priv.c:1032
cvrf_score_set::cvrf_score_set_get_vector
const char * cvrf_score_set_get_vector(const struct cvrf_score_set *score_set)
cvrf_branch::cvrf_branch_get_product_name
struct cvrf_product_name * cvrf_branch_get_product_name(const struct cvrf_branch *branch)
cvrf_relationship::cvrf_relationship_get_relates_to_ref
const char * cvrf_relationship_get_relates_to_ref(const struct cvrf_relationship *relation)
cvrf_doc_tracking::cvrf_doc_tracking_clone
struct cvrf_doc_tracking * cvrf_doc_tracking_clone(const struct cvrf_doc_tracking *tracking)
Definition: cvrf_priv.c:1047
cvrf_rpm_attributes::cvrf_rpm_attributes_free
void cvrf_rpm_attributes_free(struct cvrf_rpm_attributes *attributes)
Deallocate memory for the CVRF RPM attributes structure.
Definition: cvrf_eval.c:151
cvrf_index::cvrf_index_get_source_url
const char * cvrf_index_get_source_url(const struct cvrf_index *index)
cvrf_reference::cvrf_reference_clone
struct cvrf_reference * cvrf_reference_clone(const struct cvrf_reference *ref)
Definition: cvrf_priv.c:1148
cvrf_involvement::cvrf_involvement_get_description
const char * cvrf_involvement_get_description(const struct cvrf_involvement *involve)
cvrf_group::cvrf_group_get_product_ids
struct oscap_string_iterator * cvrf_group_get_product_ids(struct cvrf_group *group)
Definition: cvrf_priv.c:597
oscap.h
General OpenScap functions and types.
cvrf_vulnerability_cwe::cvrf_vulnerability_cwe_set_id
bool cvrf_vulnerability_cwe_set_id(struct cvrf_vulnerability_cwe *vuln_cwe, const char *id)
cvrf_threat::cvrf_threat_clone
struct cvrf_threat * cvrf_threat_clone(const struct cvrf_threat *threat)
Definition: cvrf_priv.c:260
cvrf_reference::cvrf_reference_new
struct cvrf_reference * cvrf_reference_new(void)
New CVRF Reference structure.
Definition: cvrf_priv.c:1127
cvrf_session::cvrf_session_set_os_name
bool cvrf_session_set_os_name(struct cvrf_session *session, const char *os_name)
Add the CPE name for filtering of relevant ProductIDs and CVRF elements.
cvrf_threat::cvrf_threat_get_product_ids
struct oscap_string_iterator * cvrf_threat_get_product_ids(struct cvrf_threat *threat)
Definition: cvrf_priv.c:228
cvrf_doc_publisher::cvrf_doc_publisher_set_issuing_authority
bool cvrf_doc_publisher_set_issuing_authority(struct cvrf_doc_publisher *publisher, const char *issuing_authority)
cvrf_threat::cvrf_threat_set_description
bool cvrf_threat_set_description(struct cvrf_threat *threat, const char *description)
cvrf_note::cvrf_note_new
struct cvrf_note * cvrf_note_new(void)
New CVRF Note element within Notes or DocumentNotes container.
Definition: cvrf_priv.c:909
cvrf_relationship::cvrf_relationship_clone
struct cvrf_relationship * cvrf_relationship_clone(const struct cvrf_relationship *relation)
Definition: cvrf_priv.c:670
cvrf_model
Definition: cvrf_priv.c:1235
cvrf_doc_publisher::cvrf_doc_publisher_get_contact_details
const char * cvrf_doc_publisher_get_contact_details(const struct cvrf_doc_publisher *publisher)
cvrf_involvement::cvrf_involvement_new
struct cvrf_involvement * cvrf_involvement_new(void)
New CVRF Involvement.
Definition: cvrf_priv.c:330
cvrf_model::cvrf_model_get_identification
const char * cvrf_model_get_identification(struct cvrf_model *model)
Definition: cvrf_priv.c:1252
cvrf_doc_tracking::cvrf_doc_tracking_set_tracking_id
bool cvrf_doc_tracking_set_tracking_id(struct cvrf_doc_tracking *tracking, const char *id)
cvrf_product_name::cvrf_product_name_clone
struct cvrf_product_name * cvrf_product_name_clone(const struct cvrf_product_name *full_name)
Definition: cvrf_priv.c:579
cvrf_vulnerability::cvrf_vulnerability_new
struct cvrf_vulnerability * cvrf_vulnerability_new(void)
New CVRF Vulnerability.
Definition: cvrf_priv.c:448
cvrf_revision::cvrf_revision_new
struct cvrf_revision * cvrf_revision_new(void)
New CVRF Revision structure.
Definition: cvrf_priv.c:955
cvrf_threat::cvrf_threat_new
struct cvrf_threat * cvrf_threat_new(void)
New CVRF Threat element.
Definition: cvrf_priv.c:235
cvrf_reference::cvrf_reference_free
void cvrf_reference_free(struct cvrf_reference *reference)
Deallocates memory for a Reference element of the References container.
Definition: cvrf_priv.c:1139
cvrf_vulnerability_cwe::cvrf_vulnerability_cwe_new
struct cvrf_vulnerability_cwe * cvrf_vulnerability_cwe_new(void)
New CVRF CWE structure.
Definition: cvrf_priv.c:368
cvrf_reference::cvrf_reference_get_url
const char * cvrf_reference_get_url(const struct cvrf_reference *reference)
cvrf_product_tree::cvrf_product_tree_add_product_name
bool cvrf_product_tree_add_product_name(struct cvrf_product_tree *tree, struct cvrf_product_name *full_name)
cvrf_vulnerability_cwe::cvrf_vulnerability_cwe_set_cwe
bool cvrf_vulnerability_cwe_set_cwe(struct cvrf_vulnerability_cwe *vuln_cwe, const char *cwe)
cvrf_revision::cvrf_revision_get_date
const char * cvrf_revision_get_date(const struct cvrf_revision *revision)
cvrf_vulnerability::cvrf_vulnerability_set_release_date
bool cvrf_vulnerability_set_release_date(struct cvrf_vulnerability *vuln, const char *release_date)
cvrf_product_name
Definition: cvrf_priv.c:553
cvrf_score_set::cvrf_score_set_set_impact
bool cvrf_score_set_set_impact(struct cvrf_score_set *score_set, struct cvss_impact *impact)
cvrf_model::cvrf_model_add_vulnerability
bool cvrf_model_add_vulnerability(struct cvrf_model *model, struct cvrf_vulnerability *vuln)
cvrf_involvement
Definition: cvrf_priv.c:315
cvrf_revision::cvrf_revision_free
void cvrf_revision_free(struct cvrf_revision *revision)
Deallocates memory for a Revision element of the RevisionHistory container.
Definition: cvrf_priv.c:966
cvrf_score_set::cvrf_score_set_get_temporal_score
char * cvrf_score_set_get_temporal_score(const struct cvrf_score_set *score_set)
Definition: cvrf_priv.c:178
cvrf_session::cvrf_model_get_results_source
struct oscap_source * cvrf_model_get_results_source(struct oscap_source *import_source, const char *os_name)
Import and parse the CVRF Model from the provided source, filter it by CPE to find appropriate packag...
Definition: cvrf_eval.c:221
cvrf_relationship
Definition: cvrf_priv.c:633
cvrf_score_set
Definition: cvrf_priv.c:132
cvrf_vulnerability::cvrf_vulnerability_get_discovery_date
const char * cvrf_vulnerability_get_discovery_date(const struct cvrf_vulnerability *vuln)
cvrf_vulnerability::cvrf_vulnerability_get_notes
struct oscap_iterator * cvrf_vulnerability_get_notes(struct cvrf_vulnerability *vuln)
Definition: cvrf_priv.c:443
cvrf_vulnerability
Definition: cvrf_priv.c:398
cvrf_doc_tracking::cvrf_doc_tracking_get_init_release_date
const char * cvrf_doc_tracking_get_init_release_date(const struct cvrf_doc_tracking *tracking)
cvrf_score_set::cvrf_score_set_get_product_ids
struct oscap_string_iterator * cvrf_score_set_get_product_ids(struct cvrf_score_set *score_set)
Definition: cvrf_priv.c:140
cvrf_session::cvrf_session_set_index
bool cvrf_session_set_index(struct cvrf_session *session, struct cvrf_index *index)
Add the CVRF index to be evaluated to the Session structure.
cvrf_relationship::cvrf_relationship_set_product_name
bool cvrf_relationship_set_product_name(struct cvrf_relationship *relation, struct cvrf_product_name *name)
cvrf_model::cvrf_model_supported
const char * cvrf_model_supported(void)
Get supported version of CVRF XML.
Definition: cvrf.c:102
cvrf_vulnerability::cvrf_vulnerability_add_remediation
bool cvrf_vulnerability_add_remediation(struct cvrf_vulnerability *vuln, struct cvrf_remediation *remed)
cvrf_acknowledgment::cvrf_acknowledgment_set_description
bool cvrf_acknowledgment_set_description(struct cvrf_acknowledgment *ack, const char *description)
cvrf_product_name::cvrf_product_name_get_cpe
const char * cvrf_product_name_get_cpe(const struct cvrf_product_name *full_name)
cvrf_branch::cvrf_branch_set_branch_name
bool cvrf_branch_set_branch_name(struct cvrf_branch *branch, const char *branch_name)
cvrf_doc_tracking::cvrf_doc_tracking_get_cur_release_date
const char * cvrf_doc_tracking_get_cur_release_date(const struct cvrf_doc_tracking *tracking)
cvrf_doc_tracking::cvrf_doc_tracking_set_init_release_date
bool cvrf_doc_tracking_set_init_release_date(struct cvrf_doc_tracking *tracking, const char *init_release_date)
cvrf_product_tree::cvrf_product_tree_get_relationships
struct cvrf_relationship_iterator * cvrf_product_tree_get_relationships(const struct cvrf_product_tree *tree)
cvrf_vulnerability::cvrf_vulnerability_get_threats
struct cvrf_threat_iterator * cvrf_vulnerability_get_threats(const struct cvrf_vulnerability *vuln)
cvrf_vulnerability::cvrf_vulnerability_add_cvrf_product_status
bool cvrf_vulnerability_add_cvrf_product_status(struct cvrf_vulnerability *vuln, struct cvrf_product_status *stat)
cvrf_vulnerability::cvrf_vulnerability_set_cve_id
bool cvrf_vulnerability_set_cve_id(struct cvrf_vulnerability *vuln, const char *cve_id)
cvrf_reference::cvrf_reference_get_description
const char * cvrf_reference_get_description(const struct cvrf_reference *reference)
cvrf_product_tree::cvrf_product_tree_filter_by_cpe
int cvrf_product_tree_filter_by_cpe(struct cvrf_product_tree *tree, const char *cpe)
Use the CPE name to find the matching ProductID, then filter the tree by removing branches and relati...
Definition: cvrf_priv.c:810
cvrf_score_set::cvrf_score_set_get_base_score
char * cvrf_score_set_get_base_score(const struct cvrf_score_set *score_set)
Definition: cvrf_priv.c:170
cvrf_relationship::cvrf_relationship_free
void cvrf_relationship_free(struct cvrf_relationship *relationship)
Deallocates memory for a Relationship element.
Definition: cvrf_priv.c:660
cvrf_doc_tracking::cvrf_doc_tracking_set_version
bool cvrf_doc_tracking_set_version(struct cvrf_doc_tracking *tracking, const char *version)
cvrf_model::cvrf_model_get_product_tree
struct cvrf_product_tree * cvrf_model_get_product_tree(struct cvrf_model *model)
Definition: cvrf_priv.c:1248
cvrf_document::cvrf_document_free
void cvrf_document_free(struct cvrf_document *doc)
Deallocates memory for the CVRF Document structure and all its child DocumentTracking, DocumentPublisher, DocumentReferences structures.
Definition: cvrf_priv.c:1203
cvrf_document::cvrf_document_new
struct cvrf_document * cvrf_document_new(void)
New CVRF Document structure.
Definition: cvrf_priv.c:1187
cvrf_score_set::cvrf_score_set_clone
struct cvrf_score_set * cvrf_score_set_clone(const struct cvrf_score_set *score_set)
Definition: cvrf_priv.c:203
cvrf_branch
Definition: cvrf_priv.c:682
cvrf_index::cvrf_index_get_models
struct cvrf_model_iterator * cvrf_index_get_models(const struct cvrf_index *index)
cvrf_vulnerability::cvrf_vulnerability_get_cve_id
const char * cvrf_vulnerability_get_cve_id(const struct cvrf_vulnerability *vuln)
cvrf_remediation::cvrf_remediation_get_entitlement
const char * cvrf_remediation_get_entitlement(const struct cvrf_remediation *remed)
cvrf_session::cvrf_session_free
void cvrf_session_free(struct cvrf_session *session)
Deallocates memory for a CVRF Session structure.
Definition: cvrf_eval.c:116
cvrf_group::cvrf_group_set_description
bool cvrf_group_set_description(struct cvrf_group *group, const char *description)
cvrf_product_tree::cvrf_product_tree_new
struct cvrf_product_tree * cvrf_product_tree_new(void)
New ProductTree structure.
Definition: cvrf_priv.c:767
cvrf_acknowledgment::cvrf_acknowledgment_get_names
struct oscap_string_iterator * cvrf_acknowledgment_get_names(const struct cvrf_acknowledgment *ack)
Definition: cvrf_priv.c:846
cvrf_rpm_attributes::cvrf_rpm_attributes_get_full_package_name
const char * cvrf_rpm_attributes_get_full_package_name(const struct cvrf_rpm_attributes *attributes)
cvrf_doc_tracking::cvrf_doc_tracking_get_version
const char * cvrf_doc_tracking_get_version(const struct cvrf_doc_tracking *tracking)
cvrf_remediation::cvrf_remediation_get_description
const char * cvrf_remediation_get_description(const struct cvrf_remediation *remed)
cvrf_acknowledgment::cvrf_acknowledgment_new
struct cvrf_acknowledgment * cvrf_acknowledgment_new(void)
New CVRF Acknowledgment element within Acknowledgments container.
Definition: cvrf_priv.c:858
cvrf_product_name::cvrf_product_name_new
struct cvrf_product_name * cvrf_product_name_new(void)
New FullProductName of Branch or ProductTree.
Definition: cvrf_priv.c:560
cvrf_product_name::cvrf_product_name_set_product_id
bool cvrf_product_name_set_product_id(struct cvrf_product_name *full_name, const char *product_id)
cvrf_document::cvrf_document_get_notes
struct oscap_iterator * cvrf_document_get_notes(struct cvrf_document *doc)
Definition: cvrf_priv.c:1175
cvrf_document::cvrf_document_set_doc_distribution
bool cvrf_document_set_doc_distribution(struct cvrf_document *doc, const char *distribution)
cvrf_vulnerability::cvrf_vulnerability_set_system_name
bool cvrf_vulnerability_set_system_name(struct cvrf_vulnerability *vuln, const char *sys_name)
cvrf_document::cvrf_document_set_tracking
bool cvrf_document_set_tracking(struct cvrf_document *doc, struct cvrf_doc_tracking *track)
cvrf_involvement::cvrf_involvement_free
void cvrf_involvement_free(struct cvrf_involvement *involve)
Deallocates memory for an Involvement element.
Definition: cvrf_priv.c:341
cvrf_branch::cvrf_branch_get_subbranches
struct oscap_iterator * cvrf_branch_get_subbranches(struct cvrf_branch *branch)
Definition: cvrf_priv.c:691
cvrf_revision::cvrf_revision_set_number
bool cvrf_revision_set_number(struct cvrf_revision *revision, const char *number)
cvrf_remediation::cvrf_remediation_clone
struct cvrf_remediation * cvrf_remediation_clone(const struct cvrf_remediation *remed)
Definition: cvrf_priv.c:116
cvrf_score_set::cvrf_score_set_add_metric
bool cvrf_score_set_add_metric(struct cvrf_score_set *score_set, enum cvss_category category, const char *score)
Definition: cvrf_priv.c:144
oscap_iterator
Definition: list.h:84
cvrf_vulnerability::cvrf_vulnerability_filter_by_product
int cvrf_vulnerability_filter_by_product(struct cvrf_vulnerability *vuln, const char *prod)
Definition: cvrf_priv.c:514
cvrf_doc_publisher::cvrf_doc_publisher_new
struct cvrf_doc_publisher * cvrf_doc_publisher_new(void)
New CVRF DocumentPublisher structure.
Definition: cvrf_priv.c:1079
cvrf_product_tree::cvrf_product_tree_get_product_groups
struct cvrf_group_iterator * cvrf_product_tree_get_product_groups(const struct cvrf_product_tree *tree)
cvrf_threat::cvrf_threat_get_date
const char * cvrf_threat_get_date(const struct cvrf_threat *threat)
cvrf_index::cvrf_index_set_source_url
bool cvrf_index_set_source_url(struct cvrf_index *index, const char *url)
cvrf_index
Definition: cvrf_priv.c:1309
cvrf_session::cvrf_session_get_product_ids
struct oscap_string_iterator * cvrf_session_get_product_ids(struct cvrf_session *session)
After filtering the CVRF model structure by the CPE, all the ProductIDs related to that operating sys...
Definition: cvrf_eval.c:78
cvrf_vulnerability::cvrf_vulnerability_get_product_statuses
struct cvrf_product_status_iterator * cvrf_vulnerability_get_product_statuses(const struct cvrf_vulnerability *vuln)
cvrf_group
Definition: cvrf_priv.c:589
cvrf_session::cvrf_session_get_model
struct cvrf_model * cvrf_session_get_model(struct cvrf_session *session)
Definition: cvrf_eval.c:81
cvrf_note::cvrf_note_get_ordinal
int cvrf_note_get_ordinal(const struct cvrf_note *note)
cvrf_reference
Definition: cvrf_priv.c:1115
cvrf_document::cvrf_document_get_acknowledgments
struct oscap_iterator * cvrf_document_get_acknowledgments(struct cvrf_document *doc)
Definition: cvrf_priv.c:1183
cvrf_remediation::cvrf_remediation_get_url
const char * cvrf_remediation_get_url(const struct cvrf_remediation *remed)
cvrf_model::cvrf_model_get_doc_title
const char * cvrf_model_get_doc_title(const struct cvrf_model *model)
cvrf_remediation::cvrf_remediation_set_url
bool cvrf_remediation_set_url(struct cvrf_remediation *remed, const char *url)
cvrf_product_tree::cvrf_product_tree_clone
struct cvrf_product_tree * cvrf_product_tree_clone(const struct cvrf_product_tree *tree)
Definition: cvrf_priv.c:790
cvrf_doc_tracking::cvrf_doc_tracking_set_generator_engine
bool cvrf_doc_tracking_set_generator_engine(struct cvrf_doc_tracking *tracking, const char *generator_engine)
cvrf_model::cvrf_model_set_document
bool cvrf_model_set_document(struct cvrf_model *model, struct cvrf_document *doc)
cvrf_branch::cvrf_branch_new
struct cvrf_branch * cvrf_branch_new(void)
New CVRF branch of ProductTree or sub-branch.
Definition: cvrf_priv.c:699
cvrf_model::cvrf_model_import
struct cvrf_model * cvrf_model_import(struct oscap_source *source)
Parses the specified XML file and creates a list of CVRF data structures.
Definition: cvrf.c:58
cvrf_vulnerability::cvrf_vulnerability_set_system_id
bool cvrf_vulnerability_set_system_id(struct cvrf_vulnerability *vuln, const char *id)
cvrf_group::cvrf_group_get_group_id
const char * cvrf_group_get_group_id(const struct cvrf_group *group)
cvrf_product_status::cvrf_product_status_free
void cvrf_product_status_free(struct cvrf_product_status *status)
Deallocates memory for a Status element of the ProductStatuses container.
Definition: cvrf_priv.c:296
cvrf_group::cvrf_group_free
void cvrf_group_free(struct cvrf_group *group)
Deallocates memory for a Group element.
Definition: cvrf_priv.c:612
cvrf_product_status::cvrf_product_status_clone
struct cvrf_product_status * cvrf_product_status_clone(const struct cvrf_product_status *stat)
Definition: cvrf_priv.c:304
cvrf_remediation::cvrf_remediation_get_group_ids
struct oscap_string_iterator * cvrf_remediation_get_group_ids(struct cvrf_remediation *remed)
Definition: cvrf_priv.c:84
cvrf_vulnerability::cvrf_vulnerability_get_ordinal
int cvrf_vulnerability_get_ordinal(const struct cvrf_vulnerability *vuln)
cvrf_model::cvrf_model_new
struct cvrf_model * cvrf_model_new(void)
New CVRF model.
Definition: cvrf_priv.c:1257
cvrf_remediation::cvrf_remediation_set_date
bool cvrf_remediation_set_date(struct cvrf_remediation *remed, const char *date)
cvrf_product_tree::cvrf_product_tree_add_group
bool cvrf_product_tree_add_group(struct cvrf_product_tree *tree, struct cvrf_group *group)
cvrf_rpm_attributes::cvrf_rpm_attributes_get_rpm_name
const char * cvrf_rpm_attributes_get_rpm_name(const struct cvrf_rpm_attributes *attributes)
Used to check if the RPM file exists on the system during evaluation.
cvrf_score_set::cvrf_score_set_get_environmental_score
char * cvrf_score_set_get_environmental_score(const struct cvrf_score_set *score_set)
Definition: cvrf_priv.c:174
cvrf_doc_tracking::cvrf_doc_tracking_get_generator_engine
const char * cvrf_doc_tracking_get_generator_engine(const struct cvrf_doc_tracking *tracking)
cvrf_acknowledgment
Definition: cvrf_priv.c:838
cvrf_vulnerability::cvrf_vulnerability_get_involvements
struct cvrf_involvement_iterator * cvrf_vulnerability_get_involvements(const struct cvrf_vulnerability *vuln)
cvrf_group::cvrf_group_clone
struct cvrf_group * cvrf_group_clone(const struct cvrf_group *group)
Definition: cvrf_priv.c:622
cvrf_vulnerability::cvrf_vulnerability_get_references
struct oscap_iterator * cvrf_vulnerability_get_references(struct cvrf_vulnerability *vuln)
Definition: cvrf_priv.c:435
cvrf_session::cvrf_session_new_from_source_index
struct cvrf_session * cvrf_session_new_from_source_index(struct oscap_source *source)
Definition: cvrf_eval.c:102
cvrf_doc_publisher
Definition: cvrf_priv.c:1065
cvrf_session::cvrf_session_new_from_source_model
struct cvrf_session * cvrf_session_new_from_source_model(struct oscap_source *source)
Definition: cvrf_eval.c:88
cvrf_note::cvrf_note_get_audience
const char * cvrf_note_get_audience(const struct cvrf_note *note)
cvrf_product_name::cvrf_product_name_free
void cvrf_product_name_free(struct cvrf_product_name *full_name)
Deallocates memory for a FullProductName element.
Definition: cvrf_priv.c:570
cvrf_revision::cvrf_revision_set_description
bool cvrf_revision_set_description(struct cvrf_revision *revision, const char *description)
cvrf_vulnerability::cvrf_vulnerability_add_score_set
bool cvrf_vulnerability_add_score_set(struct cvrf_vulnerability *vuln, struct cvrf_score_set *score_set)
cvrf_remediation
Definition: cvrf_priv.c:63
cvrf_revision::cvrf_revision_clone
struct cvrf_revision * cvrf_revision_clone(const struct cvrf_revision *revision)
Definition: cvrf_priv.c:976
cvrf_doc_publisher::cvrf_doc_publisher_clone
struct cvrf_doc_publisher * cvrf_doc_publisher_clone(const struct cvrf_doc_publisher *publisher)
Definition: cvrf_priv.c:1101
cvrf_index::cvrf_index_add_model
bool cvrf_index_add_model(struct cvrf_index *index, struct cvrf_model *model)
cvrf_vulnerability::cvrf_vulnerability_add_vulnerability_cwe
bool cvrf_vulnerability_add_vulnerability_cwe(struct cvrf_vulnerability *vuln, struct cvrf_vulnerability_cwe *vulnerability_cwe)
cvrf_threat::cvrf_threat_get_description
const char * cvrf_threat_get_description(const struct cvrf_threat *threat)
cvrf_document::cvrf_document_get_references
struct oscap_iterator * cvrf_document_get_references(struct cvrf_document *doc)
Definition: cvrf_priv.c:1179
cvrf_threat::cvrf_threat_get_group_ids
struct oscap_string_iterator * cvrf_threat_get_group_ids(struct cvrf_threat *threat)
Definition: cvrf_priv.c:231
oscap_source
Definition: oscap_source.c:62
cvrf_doc_tracking::cvrf_doc_tracking_set_generator_date
bool cvrf_doc_tracking_set_generator_date(struct cvrf_doc_tracking *tracking, const char *generator_date)
cvrf_revision::cvrf_revision_get_description
const char * cvrf_revision_get_description(const struct cvrf_revision *revision)
cvss_category
cvss_category
CVSS score category.
Definition: cvss_score.h:47
cvrf_acknowledgment::cvrf_acknowledgment_get_organizations
struct oscap_string_iterator * cvrf_acknowledgment_get_organizations(const struct cvrf_acknowledgment *ack)
Definition: cvrf_priv.c:850
cvrf_remediation::cvrf_remediation_free
void cvrf_remediation_free(struct cvrf_remediation *remed)
Deallocates memory for a Remediation element of the Remediations container.
Definition: cvrf_priv.c:103
cvrf_revision
Definition: cvrf_priv.c:946
cvrf_vulnerability_cwe::cvrf_vulnerability_cwe_get_cwe
const char * cvrf_vulnerability_cwe_get_cwe(const struct cvrf_vulnerability_cwe *vuln_cwe)
cvrf_acknowledgment::cvrf_acknowledgment_get_description
const char * cvrf_acknowledgment_get_description(const struct cvrf_acknowledgment *ack)
cvrf_relationship::cvrf_relationship_get_product_name
struct cvrf_product_name * cvrf_relationship_get_product_name(const struct cvrf_relationship *relation)
cvrf_note::cvrf_note_get_contents
const char * cvrf_note_get_contents(const struct cvrf_note *note)
cvrf_vulnerability::cvrf_vulnerability_set_discovery_date
bool cvrf_vulnerability_set_discovery_date(struct cvrf_vulnerability *vuln, const char *discovery_date)
cvrf_revision::cvrf_revision_set_date
bool cvrf_revision_set_date(struct cvrf_revision *revision, const char *date)
cvrf_branch::cvrf_branch_free
void cvrf_branch_free(struct cvrf_branch *branch)
Deallocates memory for a Branch element.
Definition: cvrf_priv.c:711
cvrf_rpm_attributes::cvrf_rpm_attributes_new
struct cvrf_rpm_attributes * cvrf_rpm_attributes_new(void)
Create a new CVRF RPM attributes structure.
Definition: cvrf_eval.c:140
cvrf_model::cvrf_model_get_doc_type
const char * cvrf_model_get_doc_type(const struct cvrf_model *model)
cvrf_product_tree::cvrf_product_tree_get_product_names
struct cvrf_product_name_iterator * cvrf_product_tree_get_product_names(const struct cvrf_product_tree *tree)
cvrf_group::cvrf_group_get_description
const char * cvrf_group_get_description(const struct cvrf_group *group)
cvrf_index::cvrf_index_get_index_file
const char * cvrf_index_get_index_file(const struct cvrf_index *index)
cvrf_session::cvrf_session_get_os_name
const char * cvrf_session_get_os_name(const struct cvrf_session *session)
cvrf_model::cvrf_model_set_doc_title
bool cvrf_model_set_doc_title(struct cvrf_model *model, const char *doc_title)
cvrf_threat::cvrf_threat_free
void cvrf_threat_free(struct cvrf_threat *threat)
Deallocates memory for a Threat element of the Threats container.
Definition: cvrf_priv.c:249
cvrf_index::cvrf_index_clone
struct cvrf_index * cvrf_index_clone(const struct cvrf_index *index)
Definition: cvrf_priv.c:1340
cvrf_acknowledgment::cvrf_acknowledgment_free
void cvrf_acknowledgment_free(struct cvrf_acknowledgment *ack)
Deallocates memory for an Acknowledgment element of the Acknowledgments container.
Definition: cvrf_priv.c:870
cvrf_group::cvrf_group_set_group_id
bool cvrf_group_set_group_id(struct cvrf_group *group, const char *group_id)
cvrf_vulnerability::cvrf_vulnerability_free
void cvrf_vulnerability_free(struct cvrf_vulnerability *vulnerability)
Deallocates memory for a Vulnerability element.
Definition: cvrf_priv.c:472
cvrf_index::cvrf_index_free
void cvrf_index_free(struct cvrf_index *index)
Deallocates memory for the CVRF Index structure and all the Models it contains.
Definition: cvrf_priv.c:1330
cvrf_doc_publisher::cvrf_doc_publisher_set_vendor_id
bool cvrf_doc_publisher_set_vendor_id(struct cvrf_doc_publisher *publisher, const char *vendor_id)
cvrf_score_set::cvrf_score_set_new
struct cvrf_score_set * cvrf_score_set_new(void)
New ScoreSet member of a CVSSScoreSets container within a Vulnerability element.
Definition: cvrf_priv.c:182
cvrf_vulnerability_cwe::cvrf_vulnerability_cwe_clone
struct cvrf_vulnerability_cwe * cvrf_vulnerability_cwe_clone(const struct cvrf_vulnerability_cwe *cwe)
Definition: cvrf_priv.c:387
cvrf_doc_publisher::cvrf_doc_publisher_get_issuing_authority
const char * cvrf_doc_publisher_get_issuing_authority(const struct cvrf_doc_publisher *publisher)
cvrf_relationship::cvrf_relationship_set_relates_to_ref
bool cvrf_relationship_set_relates_to_ref(struct cvrf_relationship *relation, const char *relates_to_ref)
cvrf_rpm_attributes::cvrf_rpm_attributes_get_evr_format
const char * cvrf_rpm_attributes_get_evr_format(const struct cvrf_rpm_attributes *attributes)
Used to check if the system is vulnerable by comparing EVR from the system to EVR in the CVRF file...
cvrf_remediation::cvrf_remediation_get_date
const char * cvrf_remediation_get_date(const struct cvrf_remediation *remed)
cvrf_index::cvrf_index_import
struct cvrf_index * cvrf_index_import(struct oscap_source *index_source)
Parses specified text index file and parses each filename in the list into a CVRF model contained in ...
Definition: cvrf.c:46
cvrf_doc_tracking::cvrf_doc_tracking_add_revision
bool cvrf_doc_tracking_add_revision(struct cvrf_doc_tracking *tracking, struct cvrf_revision *revision)
oscap_string_iterator
String iterator.
cvrf_doc_publisher::cvrf_doc_publisher_get_vendor_id
const char * cvrf_doc_publisher_get_vendor_id(const struct cvrf_doc_publisher *publisher)
cvrf_document::cvrf_document_get_aggregate_severity
const char * cvrf_document_get_aggregate_severity(const struct cvrf_document *doc)
cvss_score.h
Interface to Common Vulnerability Scoring System Version 2.
cvrf_note::cvrf_note_set_ordinal
bool cvrf_note_set_ordinal(struct cvrf_note *note, int ordinal)
cvrf_session::cvrf_index_get_results_source
struct oscap_source * cvrf_index_get_results_source(struct oscap_source *import_source, const char *os_name)
Import and parse the CVRF Index from the provided source, filter it by CPE to find appropriate packag...
Definition: cvrf_eval.c:249
cvrf_doc_tracking::cvrf_doc_tracking_get_tracking_id
const char * cvrf_doc_tracking_get_tracking_id(const struct cvrf_doc_tracking *tracking)
cvrf_document::cvrf_document_get_doc_distribution
const char * cvrf_document_get_doc_distribution(const struct cvrf_document *doc)
cvrf_index::cvrf_index_new
struct cvrf_index * cvrf_index_new(void)
New index structure holding all CVRF models.
Definition: cvrf_priv.c:1319
cvrf_vulnerability::cvrf_vulnerability_get_title
const char * cvrf_vulnerability_get_title(const struct cvrf_vulnerability *vuln)
cvrf_document::cvrf_document_get_publisher
struct cvrf_doc_publisher * cvrf_document_get_publisher(const struct cvrf_document *doc)
cvrf_note::cvrf_note_set_contents
bool cvrf_note_set_contents(struct cvrf_note *note, const char *contents)
cvrf_vulnerability::cvrf_vulnerability_add_threat
bool cvrf_vulnerability_add_threat(struct cvrf_vulnerability *vuln, struct cvrf_threat *threat)
cvrf_threat::cvrf_threat_set_date
bool cvrf_threat_set_date(struct cvrf_threat *threat, const char *date)
cvrf_rpm_attributes::cvrf_rpm_attributes_set_rpm_name
bool cvrf_rpm_attributes_set_rpm_name(struct cvrf_rpm_attributes *attributes, const char *rpm_name)
cvrf_score_set::cvrf_score_set_get_impact
struct cvss_impact * cvrf_score_set_get_impact(const struct cvrf_score_set *score_set)
cvrf_vulnerability::cvrf_vulnerability_get_release_date
const char * cvrf_vulnerability_get_release_date(const struct cvrf_vulnerability *vuln)
cvrf_vulnerability::cvrf_vulnerability_get_remediations
struct cvrf_remediation_iterator * cvrf_vulnerability_get_remediations(const struct cvrf_vulnerability *vuln)
cvrf_product_tree
Definition: cvrf_priv.c:750
cvrf_remediation::cvrf_remediation_new
struct cvrf_remediation * cvrf_remediation_new(void)
New CVRF Remediation.
Definition: cvrf_priv.c:88
cvrf_document::cvrf_document_get_namespace
const char * cvrf_document_get_namespace(const struct cvrf_document *doc)
cvrf_model::cvrf_model_clone
struct cvrf_model * cvrf_model_clone(const struct cvrf_model *model)
Definition: cvrf_priv.c:1282
cvrf_vulnerability_cwe::cvrf_vulnerability_cwe_free
void cvrf_vulnerability_cwe_free(struct cvrf_vulnerability_cwe *cwe)
Deallocates memory for a CWE element.
Definition: cvrf_priv.c:378
cvrf_model::cvrf_model_get_document
struct cvrf_document * cvrf_model_get_document(const struct cvrf_model *model)
cvrf_doc_tracking::cvrf_doc_tracking_new
struct cvrf_doc_tracking * cvrf_doc_tracking_new(void)
New CVRF DocumentTracking structure.
Definition: cvrf_priv.c:1015
cvrf_doc_publisher::cvrf_doc_publisher_set_contact_details
bool cvrf_doc_publisher_set_contact_details(struct cvrf_doc_publisher *publisher, const char *contact_details)
cvrf_note
Definition: cvrf_priv.c:893
cvrf_session
Definition: cvrf_eval.c:67
cvrf_doc_tracking
Definition: cvrf_priv.c:987
cvrf_vulnerability::cvrf_vulnerability_get_vulnerability_cwes
struct cvrf_vulnerability_cwe_iterator * cvrf_vulnerability_get_vulnerability_cwes(const struct cvrf_vulnerability *vuln)
cvrf_note::cvrf_note_get_title
const char * cvrf_note_get_title(const struct cvrf_note *note)
cvrf_vulnerability::cvrf_vulnerability_get_acknowledgments
struct oscap_iterator * cvrf_vulnerability_get_acknowledgments(struct cvrf_vulnerability *vuln)
Definition: cvrf_priv.c:439
cvrf_branch::cvrf_branch_clone
struct cvrf_branch * cvrf_branch_clone(const struct cvrf_branch *branch)
Definition: cvrf_priv.c:721
cvrf_document::cvrf_document_clone
struct cvrf_document * cvrf_document_clone(const struct cvrf_document *doc)
Definition: cvrf_priv.c:1218
cvrf_vulnerability::cvrf_vulnerability_get_system_id
const char * cvrf_vulnerability_get_system_id(const struct cvrf_vulnerability *vuln)
cvrf_document
Definition: cvrf_priv.c:1159
cvrf_vulnerability_cwe::cvrf_vulnerability_cwe_get_id
const char * cvrf_vulnerability_cwe_get_id(const struct cvrf_vulnerability_cwe *vuln_cwe)
cvrf_vulnerability::cvrf_vulnerability_get_system_name
const char * cvrf_vulnerability_get_system_name(const struct cvrf_vulnerability *vuln)
cvrf_model::cvrf_model_filter_by_cpe
int cvrf_model_filter_by_cpe(struct cvrf_model *model, const char *cpe)
Removes all Branches, Relationships, and ProductIDs within Vulnerabilities that do no pertain to the ...
Definition: cvrf_priv.c:1292
cvrf_vulnerability::cvrf_vulnerability_set_ordinal
bool cvrf_vulnerability_set_ordinal(struct cvrf_vulnerability *vuln, int ordinal)
cvrf_relationship::cvrf_relationship_new
struct cvrf_relationship * cvrf_relationship_new(void)
New CVRF Relationship element within ProductTree.
Definition: cvrf_priv.c:647
cvrf_rpm_attributes::cvrf_rpm_attributes_set_full_package_name
bool cvrf_rpm_attributes_set_full_package_name(struct cvrf_rpm_attributes *attributes, const char *full_package)
cvrf_product_status::cvrf_product_status_get_ids
struct oscap_string_iterator * cvrf_product_status_get_ids(struct cvrf_product_status *stat)
Definition: cvrf_priv.c:279
cvrf_doc_publisher::cvrf_doc_publisher_free
void cvrf_doc_publisher_free(struct cvrf_doc_publisher *publisher)
Deallocates memory for a DocumentPublisher element.
Definition: cvrf_priv.c:1091
cvrf_note::cvrf_note_set_title
bool cvrf_note_set_title(struct cvrf_note *note, const char *title)
cvrf_session::cvrf_session_get_index
struct cvrf_index * cvrf_session_get_index(const struct cvrf_session *session)
cvrf_index::cvrf_index_get_export_source
struct oscap_source * cvrf_index_get_export_source(struct cvrf_index *index)
Export CVRF Index to the export source as an XML doc.
Definition: cvrf.c:76
cvrf_remediation::cvrf_remediation_set_entitlement
bool cvrf_remediation_set_entitlement(struct cvrf_remediation *remed, const char *entitlement)
cvrf_rpm_attributes::cvrf_rpm_attributes_set_evr_format
bool cvrf_rpm_attributes_set_evr_format(struct cvrf_rpm_attributes *attributes, const char *evr_format)
cvrf_session::cvrf_session_set_model
void cvrf_session_set_model(struct cvrf_session *session, struct cvrf_model *model)
Add the CVRF model to be evaluated to the Session structure.
Definition: cvrf_eval.c:84
cvrf_note::cvrf_note_set_audience
bool cvrf_note_set_audience(struct cvrf_note *note, const char *audience)
cvrf_rpm_attributes
Definition: cvrf_eval.c:130
cvrf_document::cvrf_document_set_namespace
bool cvrf_document_set_namespace(struct cvrf_document *doc, const char *ns)
cvrf_model::cvrf_model_free
void cvrf_model_free(struct cvrf_model *cvrf)
Deallocates memory for the CVRF Model structure and all its child elements.
Definition: cvrf_priv.c:1270
cvrf_product_tree::cvrf_product_tree_add_relationship
bool cvrf_product_tree_add_relationship(struct cvrf_product_tree *tree, struct cvrf_relationship *relation)
cvrf_branch::cvrf_branch_get_branch_name
const char * cvrf_branch_get_branch_name(const struct cvrf_branch *branch)
cvrf_branch::cvrf_branch_set_product_name
bool cvrf_branch_set_product_name(struct cvrf_branch *branch, struct cvrf_product_name *name)
cvrf_product_status
Definition: cvrf_priv.c:274
cvrf_document::cvrf_document_get_tracking
struct cvrf_doc_tracking * cvrf_document_get_tracking(const struct cvrf_document *doc)
cvrf_model::cvrf_model_set_doc_type
bool cvrf_model_set_doc_type(struct cvrf_model *model, const char *doc_type)
cvrf_product_tree::get_cvrf_product_id_from_cpe
const char * get_cvrf_product_id_from_cpe(struct cvrf_product_tree *tree, const char *cpe)
Find the unique ProductID for the given CPE by searching the branches of the ProductTree: find the Pr...
Definition: cvrf_priv.c:799
cvrf_index::cvrf_index_set_index_file
bool cvrf_index_set_index_file(struct cvrf_index *index, const char *index_file)
cvrf_note::cvrf_note_clone
struct cvrf_note * cvrf_note_clone(const struct cvrf_note *note)
Definition: cvrf_priv.c:932
cvrf_involvement::cvrf_involvement_set_description
bool cvrf_involvement_set_description(struct cvrf_involvement *involve, const char *description)
cvrf_note::cvrf_note_free
void cvrf_note_free(struct cvrf_note *note)
Deallocates memory for a Note element of the Notes container.
Definition: cvrf_priv.c:922
cvrf_score_set::cvrf_score_set_set_vector
bool cvrf_score_set_set_vector(struct cvrf_score_set *score_set, const char *vector)
cvrf_remediation::cvrf_remediation_get_product_ids
struct oscap_string_iterator * cvrf_remediation_get_product_ids(struct cvrf_remediation *remed)
Definition: cvrf_priv.c:81
cvrf_doc_tracking::cvrf_doc_tracking_set_cur_release_date
bool cvrf_doc_tracking_set_cur_release_date(struct cvrf_doc_tracking *tracking, const char *cur_release_date)
cvrf_reference::cvrf_reference_set_url
bool cvrf_reference_set_url(struct cvrf_reference *reference, const char *url)
cvrf_vulnerability::cvrf_vulnerability_get_score_sets
struct cvrf_score_set_iterator * cvrf_vulnerability_get_score_sets(const struct cvrf_vulnerability *vuln)
cvrf_group::cvrf_group_new
struct cvrf_group * cvrf_group_new(void)
New CVRF Group child of ProductGroups container element.
Definition: cvrf_priv.c:601
cvrf_product_name::cvrf_product_name_get_product_id
const char * cvrf_product_name_get_product_id(const struct cvrf_product_name *full_name)
cvrf_remediation::cvrf_remediation_set_description
bool cvrf_remediation_set_description(struct cvrf_remediation *remed, const char *description)
cvrf_document::cvrf_document_set_aggregate_severity
bool cvrf_document_set_aggregate_severity(struct cvrf_document *doc, const char *severity)
cvrf_threat
Definition: cvrf_priv.c:215
cvrf_product_status::cvrf_product_status_new
struct cvrf_product_status * cvrf_product_status_new(void)
New Status member of a ProductStatuses container within a Vulnerability element.
Definition: cvrf_priv.c:286