Open SCAP Library
Loading...
Searching...
No Matches
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#include "oscap_export.h"
37
38
39/************************************************************************************************
40 * @struct cvrf_product_status
41 * Structure holding CVRF Status element (within a ProductStatuses container)
42 * Contains a list of ProductIDs and their status with respect to the parent Vulnerability
43 *
44 * PARENT NODE: ProductStatuses container (which is child of Vulnerability)
45 * REQUIRED: Type attribute [max. 1], ProductID(s) [min. 1, max. unbounded]
46 */
48
54OSCAP_API struct cvrf_product_status *cvrf_product_status_new(void);
55
61OSCAP_API void cvrf_product_status_free(struct cvrf_product_status *status);
62
68OSCAP_API struct cvrf_product_status *cvrf_product_status_clone(const struct cvrf_product_status *stat);
69
75OSCAP_API struct oscap_string_iterator *cvrf_product_status_get_ids(struct cvrf_product_status *stat);
76
77
78/************************************************************************************************
79 * @struct cvrf_threat
80 * Gives context about the type of Vulnerability and how much threat it poses
81 * Contained within a list representing a Threats container in Vulnerability structure
82 *
83 * PARENT NODE: Threats container (which is child of Vulnerability)
84 * REQUIRED: Type attribute [max 1], Description element [max. 1]
85 * OPTIONAL: ProductID(s) [min. 0, max. unbounded], GroupID(s) [min. 0, max.unbounded]
86 */
87struct cvrf_threat;
88
94OSCAP_API struct cvrf_threat *cvrf_threat_new(void);
95
101OSCAP_API void cvrf_threat_free(struct cvrf_threat *threat);
102
108OSCAP_API struct cvrf_threat *cvrf_threat_clone(const struct cvrf_threat *threat);
109
116OSCAP_API const char *cvrf_threat_get_date(const struct cvrf_threat *threat);
117
124OSCAP_API const char *cvrf_threat_get_description(const struct cvrf_threat *threat);
125
133OSCAP_API struct oscap_string_iterator *cvrf_threat_get_product_ids(struct cvrf_threat *threat);
134
142OSCAP_API struct oscap_string_iterator *cvrf_threat_get_group_ids(struct cvrf_threat *threat);
143
150OSCAP_API bool cvrf_threat_set_date(struct cvrf_threat *threat, const char *date);
151
158OSCAP_API bool cvrf_threat_set_description(struct cvrf_threat *threat, const char *description);
159
160
161/************************************************************************************************
162 * @struct cvrf_remediation
163 * Structure holding info for handling or fixing a particular Vulnerability
164 *
165 * PARENT NODE: Remediations container (which is child of Vulnerability)
166 * REQUIRED: Type attribute [max: 1], Description element [max: 1]
167 * OPTIONAL: ProductID(s) [min: 0, max: unbounded], GroupID(s) [min: 0, max: unbounded],
168 * Entitlement element [min: 0, max: 1], URL element [min: 0, max: 1]
169 */
170struct cvrf_remediation;
171
177OSCAP_API struct cvrf_remediation *cvrf_remediation_new(void);
178
184OSCAP_API void cvrf_remediation_free(struct cvrf_remediation *remed);
185
191OSCAP_API struct cvrf_remediation *cvrf_remediation_clone(const struct cvrf_remediation *remed);
192
199OSCAP_API const char *cvrf_remediation_get_date(const struct cvrf_remediation *remed);
200
207OSCAP_API const char *cvrf_remediation_get_description(const struct cvrf_remediation *remed);
208
215OSCAP_API const char *cvrf_remediation_get_url(const struct cvrf_remediation *remed);
216
223OSCAP_API const char *cvrf_remediation_get_entitlement(const struct cvrf_remediation *remed);
224
232OSCAP_API struct oscap_string_iterator *cvrf_remediation_get_product_ids(struct cvrf_remediation *remed);
233
241OSCAP_API struct oscap_string_iterator *cvrf_remediation_get_group_ids(struct cvrf_remediation *remed);
242
249OSCAP_API bool cvrf_remediation_set_date(struct cvrf_remediation *remed, const char *date);
250
257OSCAP_API bool cvrf_remediation_set_description(struct cvrf_remediation *remed, const char *description);
258
265OSCAP_API bool cvrf_remediation_set_url(struct cvrf_remediation *remed, const char *url);
266
273OSCAP_API bool cvrf_remediation_set_entitlement(struct cvrf_remediation *remed, const char *entitlement);
274
275
276/************************************************************************************************
277 * @struct cvrf_score_set
278 * Contains CVSS metrics for a given Vulnerability. No ProductID indicates that it pertains to all
279 * Products in a given CVRF file
280 *
281 * PARENT NODE: CVSSScoreSets container (which is child of Vulnerability)
282 * REQUIRED: BaseScore element [max: 1]
283 * OPTIONAL: TemporalScore element [min: 0, max:1], EnvironmentalScore element [min: 0, max: 1],
284 * ProductID(s) [min: 0, max: unbounded], Vector element [min: 0, max: 1]
285 */
286struct cvrf_score_set;
287
293OSCAP_API struct cvrf_score_set *cvrf_score_set_new(void);
294
300OSCAP_API void cvrf_score_set_free(struct cvrf_score_set *score_set);
301
307OSCAP_API struct cvrf_score_set *cvrf_score_set_clone(const struct cvrf_score_set *score_set);
308
315OSCAP_API const char *cvrf_score_set_get_vector(const struct cvrf_score_set *score_set);
316
324OSCAP_API struct oscap_string_iterator *cvrf_score_set_get_product_ids(struct cvrf_score_set *score_set);
325
331OSCAP_API struct cvss_impact *cvrf_score_set_get_impact(const struct cvrf_score_set *score_set);
332
339OSCAP_API char *cvrf_score_set_get_base_score(const struct cvrf_score_set *score_set);
340
347OSCAP_API char *cvrf_score_set_get_environmental_score(const struct cvrf_score_set *score_set);
348
355OSCAP_API char *cvrf_score_set_get_temporal_score(const struct cvrf_score_set *score_set);
356
363OSCAP_API bool cvrf_score_set_set_vector(struct cvrf_score_set *score_set, const char *vector);
364
371OSCAP_API bool cvrf_score_set_set_impact(struct cvrf_score_set *score_set, struct cvss_impact *impact);
372
380OSCAP_API bool cvrf_score_set_add_metric(struct cvrf_score_set *score_set, enum cvss_category category, const char *score);
381
382
383/************************************************************************************************
384 * @struct cvrf_involvement
385 * Gives information about the Document Publisher's level of involvement
386 * The 'Party' attribute gives the type of publisher (identical to DocumentPublisher Type)
387 *
388 * PARENT NODE: Involvements container
389 * REQUIRED: Status attribute [max: 1], Party attribute [max: 1]
390 * OPTIONAL: Description element [min: 0, max: 1]
391 */
392struct cvrf_involvement;
393
399OSCAP_API struct cvrf_involvement *cvrf_involvement_new(void);
400
406OSCAP_API void cvrf_involvement_free(struct cvrf_involvement *involve);
407
413OSCAP_API struct cvrf_involvement *cvrf_involvement_clone(const struct cvrf_involvement *involve);
414
421OSCAP_API const char *cvrf_involvement_get_description(const struct cvrf_involvement *involve);
422
429OSCAP_API bool cvrf_involvement_set_description(struct cvrf_involvement *involve, const char *description);
430
431/************************************************************************************************
432 * @struct cvrf_vulnerability_cwe
433 *
434 * PARENT NODE: Vulnerability
435 * REQUIRED: ID attribute [max: 1], CWE string content [max: 1]
436 */
438
445
451OSCAP_API void cvrf_vulnerability_cwe_free(struct cvrf_vulnerability_cwe *cwe);
452
459
466OSCAP_API const char *cvrf_vulnerability_cwe_get_cwe(const struct cvrf_vulnerability_cwe *vuln_cwe);
467
474OSCAP_API const char *cvrf_vulnerability_cwe_get_id(const struct cvrf_vulnerability_cwe *vuln_cwe);
475
476
483OSCAP_API bool cvrf_vulnerability_cwe_set_cwe(struct cvrf_vulnerability_cwe *vuln_cwe, const char *cwe);
484
491OSCAP_API bool cvrf_vulnerability_cwe_set_id(struct cvrf_vulnerability_cwe *vuln_cwe, const char *id);
492
493/************************************************************************************************
494 * @struct cvrf_vulnerability
495 * Provides information about Vulnerabilities for products and packages referenced in
496 * ProductTree branches and relationships
497 *
498 * PARENT NODE: cvrfdoc
499 * REQUIRED: Ordinal attribute [max: 1]
500 * OPTIONAL: Title element [min: 0, max:1], ID element [min: 0, max: 1], DiscoveryDate element [min: 0, max: 1],
501 * ReleaseDate element [min: 0, max: 1], Description element [min: 0, max: 1], CVE element [min: 0, max: 1],
502 * CWE ID(s) [min: 0, max: unbounded]
503 *
504 * CONTAINERS: Notes, Involvements, ProductStatuses, Threats, CVSSScoreSets, Remediations,
505 * References, Acknowledgments [min: 0, max: 1 for all containers]
506 */
507struct cvrf_vulnerability;
508
514OSCAP_API struct cvrf_vulnerability *cvrf_vulnerability_new(void);
515
521OSCAP_API void cvrf_vulnerability_free(struct cvrf_vulnerability *vulnerability);
522
528OSCAP_API struct cvrf_vulnerability *cvrf_vulnerability_clone(const struct cvrf_vulnerability *vuln);
529
536OSCAP_API int cvrf_vulnerability_filter_by_product(struct cvrf_vulnerability *vuln, const char *prod);
537
544OSCAP_API int cvrf_vulnerability_get_ordinal(const struct cvrf_vulnerability *vuln);
545
552OSCAP_API const char *cvrf_vulnerability_get_title(const struct cvrf_vulnerability *vuln);
553
560OSCAP_API const char *cvrf_vulnerability_get_system_id(const struct cvrf_vulnerability *vuln);
561
568OSCAP_API const char *cvrf_vulnerability_get_system_name(const struct cvrf_vulnerability *vuln);
569
576OSCAP_API const char *cvrf_vulnerability_get_discovery_date(const struct cvrf_vulnerability *vuln);
577
584OSCAP_API const char *cvrf_vulnerability_get_release_date(const struct cvrf_vulnerability *vuln);
585
592OSCAP_API const char *cvrf_vulnerability_get_cve_id(const struct cvrf_vulnerability *vuln);
593
600OSCAP_API bool cvrf_vulnerability_set_ordinal(struct cvrf_vulnerability *vuln, int ordinal);
601
608OSCAP_API bool cvrf_vulnerability_set_title(struct cvrf_vulnerability *vuln, const char *vulnerability_title);
609
616OSCAP_API bool cvrf_vulnerability_set_system_id(struct cvrf_vulnerability *vuln, const char *id);
617
624OSCAP_API bool cvrf_vulnerability_set_system_name(struct cvrf_vulnerability *vuln, const char *sys_name);
625
632OSCAP_API bool cvrf_vulnerability_set_discovery_date(struct cvrf_vulnerability *vuln, const char *discovery_date);
633
640OSCAP_API bool cvrf_vulnerability_set_release_date(struct cvrf_vulnerability *vuln, const char *release_date);
641
648OSCAP_API bool cvrf_vulnerability_set_cve_id(struct cvrf_vulnerability *vuln, const char *cve_id);
649
650
651/*-------------------------------------------------------------------------*\
652| Iterators of child elements of Vulnerability |
653\*-------------------------------------------------------------------------*/
654
660OSCAP_API struct oscap_iterator *cvrf_vulnerability_get_references(struct cvrf_vulnerability *vuln);
661
667OSCAP_API struct oscap_iterator *cvrf_vulnerability_get_acknowledgments(struct cvrf_vulnerability *vuln);
668
674OSCAP_API struct oscap_iterator *cvrf_vulnerability_get_notes(struct cvrf_vulnerability *vuln);
675
676/*******************************************
677 * @struct cvrf_vulnerability_cwe_iterator
678 * Iterator representing all CWE elements in the Vulnerability
679 * Contained as a list within the CVRF Vulnerability structure
680 */
681struct cvrf_vulnerability_cwe_iterator;
682
689OSCAP_API bool cvrf_vulnerability_add_cwe(struct cvrf_vulnerability *vuln, struct cvrf_vulnerability_cwe *vulnerability_cwe);
690
696OSCAP_API struct cvrf_vulnerability_cwe_iterator *cvrf_vulnerability_get_cwes(const struct cvrf_vulnerability *vuln);
697
703OSCAP_API struct cvrf_vulnerability_cwe *cvrf_vulnerability_cwe_iterator_next(struct cvrf_vulnerability_cwe_iterator *it);
704
710OSCAP_API bool cvrf_vulnerability_cwe_iterator_has_more(struct cvrf_vulnerability_cwe_iterator *it);
711
717OSCAP_API void cvrf_vulnerability_cwe_iterator_free(struct cvrf_vulnerability_cwe_iterator *it);
718
724OSCAP_API void cvrf_vulnerability_cwe_iterator_reset(struct cvrf_vulnerability_cwe_iterator *it);
725
731OSCAP_API void cvrf_vulnerability_cwe_iterator_remove(struct cvrf_vulnerability_cwe_iterator *it);
732
733/*******************************************
734 * @struct cvrf_involvement_iterator
735 * Iterator representing all Involvement elements in the Involvements container
736 * Contained as a list within the CVRF Vulnerability structure
737 */
738struct cvrf_involvement_iterator;
739
746OSCAP_API bool cvrf_vulnerability_add_involvement(struct cvrf_vulnerability *vuln, struct cvrf_involvement *involvement);
747
753OSCAP_API struct cvrf_involvement_iterator *cvrf_vulnerability_get_involvements(const struct cvrf_vulnerability *vuln);
754
760OSCAP_API struct cvrf_involvement *cvrf_involvement_iterator_next(struct cvrf_involvement_iterator *it);
761
767OSCAP_API bool cvrf_involvement_iterator_has_more(struct cvrf_involvement_iterator *it);
768
774OSCAP_API void cvrf_involvement_iterator_free(struct cvrf_involvement_iterator *it);
775
781OSCAP_API void cvrf_involvement_iterator_reset(struct cvrf_involvement_iterator *it);
782
788OSCAP_API void cvrf_involvement_iterator_remove(struct cvrf_involvement_iterator *it);
789
790/*******************************************
791 * @struct cvrf_score_set_iterator
792 * Iterator representing all ScoreSet elements in the CVSSScoreSets container
793 * Contained as a list within the CVRF Vulnerability structure
794 */
795struct cvrf_score_set_iterator;
796
803OSCAP_API bool cvrf_vulnerability_add_score_set(struct cvrf_vulnerability *vuln, struct cvrf_score_set *score_set);
804
810OSCAP_API struct cvrf_score_set_iterator *cvrf_vulnerability_get_score_sets(const struct cvrf_vulnerability *vuln);
811
817OSCAP_API struct cvrf_score_set *cvrf_score_set_iterator_next(struct cvrf_score_set_iterator *it);
818
824OSCAP_API bool cvrf_score_set_iterator_has_more(struct cvrf_score_set_iterator *it);
825
831OSCAP_API void cvrf_score_set_iterator_free(struct cvrf_score_set_iterator *it);
832
838OSCAP_API void cvrf_score_set_iterator_reset(struct cvrf_score_set_iterator *it);
839
845OSCAP_API void cvrf_score_set_iterator_remove(struct cvrf_score_set_iterator *it);
846
847/*******************************************
848 * @struct cvrf_product_status_iterator
849 * Iterator representing all Status elements in the ProductStatuses container
850 * Contained as a list within the CVRF Vulnerability structure
851 */
852struct cvrf_product_status_iterator;
853
861
867OSCAP_API struct cvrf_product_status_iterator *cvrf_vulnerability_get_product_statuses(const struct cvrf_vulnerability *vuln);
868
874OSCAP_API struct cvrf_product_status *cvrf_product_status_iterator_next(struct cvrf_product_status_iterator *it);
875
881OSCAP_API bool cvrf_product_status_iterator_has_more(struct cvrf_product_status_iterator *it);
882
888OSCAP_API void cvrf_product_status_iterator_free(struct cvrf_product_status_iterator *it);
889
895OSCAP_API void cvrf_product_status_iterator_reset(struct cvrf_product_status_iterator *it);
896
902OSCAP_API void cvrf_product_status_iterator_remove(struct cvrf_product_status_iterator *it);
903
904/*******************************************
905 * @struct cvrf_remediation_iterator
906 * Iterator representing all Remediation elements in the Remediations container
907 * Contained as a list within the CVRF Vulnerability structure
908 */
909struct cvrf_remediation_iterator;
910
918
924OSCAP_API struct cvrf_remediation_iterator *cvrf_vulnerability_get_remediations(const struct cvrf_vulnerability *vuln);
925
931OSCAP_API struct cvrf_remediation *cvrf_remediation_iterator_next(struct cvrf_remediation_iterator *it);
932
938OSCAP_API bool cvrf_remediation_iterator_has_more(struct cvrf_remediation_iterator *it);
939
945OSCAP_API void cvrf_remediation_iterator_free(struct cvrf_remediation_iterator *it);
946
952OSCAP_API void cvrf_remediation_iterator_reset(struct cvrf_remediation_iterator *it);
953
959OSCAP_API void cvrf_remediation_iterator_remove(struct cvrf_remediation_iterator *it);
960
961/*******************************************
962 * @struct cvrf_threat_iterator
963 * Iterator representing all Threat elements in the Threats container
964 * Contained as a list within the CVRF Vulnerability structure
965 */
966struct cvrf_threat_iterator;
967
974OSCAP_API bool cvrf_vulnerability_add_threat(struct cvrf_vulnerability *vuln, struct cvrf_threat *threat);
975
981OSCAP_API struct cvrf_threat_iterator *cvrf_vulnerability_get_threats(const struct cvrf_vulnerability *vuln);
982
988OSCAP_API struct cvrf_threat *cvrf_threat_iterator_next(struct cvrf_threat_iterator *it);
989
995OSCAP_API bool cvrf_threat_iterator_has_more(struct cvrf_threat_iterator *it);
996
1002OSCAP_API void cvrf_threat_iterator_free(struct cvrf_threat_iterator *it);
1003
1009OSCAP_API void cvrf_threat_iterator_reset(struct cvrf_threat_iterator *it);
1010
1016OSCAP_API void cvrf_threat_iterator_remove(struct cvrf_threat_iterator *it);
1017
1018/************************************************************************************************
1019 * @struct cvrf_product_name
1020 * Represents FullProductName element, which is a child of both Branch and Relationship elements
1021 * Links a CPE to its ProductID or a package ProductID. No two FullProductName elements can
1022 * have the same ProductID
1023 *
1024 * PARENT NODE: ProductTree, Branch, or Relationship
1025 * REQUIRED: ProductID attribute [max: 1], CPE element [max: 1]
1026 */
1027struct cvrf_product_name;
1028
1034OSCAP_API struct cvrf_product_name *cvrf_product_name_new(void);
1035
1041OSCAP_API void cvrf_product_name_free(struct cvrf_product_name *full_name);
1042
1048OSCAP_API struct cvrf_product_name *cvrf_product_name_clone(const struct cvrf_product_name *full_name);
1049
1056OSCAP_API const char *cvrf_product_name_get_product_id(const struct cvrf_product_name *full_name);
1057
1064OSCAP_API const char *cvrf_product_name_get_cpe(const struct cvrf_product_name *full_name);
1065
1072OSCAP_API bool cvrf_product_name_set_product_id(struct cvrf_product_name *full_name, const char *product_id);
1073
1080OSCAP_API bool cvrf_product_name_set_cpe(struct cvrf_product_name *full_name, const char *cpe);
1081
1082/************************************************************************************************
1083 * @struct cvrf_group
1084 * Structure that categorically groups different products referenced in the document.
1085 * One ProductID is used per group member. The GroupID can be used as a reference for
1086 * other elements.
1087 *
1088 * PARENT NODE: ProductGroups container (which is a child of ProductTree)
1089 * REQUIRED: GroupID attribute [max: 1], ProductID element [min:2, max: unbounded]
1090 * OPTIONAL: Description element [min: 0, max: 1]
1091 */
1092struct cvrf_group;
1093
1099OSCAP_API struct cvrf_group *cvrf_group_new(void);
1100
1106OSCAP_API void cvrf_group_free(struct cvrf_group *group);
1107
1113OSCAP_API struct cvrf_group *cvrf_group_clone(const struct cvrf_group *group);
1114
1121OSCAP_API const char *cvrf_group_get_group_id(const struct cvrf_group *group);
1122
1129OSCAP_API const char *cvrf_group_get_description(const struct cvrf_group *group);
1130
1137OSCAP_API bool cvrf_group_set_group_id(struct cvrf_group *group, const char *group_id);
1138
1145OSCAP_API bool cvrf_group_set_description(struct cvrf_group *group, const char *description);
1146
1153OSCAP_API struct oscap_string_iterator *cvrf_group_get_product_ids(struct cvrf_group *group);
1154
1155
1156/************************************************************************************************
1157 * @struct cvrf_relationship
1158 * Structure within a parent ProductTree. Establishes a link between two products (FullProductNames)
1159 * referenced in the document. Thus, at least two FullProductName elements must exist in the document.
1160 *
1161 * PARENT NODE: ProductTree
1162 * REQUIRED: ProductReference attribute [max: 1], RelationType attribute [max: 1],
1163 * RelatesToProductReference attribute [max: 1], FullProductName element [max: 1]
1164 */
1165struct cvrf_relationship;
1166
1172OSCAP_API struct cvrf_relationship *cvrf_relationship_new(void);
1173
1179OSCAP_API void cvrf_relationship_free(struct cvrf_relationship *relationship);
1180
1186OSCAP_API struct cvrf_relationship *cvrf_relationship_clone(const struct cvrf_relationship *relation);
1187
1194OSCAP_API const char *cvrf_relationship_get_product_reference(const struct cvrf_relationship *relation);
1195
1202OSCAP_API const char *cvrf_relationship_get_relates_to_ref(const struct cvrf_relationship *relation);
1203
1211
1218OSCAP_API bool cvrf_relationship_set_product_reference(struct cvrf_relationship *relation, const char *product_reference);
1219
1226OSCAP_API bool cvrf_relationship_set_relates_to_ref(struct cvrf_relationship *relation, const char *relates_to_ref);
1227
1234OSCAP_API bool cvrf_relationship_set_product_name(struct cvrf_relationship *relation, struct cvrf_product_name *name);
1235
1236/************************************************************************************************
1237 * @struct cvrf_branch
1238 * Establishes hierarchy and relationships between different CPEs, products, and packages
1239 * Can only have one type of child element: a FullProductName or more Branches
1240 *
1241 * PARENT NODE: ProductTree or Branch
1242 * REQUIRED: Name attribute [max: 1], Type attribute [max: 1], EITHER FullProductName element [max: 1] OR
1243 * child Branch elements [min: 1, max: unbounded]
1244 */
1245struct cvrf_branch;
1246
1252OSCAP_API struct cvrf_branch *cvrf_branch_new(void);
1253
1259OSCAP_API void cvrf_branch_free(struct cvrf_branch *branch);
1260
1266OSCAP_API struct cvrf_branch *cvrf_branch_clone(const struct cvrf_branch *branch);
1267
1274OSCAP_API const char *cvrf_branch_get_branch_name(const struct cvrf_branch *branch);
1275
1282OSCAP_API struct cvrf_product_name *cvrf_branch_get_product_name(const struct cvrf_branch *branch);
1283
1290OSCAP_API struct oscap_iterator *cvrf_branch_get_subbranches(struct cvrf_branch *branch);
1291
1298OSCAP_API bool cvrf_branch_set_branch_name(struct cvrf_branch *branch, const char *branch_name);
1299
1306OSCAP_API bool cvrf_branch_set_product_name(struct cvrf_branch *branch, struct cvrf_product_name *name);
1307
1308/************************************************************************************************
1309 *@struct cvrf_product_tree
1310 * Relates information about CPEs, their given ProductIDs, packages and their given ProductIDs through
1311 * Branch and Relationship child elements
1312 *
1313 * PARENT NODE: cvrfdoc
1314 * OPTIONAL: FullProductName element [min: 0, max: unbounded], Branch element [min: 0, max: unbounded],
1315 * Relationship element [min: 0, max: unbounded]
1316 */
1317struct cvrf_product_tree;
1318
1324OSCAP_API struct cvrf_product_tree *cvrf_product_tree_new(void);
1325
1332OSCAP_API void cvrf_product_tree_free(struct cvrf_product_tree *tree);
1333
1339OSCAP_API struct cvrf_product_tree *cvrf_product_tree_clone(const struct cvrf_product_tree *tree);
1340
1350OSCAP_API const char *get_cvrf_product_id_from_cpe(struct cvrf_product_tree *tree, const char *cpe);
1351
1360OSCAP_API int cvrf_product_tree_filter_by_cpe(struct cvrf_product_tree *tree, const char *cpe);
1361
1362/*---------------------------------------------------------------------*\
1363| Iterators of child elements of ProductTree |
1364\*---------------------------------------------------------------------*/
1365
1366OSCAP_API struct oscap_iterator *cvrf_product_tree_get_branches(struct cvrf_product_tree *tree);
1367
1368/*******************************************
1369 * @struct cvrf_product_name_iterator
1370 * Iterator representing all FullProductName elements in the ProductTree
1371 * Contained as a list within the CVRF ProductTree structure
1372 */
1373struct cvrf_product_name_iterator;
1374
1381OSCAP_API bool cvrf_product_tree_add_product_name(struct cvrf_product_tree *tree, struct cvrf_product_name *full_name);
1382
1388OSCAP_API struct cvrf_product_name_iterator *cvrf_product_tree_get_product_names(const struct cvrf_product_tree *tree);
1389
1395OSCAP_API struct cvrf_product_name *cvrf_product_name_iterator_next(struct cvrf_product_name_iterator *it);
1396
1402OSCAP_API bool cvrf_product_name_iterator_has_more(struct cvrf_product_name_iterator *it);
1403
1409OSCAP_API void cvrf_product_name_iterator_free(struct cvrf_product_name_iterator *it);
1410
1416OSCAP_API void cvrf_product_name_iterator_reset(struct cvrf_product_name_iterator *it);
1417
1423OSCAP_API void cvrf_product_name_iterator_remove(struct cvrf_product_name_iterator *it);
1424
1425/*******************************************
1426 * @struct cvrf_relationship_iterator
1427 * Iterator representing all Relationship elements in the ProductTree
1428 * Contained as a list within the CVRF Relationship structure
1429 */
1430struct cvrf_relationship_iterator;
1431
1438OSCAP_API bool cvrf_product_tree_add_relationship(struct cvrf_product_tree *tree, struct cvrf_relationship *relation);
1439
1445OSCAP_API struct cvrf_relationship_iterator *cvrf_product_tree_get_relationships(const struct cvrf_product_tree *tree);
1446
1452OSCAP_API struct cvrf_relationship *cvrf_relationship_iterator_next(struct cvrf_relationship_iterator *it);
1453
1459OSCAP_API bool cvrf_relationship_iterator_has_more(struct cvrf_relationship_iterator *it);
1460
1466OSCAP_API void cvrf_relationship_iterator_free(struct cvrf_relationship_iterator *it);
1467
1473OSCAP_API void cvrf_relationship_iterator_reset(struct cvrf_relationship_iterator *it);
1474
1480OSCAP_API void cvrf_relationship_iterator_remove(struct cvrf_relationship_iterator *it);
1481
1482
1483/*******************************************
1484 * @struct cvrf_group_iterator
1485 * Iterator representing all Group elements in the ProductTree
1486 * Contained as a list within the CVRF ProductTree structure
1487 */
1488struct cvrf_group_iterator;
1489
1496OSCAP_API bool cvrf_product_tree_add_group(struct cvrf_product_tree *tree, struct cvrf_group *group);
1497
1503OSCAP_API struct cvrf_group_iterator *cvrf_product_tree_get_product_groups(const struct cvrf_product_tree *tree);
1504
1510OSCAP_API struct cvrf_group *cvrf_group_iterator_next(struct cvrf_group_iterator *it);
1511
1517OSCAP_API bool cvrf_group_iterator_has_more(struct cvrf_group_iterator *it);
1518
1524OSCAP_API void cvrf_group_iterator_free(struct cvrf_group_iterator *it);
1525
1531OSCAP_API void cvrf_group_iterator_reset(struct cvrf_group_iterator *it);
1532
1538OSCAP_API void cvrf_group_iterator_remove(struct cvrf_group_iterator *it);
1539
1540
1541/************************************************************************************************
1542 * @struct cvrf_acknowledgment
1543 * Metadata giving recognition of external parties who provided information, suggestions, or
1544 * other contributions
1545 *
1546 * PARENT NODE: Acknowledgments container (in cvrfdoc or in Vulnerability)
1547 * OPTIONAL: Name element(s) [min: 0, max: unbounded], Organization(s) element [min: 0, max: unbounded],
1548 * Description element [min: 0, max: 1], URL element(s) [min: 0, max: unbounded]
1549 */
1550struct cvrf_acknowledgment;
1551
1557OSCAP_API struct cvrf_acknowledgment *cvrf_acknowledgment_new(void);
1558
1564OSCAP_API void cvrf_acknowledgment_free(struct cvrf_acknowledgment *ack);
1565
1571OSCAP_API struct cvrf_acknowledgment *cvrf_acknowledgment_clone(const struct cvrf_acknowledgment *ack);
1572
1579OSCAP_API const char *cvrf_acknowledgment_get_description(const struct cvrf_acknowledgment *ack);
1580
1587OSCAP_API bool cvrf_acknowledgment_set_description(struct cvrf_acknowledgment *ack, const char *description);
1588
1595OSCAP_API struct oscap_string_iterator *cvrf_acknowledgment_get_names(const struct cvrf_acknowledgment *ack);
1596
1603OSCAP_API struct oscap_string_iterator *cvrf_acknowledgment_get_organizations(const struct cvrf_acknowledgment *ack);
1604
1611OSCAP_API struct oscap_string_iterator *cvrf_acknowledgment_get_urls(const struct cvrf_acknowledgment *ack);
1612
1613/************************************************************************************************
1614 * @struct cvrf_note
1615 *
1616 * PARENT NODE: DocumentNotes container or Notes container
1617 * REQUIRED: Type attribute [min: 1, max: 1], Ordinal attribute [min: 1, max: 1],
1618 * OPTIONAL: Audience attribute [min: 0, max: 1], Title attribute [min: 0, max: 1]
1619 */
1620struct cvrf_note;
1621
1627OSCAP_API struct cvrf_note *cvrf_note_new(void);
1628
1634OSCAP_API void cvrf_note_free(struct cvrf_note *note);
1635
1641OSCAP_API struct cvrf_note *cvrf_note_clone(const struct cvrf_note *note);
1642
1649OSCAP_API int cvrf_note_get_ordinal(const struct cvrf_note *note);
1650
1657OSCAP_API const char *cvrf_note_get_audience(const struct cvrf_note *note);
1658
1665OSCAP_API const char *cvrf_note_get_title(const struct cvrf_note *note);
1666
1673OSCAP_API const char *cvrf_note_get_contents(const struct cvrf_note *note);
1674
1681OSCAP_API bool cvrf_note_set_ordinal(struct cvrf_note *note, int ordinal);
1682
1689OSCAP_API bool cvrf_note_set_audience(struct cvrf_note *note, const char *audience);
1690
1697OSCAP_API bool cvrf_note_set_title(struct cvrf_note *note, const char *title);
1698
1705OSCAP_API bool cvrf_note_set_contents(struct cvrf_note *note, const char *contents);
1706
1707
1708/************************************************************************************************
1709 * @struct cvrf_revision
1710 * Metadata for tracking the changes made to a CVRF document
1711 *
1712 * PARENT NODE: RevisionHistory container (which is a child of DocumentTracking)
1713 * REQUIRED: Number element [min: 1, max: 1], Date element [min: 1, max: 1],
1714 * Description element [min: 1, max: 1]
1715 */
1716struct cvrf_revision;
1717
1723OSCAP_API struct cvrf_revision *cvrf_revision_new(void);
1724
1730OSCAP_API void cvrf_revision_free(struct cvrf_revision *revision);
1731
1737OSCAP_API struct cvrf_revision *cvrf_revision_clone(const struct cvrf_revision *revision);
1738
1745OSCAP_API const char *cvrf_revision_get_number(const struct cvrf_revision *revision);
1746
1753OSCAP_API const char *cvrf_revision_get_date(const struct cvrf_revision *revision);
1754
1761OSCAP_API const char *cvrf_revision_get_description(const struct cvrf_revision *revision);
1762
1769OSCAP_API bool cvrf_revision_set_number(struct cvrf_revision *revision, const char *number);
1770
1777OSCAP_API bool cvrf_revision_set_date(struct cvrf_revision *revision, const char *date);
1778
1785OSCAP_API bool cvrf_revision_set_description(struct cvrf_revision *revision, const char *description);
1786
1787/************************************************************************************************
1788 * @struct cvrf_doc_tracking
1789 * Metadata for referencing origin, changes, release dates, IDs, and other information about
1790 * the document
1791 *
1792 * PARENT NODE: cvrfdoc
1793 * REQUIRED: Identification container [max: 1] { ID element [max: 1], Alias [min: 0, max: unbounded] },
1794 * Status element [max: 1], Version element [max: 1], RevisionHistory container [max: 1],
1795 * InitialReleaseDate [max: 1], CurrentReleaseDate [max: 1],
1796 * Generator container [max: 1] { Engine [min: 0, max: 1], Date [min: 0, max: 1] }
1797 */
1798struct cvrf_doc_tracking;
1799
1805OSCAP_API struct cvrf_doc_tracking *cvrf_doc_tracking_new(void);
1806
1812OSCAP_API void cvrf_doc_tracking_free(struct cvrf_doc_tracking *tracking);
1813
1819OSCAP_API struct cvrf_doc_tracking *cvrf_doc_tracking_clone(const struct cvrf_doc_tracking *tracking);
1820
1827OSCAP_API const char *cvrf_doc_tracking_get_tracking_id(const struct cvrf_doc_tracking *tracking);
1828
1835OSCAP_API struct oscap_string_iterator *cvrf_doc_tracking_get_aliases(struct cvrf_doc_tracking *tracking);
1836
1843OSCAP_API const char *cvrf_doc_tracking_get_version(const struct cvrf_doc_tracking *tracking);
1844
1851OSCAP_API const char *cvrf_doc_tracking_get_init_release_date(const struct cvrf_doc_tracking *tracking);
1852
1859OSCAP_API const char *cvrf_doc_tracking_get_cur_release_date(const struct cvrf_doc_tracking *tracking);
1860
1867OSCAP_API const char *cvrf_doc_tracking_get_generator_engine(const struct cvrf_doc_tracking *tracking);
1868
1875OSCAP_API const char *cvrf_doc_tracking_get_generator_date(const struct cvrf_doc_tracking *tracking);
1876
1883OSCAP_API bool cvrf_doc_tracking_set_tracking_id(struct cvrf_doc_tracking *tracking, const char *id);
1884
1891OSCAP_API bool cvrf_doc_tracking_set_version(struct cvrf_doc_tracking *tracking, const char *version);
1892
1899OSCAP_API bool cvrf_doc_tracking_set_init_release_date(struct cvrf_doc_tracking *tracking, const char *init_release_date);
1900
1907OSCAP_API bool cvrf_doc_tracking_set_cur_release_date(struct cvrf_doc_tracking *tracking, const char *cur_release_date);
1908
1915OSCAP_API bool cvrf_doc_tracking_set_generator_engine(struct cvrf_doc_tracking *tracking, const char *generator_engine);
1916
1923OSCAP_API bool cvrf_doc_tracking_set_generator_date(struct cvrf_doc_tracking *tracking, const char *generator_date);
1924
1925
1926/*******************************************
1927 * @struct cvrf_revision_iterator
1928 * Iterator representing all Revision elements in the RevisionHistory container
1929 * Contained as a list within the CVRF DocumentTracking structure
1930 */
1931struct cvrf_revision_iterator;
1932
1939OSCAP_API bool cvrf_doc_tracking_add_revision(struct cvrf_doc_tracking *tracking, struct cvrf_revision *revision);
1940
1946OSCAP_API struct cvrf_revision_iterator *cvrf_doc_tracking_get_revision_history(const struct cvrf_doc_tracking *tracking);
1947
1953OSCAP_API struct cvrf_revision *cvrf_revision_iterator_next(struct cvrf_revision_iterator *it);
1954
1960OSCAP_API bool cvrf_revision_iterator_has_more(struct cvrf_revision_iterator *it);
1961
1967OSCAP_API void cvrf_revision_iterator_free(struct cvrf_revision_iterator *it);
1968
1974OSCAP_API void cvrf_revision_iterator_reset(struct cvrf_revision_iterator *it);
1975
1981OSCAP_API void cvrf_revision_iterator_remove(struct cvrf_revision_iterator *it);
1982
1983
1984/************************************************************************************************
1985 * @struct cvrf_doc_publisher
1986 * Metadata about the publisher of the CVRF document
1987 *
1988 * PARENT NODE: cvrfdoc
1989 * REQUIRED: Type attribute [max: 1]
1990 * OPTIONAL: VendorID attribute [min: 0, max: 1], ContactDetails element [min: 0, max: 1],
1991 * IssuingAuthority element [min: 0, max: 1]
1992 */
1993struct cvrf_doc_publisher;
1994
2000OSCAP_API struct cvrf_doc_publisher *cvrf_doc_publisher_new(void);
2001
2007OSCAP_API void cvrf_doc_publisher_free(struct cvrf_doc_publisher *publisher);
2008
2014OSCAP_API struct cvrf_doc_publisher *cvrf_doc_publisher_clone(const struct cvrf_doc_publisher *publisher);
2015
2022OSCAP_API const char *cvrf_doc_publisher_get_vendor_id(const struct cvrf_doc_publisher *publisher);
2023
2030OSCAP_API const char *cvrf_doc_publisher_get_contact_details(const struct cvrf_doc_publisher *publisher);
2031
2038OSCAP_API const char *cvrf_doc_publisher_get_issuing_authority(const struct cvrf_doc_publisher *publisher);
2039
2046OSCAP_API bool cvrf_doc_publisher_set_vendor_id(struct cvrf_doc_publisher *publisher, const char *vendor_id);
2047
2054OSCAP_API bool cvrf_doc_publisher_set_contact_details(struct cvrf_doc_publisher *publisher, const char *contact_details);
2055
2062OSCAP_API bool cvrf_doc_publisher_set_issuing_authority(struct cvrf_doc_publisher *publisher, const char *issuing_authority);
2063
2064/************************************************************************************************
2065 * @struct cvrf_reference
2066 * Refers to resources and information outside of the CVRF document itself
2067 *
2068 * PARENT NODE: DocumentReferences container (child of cvrfdoc) or References container (child of Vulnerability)
2069 * REQUIRED: Type attribute [max: 1], URL element [max: 1], Description element [max: 1]
2070 */
2071struct cvrf_reference;
2072
2078OSCAP_API struct cvrf_reference *cvrf_reference_new(void);
2079
2085OSCAP_API void cvrf_reference_free(struct cvrf_reference *reference);
2086
2092OSCAP_API struct cvrf_reference *cvrf_reference_clone(const struct cvrf_reference *ref);
2093
2100OSCAP_API const char *cvrf_reference_get_url(const struct cvrf_reference *reference);
2101
2108OSCAP_API const char *cvrf_reference_get_description(const struct cvrf_reference *reference);
2109
2116OSCAP_API bool cvrf_reference_set_url(struct cvrf_reference *reference, const char *url);
2117
2124OSCAP_API bool cvrf_reference_set_description(struct cvrf_reference *reference, const char *description);
2125
2126/************************************************************************************************
2127 * @struct cvrf_document
2128 *
2129 */
2130struct cvrf_document;
2131
2137OSCAP_API struct cvrf_document *cvrf_document_new(void);
2138
2145OSCAP_API void cvrf_document_free(struct cvrf_document *doc);
2146
2152OSCAP_API struct cvrf_document *cvrf_document_clone(const struct cvrf_document *doc);
2153
2160OSCAP_API const char *cvrf_document_get_doc_distribution(const struct cvrf_document *doc);
2161
2168OSCAP_API const char *cvrf_document_get_aggregate_severity(const struct cvrf_document *doc);
2169
2176OSCAP_API const char *cvrf_document_get_namespace(const struct cvrf_document *doc);
2177
2185
2193
2200OSCAP_API struct oscap_iterator *cvrf_document_get_notes(struct cvrf_document *doc);
2201
2208OSCAP_API struct oscap_iterator *cvrf_document_get_references(struct cvrf_document *doc);
2209
2216OSCAP_API struct oscap_iterator *cvrf_document_get_acknowledgments(struct cvrf_document *doc);
2217
2224OSCAP_API bool cvrf_document_set_doc_distribution(struct cvrf_document *doc, const char *distribution);
2225
2232OSCAP_API bool cvrf_document_set_aggregate_severity(struct cvrf_document *doc, const char *severity);
2233
2240OSCAP_API bool cvrf_document_set_namespace(struct cvrf_document *doc, const char *ns);
2241
2248OSCAP_API bool cvrf_document_set_publisher(struct cvrf_document *doc, struct cvrf_doc_publisher *publisher);
2249
2256OSCAP_API bool cvrf_document_set_tracking(struct cvrf_document *doc, struct cvrf_doc_tracking *track);
2257
2258/************************************************************************************************
2259 * @struct cvrf_model
2260 * Top level structure; organizationally divided into 3 components: Document, ProductTree, and
2261 * Vulnerability offshoots. This structure contains all information provided by a CVRF file.
2262 *
2263 * REQUIRED: DocumentTitle element [max: 1], DocumentType element [max: 1]
2264 * OPTIONAL: ProductTree element [min: 0, max: 1], Vulnerability [min: 0, max: unbounded]
2265 */
2266struct cvrf_model;
2267
2273OSCAP_API struct cvrf_model *cvrf_model_new(void);
2274
2280OSCAP_API void cvrf_model_free(struct cvrf_model *cvrf);
2281
2287OSCAP_API struct cvrf_model *cvrf_model_clone(const struct cvrf_model *model);
2288
2297OSCAP_API int cvrf_model_filter_by_cpe(struct cvrf_model *model, const char *cpe);
2298
2305OSCAP_API const char *cvrf_model_get_doc_title(const struct cvrf_model *model);
2306
2313OSCAP_API const char *cvrf_model_get_doc_type(const struct cvrf_model *model);
2314
2321OSCAP_API bool cvrf_model_set_doc_title(struct cvrf_model *model, const char *doc_title);
2322
2329OSCAP_API bool cvrf_model_set_doc_type(struct cvrf_model *model, const char *doc_type);
2330
2337OSCAP_API struct cvrf_product_tree *cvrf_model_get_product_tree(struct cvrf_model *model);
2338
2346OSCAP_API struct cvrf_document *cvrf_model_get_document(const struct cvrf_model *model);
2347
2353OSCAP_API const char *cvrf_model_get_identification(struct cvrf_model *model);
2354
2361OSCAP_API bool cvrf_model_set_document(struct cvrf_model *model, struct cvrf_document *doc);
2362
2363/*******************************************
2364 * @struct cvrf_vulnerability_iterator
2365 * Iterator representing all Vulnerabilities in the document
2366 * Contained as a list within the CVRF Model structure
2367 */
2368struct cvrf_vulnerability_iterator;
2369
2375OSCAP_API struct cvrf_vulnerability_iterator *cvrf_model_get_vulnerabilities(const struct cvrf_model *model);
2376
2383OSCAP_API bool cvrf_model_add_vulnerability(struct cvrf_model *model, struct cvrf_vulnerability *vuln);
2384
2390OSCAP_API struct cvrf_vulnerability *cvrf_vulnerability_iterator_next(struct cvrf_vulnerability_iterator *it);
2391
2397OSCAP_API bool cvrf_vulnerability_iterator_has_more(struct cvrf_vulnerability_iterator *it);
2398
2404OSCAP_API void cvrf_vulnerability_iterator_free(struct cvrf_vulnerability_iterator *it);
2405
2411OSCAP_API void cvrf_vulnerability_iterator_reset(struct cvrf_vulnerability_iterator *it);
2412
2418OSCAP_API void cvrf_vulnerability_iterator_remove(struct cvrf_vulnerability_iterator *it);
2419
2420
2421/************************************************************************************************
2422 * @struct cvrf_index
2423 * Represents an index of a CVRF feed or directory
2424 * Maintains a list of all CVRF files in the form of cvrf_model structures
2425 */
2426struct cvrf_index;
2427
2433OSCAP_API struct cvrf_index *cvrf_index_new(void);
2434
2440OSCAP_API void cvrf_index_free(struct cvrf_index *index);
2441
2447OSCAP_API struct cvrf_index *cvrf_index_clone(const struct cvrf_index *index);
2448
2455OSCAP_API const char *cvrf_index_get_source_url(const struct cvrf_index *index);
2456
2463OSCAP_API const char *cvrf_index_get_index_file(const struct cvrf_index *index);
2464
2471OSCAP_API bool cvrf_index_set_source_url(struct cvrf_index *index, const char *url);
2472
2479OSCAP_API bool cvrf_index_set_index_file(struct cvrf_index *index, const char *index_file);
2480
2481/*******************************************
2482 * @struct cvrf_model_iterator
2483 * Iterator representing all CVRF files from an index, feed, or stream
2484 * Contained as a list within the CVRF Index structure
2485 */
2486struct cvrf_model_iterator;
2487
2494OSCAP_API bool cvrf_index_add_model(struct cvrf_index *index, struct cvrf_model *model);
2495
2501OSCAP_API struct cvrf_model_iterator *cvrf_index_get_models(const struct cvrf_index *index);
2502
2508OSCAP_API struct cvrf_model *cvrf_model_iterator_next(struct cvrf_model_iterator *it);
2509
2515OSCAP_API bool cvrf_model_iterator_has_more(struct cvrf_model_iterator *it);
2516
2522OSCAP_API void cvrf_model_iterator_free(struct cvrf_model_iterator *it);
2523
2529OSCAP_API void cvrf_model_iterator_reset(struct cvrf_model_iterator *it);
2530
2536OSCAP_API void cvrf_model_iterator_remove(struct cvrf_model_iterator *it);
2537
2538
2539/************************************************************************************************
2540 * @struct cvrf_session
2541 * Structure that holds and processes import source and import for CVRF models or indices
2542 * for later use during evaluation. Has OVAL definition structure that is used for
2543 * evaluation
2544 */
2545struct cvrf_session;
2546
2552OSCAP_API struct cvrf_session *cvrf_session_new_from_source_model(struct oscap_source *source);
2553
2559OSCAP_API struct cvrf_session *cvrf_session_new_from_source_index(struct oscap_source *source);
2560
2566OSCAP_API void cvrf_session_free(struct cvrf_session *session);
2567
2573OSCAP_API struct cvrf_model *cvrf_session_get_model(struct cvrf_session *session);
2574
2580OSCAP_API struct cvrf_index *cvrf_session_get_index(const struct cvrf_session *session);
2581
2589OSCAP_API struct oscap_string_iterator *cvrf_session_get_product_ids(struct cvrf_session *session);
2590
2596OSCAP_API const char *cvrf_session_get_os_name(const struct cvrf_session *session);
2597
2604OSCAP_API void cvrf_session_set_model(struct cvrf_session *session, struct cvrf_model *model);
2605
2613OSCAP_API bool cvrf_session_set_index(struct cvrf_session *session, struct cvrf_index *index);
2614
2622OSCAP_API bool cvrf_session_set_os_name(struct cvrf_session *session, const char *os_name);
2623
2624/************************************************************************************************
2625 * @struct cvrf_rpm_attributes
2626 * Stores dissected information about RPM package names from CVRF files- the EVR format and
2627 * package name. These are used to check the vulnerability of the system by comparing the
2628 * EVR in the CVRF file to the EVR on the system
2629 */
2630struct cvrf_rpm_attributes;
2631
2637OSCAP_API struct cvrf_rpm_attributes *cvrf_rpm_attributes_new(void);
2638
2644OSCAP_API void cvrf_rpm_attributes_free(struct cvrf_rpm_attributes *attributes);
2645
2651OSCAP_API const char *cvrf_rpm_attributes_get_full_package_name(const struct cvrf_rpm_attributes *attributes);
2652
2659OSCAP_API const char *cvrf_rpm_attributes_get_rpm_name(const struct cvrf_rpm_attributes *attributes);
2660
2668OSCAP_API const char *cvrf_rpm_attributes_get_evr_format(const struct cvrf_rpm_attributes *attributes);
2669
2676OSCAP_API bool cvrf_rpm_attributes_set_full_package_name(struct cvrf_rpm_attributes *attributes, const char *full_package);
2677
2684OSCAP_API bool cvrf_rpm_attributes_set_rpm_name(struct cvrf_rpm_attributes *attributes, const char *rpm_name);
2685
2692OSCAP_API bool cvrf_rpm_attributes_set_evr_format(struct cvrf_rpm_attributes *attributes, const char *evr_format);
2693
2694
2695/************************************************************************************************/
2696/************************************************************************************************/
2697
2698
2704OSCAP_API const char * cvrf_model_supported(void);
2705
2713OSCAP_API struct cvrf_index *cvrf_index_import(struct oscap_source *index_source);
2714
2721OSCAP_API struct cvrf_model *cvrf_model_import(struct oscap_source *source);
2722
2729OSCAP_API struct oscap_source *cvrf_index_get_export_source(struct cvrf_index *index);
2730
2737OSCAP_API struct oscap_source *cvrf_model_get_export_source(struct cvrf_model *model);
2738
2747OSCAP_API struct oscap_source *cvrf_model_get_results_source(struct oscap_source *import_source, const char *os_name);
2748
2757OSCAP_API struct oscap_source *cvrf_index_get_results_source(struct oscap_source *import_source, const char *os_name);
2758
2759
2762#endif /* _CVRF_H_ */
Interface to Common Vulnerability Scoring System Version 2.
OSCAP_API bool cvrf_score_set_set_impact(struct cvrf_score_set *score_set, struct cvss_impact *impact)
OSCAP_API bool cvrf_model_set_doc_title(struct cvrf_model *model, const char *doc_title)
OSCAP_API const char * cvrf_acknowledgment_get_description(const struct cvrf_acknowledgment *ack)
OSCAP_API struct cvrf_acknowledgment * cvrf_acknowledgment_clone(const struct cvrf_acknowledgment *ack)
Definition: cvrf_priv.c:884
OSCAP_API const char * cvrf_branch_get_branch_name(const struct cvrf_branch *branch)
OSCAP_API bool cvrf_document_set_namespace(struct cvrf_document *doc, const char *ns)
OSCAP_API struct cvrf_session * cvrf_session_new_from_source_model(struct oscap_source *source)
Definition: cvrf_eval.c:88
OSCAP_API const char * cvrf_doc_tracking_get_init_release_date(const struct cvrf_doc_tracking *tracking)
OSCAP_API void cvrf_relationship_free(struct cvrf_relationship *relationship)
Deallocates memory for a Relationship element.
Definition: cvrf_priv.c:663
OSCAP_API void cvrf_doc_tracking_free(struct cvrf_doc_tracking *tracking)
Deallocates memory for a DocumentTracking element.
Definition: cvrf_priv.c:1035
OSCAP_API struct cvrf_product_name * cvrf_product_name_clone(const struct cvrf_product_name *full_name)
Definition: cvrf_priv.c:582
OSCAP_API bool cvrf_relationship_set_product_name(struct cvrf_relationship *relation, struct cvrf_product_name *name)
OSCAP_API bool cvrf_model_set_document(struct cvrf_model *model, struct cvrf_document *doc)
OSCAP_API void cvrf_product_status_free(struct cvrf_product_status *status)
Deallocates memory for a Status element of the ProductStatuses container.
Definition: cvrf_priv.c:297
OSCAP_API struct cvrf_revision_iterator * cvrf_doc_tracking_get_revision_history(const struct cvrf_doc_tracking *tracking)
OSCAP_API bool cvrf_acknowledgment_set_description(struct cvrf_acknowledgment *ack, const char *description)
OSCAP_API 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:813
OSCAP_API const char * cvrf_product_name_get_product_id(const struct cvrf_product_name *full_name)
OSCAP_API struct cvrf_group * cvrf_group_new(void)
New CVRF Group child of ProductGroups container element.
Definition: cvrf_priv.c:604
OSCAP_API struct cvrf_note * cvrf_note_clone(const struct cvrf_note *note)
Definition: cvrf_priv.c:935
OSCAP_API bool cvrf_remediation_set_date(struct cvrf_remediation *remed, const char *date)
OSCAP_API bool cvrf_revision_set_number(struct cvrf_revision *revision, const char *number)
OSCAP_API const char * cvrf_group_get_description(const struct cvrf_group *group)
OSCAP_API bool cvrf_revision_set_date(struct cvrf_revision *revision, const char *date)
OSCAP_API bool cvrf_product_name_set_cpe(struct cvrf_product_name *full_name, const char *cpe)
OSCAP_API struct cvrf_doc_publisher * cvrf_doc_publisher_new(void)
New CVRF DocumentPublisher structure.
Definition: cvrf_priv.c:1082
OSCAP_API 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:194
OSCAP_API struct cvrf_acknowledgment * cvrf_acknowledgment_new(void)
New CVRF Acknowledgment element within Acknowledgments container.
Definition: cvrf_priv.c:861
OSCAP_API struct cvrf_doc_tracking * cvrf_doc_tracking_clone(const struct cvrf_doc_tracking *tracking)
Definition: cvrf_priv.c:1050
OSCAP_API struct cvrf_doc_publisher * cvrf_doc_publisher_clone(const struct cvrf_doc_publisher *publisher)
Definition: cvrf_priv.c:1104
OSCAP_API const char * cvrf_vulnerability_get_system_name(const struct cvrf_vulnerability *vuln)
OSCAP_API bool cvrf_score_set_set_vector(struct cvrf_score_set *score_set, const char *vector)
OSCAP_API struct cvrf_product_status_iterator * cvrf_vulnerability_get_product_statuses(const struct cvrf_vulnerability *vuln)
OSCAP_API bool cvrf_vulnerability_add_threat(struct cvrf_vulnerability *vuln, struct cvrf_threat *threat)
OSCAP_API void cvrf_product_name_free(struct cvrf_product_name *full_name)
Deallocates memory for a FullProductName element.
Definition: cvrf_priv.c:573
OSCAP_API const char * cvrf_product_name_get_cpe(const struct cvrf_product_name *full_name)
OSCAP_API const char * cvrf_remediation_get_entitlement(const struct cvrf_remediation *remed)
OSCAP_API struct cvrf_product_tree * cvrf_product_tree_clone(const struct cvrf_product_tree *tree)
Definition: cvrf_priv.c:793
OSCAP_API bool cvrf_rpm_attributes_set_rpm_name(struct cvrf_rpm_attributes *attributes, const char *rpm_name)
OSCAP_API const char * cvrf_group_get_group_id(const struct cvrf_group *group)
OSCAP_API struct cvrf_reference * cvrf_reference_new(void)
New CVRF Reference structure.
Definition: cvrf_priv.c:1130
OSCAP_API const char * cvrf_vulnerability_get_discovery_date(const struct cvrf_vulnerability *vuln)
OSCAP_API 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
OSCAP_API struct cvrf_model * cvrf_model_new(void)
New CVRF model.
Definition: cvrf_priv.c:1260
OSCAP_API bool cvrf_vulnerability_set_ordinal(struct cvrf_vulnerability *vuln, int ordinal)
OSCAP_API void cvrf_rpm_attributes_free(struct cvrf_rpm_attributes *attributes)
Deallocate memory for the CVRF RPM attributes structure.
Definition: cvrf_eval.c:155
OSCAP_API struct cvrf_group_iterator * cvrf_product_tree_get_product_groups(const struct cvrf_product_tree *tree)
OSCAP_API struct cvrf_involvement_iterator * cvrf_vulnerability_get_involvements(const struct cvrf_vulnerability *vuln)
OSCAP_API struct cvrf_involvement * cvrf_involvement_new(void)
New CVRF Involvement.
Definition: cvrf_priv.c:331
OSCAP_API bool cvrf_note_set_title(struct cvrf_note *note, const char *title)
OSCAP_API const char * cvrf_threat_get_date(const struct cvrf_threat *threat)
OSCAP_API struct cvrf_vulnerability_cwe * cvrf_vulnerability_cwe_clone(const struct cvrf_vulnerability_cwe *cwe)
Definition: cvrf_priv.c:388
OSCAP_API void cvrf_revision_free(struct cvrf_revision *revision)
Deallocates memory for a Revision element of the RevisionHistory container.
Definition: cvrf_priv.c:969
OSCAP_API const char * cvrf_vulnerability_cwe_get_cwe(const struct cvrf_vulnerability_cwe *vuln_cwe)
OSCAP_API bool cvrf_doc_tracking_set_cur_release_date(struct cvrf_doc_tracking *tracking, const char *cur_release_date)
OSCAP_API 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.
OSCAP_API void cvrf_document_free(struct cvrf_document *doc)
Deallocates memory for the CVRF Document structure and all its child DocumentTracking,...
Definition: cvrf_priv.c:1206
OSCAP_API struct cvrf_doc_tracking * cvrf_document_get_tracking(const struct cvrf_document *doc)
OSCAP_API struct cvrf_product_name * cvrf_branch_get_product_name(const struct cvrf_branch *branch)
OSCAP_API struct cvrf_remediation_iterator * cvrf_vulnerability_get_remediations(const struct cvrf_vulnerability *vuln)
OSCAP_API struct cvrf_product_name * cvrf_relationship_get_product_name(const struct cvrf_relationship *relation)
OSCAP_API struct cvrf_product_status * cvrf_product_status_new(void)
New Status member of a ProductStatuses container within a Vulnerability element.
Definition: cvrf_priv.c:287
OSCAP_API bool cvrf_product_tree_add_product_name(struct cvrf_product_tree *tree, struct cvrf_product_name *full_name)
OSCAP_API const char * cvrf_session_get_os_name(const struct cvrf_session *session)
OSCAP_API void cvrf_note_free(struct cvrf_note *note)
Deallocates memory for a Note element of the Notes container.
Definition: cvrf_priv.c:925
OSCAP_API const char * cvrf_doc_tracking_get_version(const struct cvrf_doc_tracking *tracking)
OSCAP_API const char * cvrf_vulnerability_get_system_id(const struct cvrf_vulnerability *vuln)
OSCAP_API bool cvrf_reference_set_description(struct cvrf_reference *reference, const char *description)
OSCAP_API struct cvrf_relationship_iterator * cvrf_product_tree_get_relationships(const struct cvrf_product_tree *tree)
OSCAP_API bool cvrf_doc_publisher_set_issuing_authority(struct cvrf_doc_publisher *publisher, const char *issuing_authority)
OSCAP_API bool cvrf_vulnerability_cwe_set_id(struct cvrf_vulnerability_cwe *vuln_cwe, const char *id)
OSCAP_API bool cvrf_session_set_index(struct cvrf_session *session, struct cvrf_index *index)
Add the CVRF index to be evaluated to the Session structure.
OSCAP_API bool cvrf_model_set_doc_type(struct cvrf_model *model, const char *doc_type)
OSCAP_API bool cvrf_rpm_attributes_set_full_package_name(struct cvrf_rpm_attributes *attributes, const char *full_package)
OSCAP_API struct cvrf_product_name_iterator * cvrf_product_tree_get_product_names(const struct cvrf_product_tree *tree)
OSCAP_API bool cvrf_document_set_publisher(struct cvrf_document *doc, struct cvrf_doc_publisher *publisher)
OSCAP_API bool cvrf_product_tree_add_relationship(struct cvrf_product_tree *tree, struct cvrf_relationship *relation)
OSCAP_API const char * cvrf_relationship_get_relates_to_ref(const struct cvrf_relationship *relation)
OSCAP_API bool cvrf_vulnerability_add_cwe(struct cvrf_vulnerability *vuln, struct cvrf_vulnerability_cwe *vulnerability_cwe)
OSCAP_API const char * cvrf_revision_get_description(const struct cvrf_revision *revision)
OSCAP_API struct cvrf_document * cvrf_model_get_document(const struct cvrf_model *model)
OSCAP_API bool cvrf_note_set_ordinal(struct cvrf_note *note, int ordinal)
OSCAP_API bool cvrf_doc_tracking_set_generator_date(struct cvrf_doc_tracking *tracking, const char *generator_date)
OSCAP_API struct cvrf_vulnerability_iterator * cvrf_model_get_vulnerabilities(const struct cvrf_model *model)
OSCAP_API void cvrf_doc_publisher_free(struct cvrf_doc_publisher *publisher)
Deallocates memory for a DocumentPublisher element.
Definition: cvrf_priv.c:1094
OSCAP_API struct cvrf_vulnerability_cwe_iterator * cvrf_vulnerability_get_cwes(const struct cvrf_vulnerability *vuln)
OSCAP_API void cvrf_product_tree_free(struct cvrf_product_tree *tree)
Deallocates memory for a ProductTree element and all its child Branches, Relationships,...
Definition: cvrf_priv.c:782
OSCAP_API bool cvrf_remediation_set_entitlement(struct cvrf_remediation *remed, const char *entitlement)
OSCAP_API bool cvrf_doc_tracking_set_init_release_date(struct cvrf_doc_tracking *tracking, const char *init_release_date)
OSCAP_API struct cvrf_rpm_attributes * cvrf_rpm_attributes_new(void)
Create a new CVRF RPM attributes structure.
Definition: cvrf_eval.c:144
OSCAP_API struct cvrf_involvement * cvrf_involvement_clone(const struct cvrf_involvement *involve)
Definition: cvrf_priv.c:350
OSCAP_API bool cvrf_vulnerability_add_score_set(struct cvrf_vulnerability *vuln, struct cvrf_score_set *score_set)
OSCAP_API void cvrf_branch_free(struct cvrf_branch *branch)
Deallocates memory for a Branch element.
Definition: cvrf_priv.c:714
OSCAP_API bool cvrf_index_add_model(struct cvrf_index *index, struct cvrf_model *model)
OSCAP_API struct cvrf_threat * cvrf_threat_new(void)
New CVRF Threat element.
Definition: cvrf_priv.c:236
OSCAP_API struct cvrf_index * cvrf_index_new(void)
New index structure holding all CVRF models.
Definition: cvrf_priv.c:1322
OSCAP_API 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
OSCAP_API const char * cvrf_remediation_get_description(const struct cvrf_remediation *remed)
OSCAP_API struct cvrf_score_set * cvrf_score_set_clone(const struct cvrf_score_set *score_set)
Definition: cvrf_priv.c:204
OSCAP_API const char * cvrf_vulnerability_cwe_get_id(const struct cvrf_vulnerability_cwe *vuln_cwe)
OSCAP_API bool cvrf_vulnerability_set_cve_id(struct cvrf_vulnerability *vuln, const char *cve_id)
OSCAP_API 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:1295
OSCAP_API 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:1333
OSCAP_API bool cvrf_vulnerability_set_release_date(struct cvrf_vulnerability *vuln, const char *release_date)
OSCAP_API bool cvrf_vulnerability_add_cvrf_product_status(struct cvrf_vulnerability *vuln, struct cvrf_product_status *stat)
OSCAP_API bool cvrf_doc_tracking_set_generator_engine(struct cvrf_doc_tracking *tracking, const char *generator_engine)
OSCAP_API 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.
OSCAP_API const char * cvrf_revision_get_number(const struct cvrf_revision *revision)
OSCAP_API bool cvrf_note_set_contents(struct cvrf_note *note, const char *contents)
OSCAP_API struct cvrf_branch * cvrf_branch_clone(const struct cvrf_branch *branch)
Definition: cvrf_priv.c:724
OSCAP_API bool cvrf_threat_set_date(struct cvrf_threat *threat, const char *date)
OSCAP_API const char * cvrf_vulnerability_get_release_date(const struct cvrf_vulnerability *vuln)
OSCAP_API bool cvrf_doc_tracking_set_version(struct cvrf_doc_tracking *tracking, const char *version)
OSCAP_API const char * cvrf_doc_tracking_get_cur_release_date(const struct cvrf_doc_tracking *tracking)
OSCAP_API const char * cvrf_doc_tracking_get_generator_date(const struct cvrf_doc_tracking *tracking)
OSCAP_API struct cvrf_vulnerability * cvrf_vulnerability_new(void)
New CVRF Vulnerability.
Definition: cvrf_priv.c:451
OSCAP_API const char * cvrf_remediation_get_url(const struct cvrf_remediation *remed)
OSCAP_API void cvrf_group_free(struct cvrf_group *group)
Deallocates memory for a Group element.
Definition: cvrf_priv.c:615
OSCAP_API struct cvrf_document * cvrf_document_new(void)
New CVRF Document structure.
Definition: cvrf_priv.c:1190
OSCAP_API const char * cvrf_index_get_source_url(const struct cvrf_index *index)
OSCAP_API struct cvrf_remediation * cvrf_remediation_new(void)
New CVRF Remediation.
Definition: cvrf_priv.c:89
OSCAP_API bool cvrf_remediation_set_url(struct cvrf_remediation *remed, const char *url)
OSCAP_API void cvrf_threat_free(struct cvrf_threat *threat)
Deallocates memory for a Threat element of the Threats container.
Definition: cvrf_priv.c:250
OSCAP_API const char * cvrf_doc_publisher_get_issuing_authority(const struct cvrf_doc_publisher *publisher)
OSCAP_API bool cvrf_vulnerability_set_title(struct cvrf_vulnerability *vuln, const char *vulnerability_title)
OSCAP_API bool cvrf_doc_tracking_add_revision(struct cvrf_doc_tracking *tracking, struct cvrf_revision *revision)
OSCAP_API struct cvrf_doc_tracking * cvrf_doc_tracking_new(void)
New CVRF DocumentTracking structure.
Definition: cvrf_priv.c:1018
OSCAP_API void cvrf_vulnerability_cwe_free(struct cvrf_vulnerability_cwe *cwe)
Deallocates memory for a CWE element.
Definition: cvrf_priv.c:379
OSCAP_API bool cvrf_vulnerability_set_discovery_date(struct cvrf_vulnerability *vuln, const char *discovery_date)
OSCAP_API bool cvrf_threat_set_description(struct cvrf_threat *threat, const char *description)
OSCAP_API bool cvrf_vulnerability_set_system_name(struct cvrf_vulnerability *vuln, const char *sys_name)
OSCAP_API int cvrf_vulnerability_filter_by_product(struct cvrf_vulnerability *vuln, const char *prod)
Definition: cvrf_priv.c:517
OSCAP_API void cvrf_reference_free(struct cvrf_reference *reference)
Deallocates memory for a Reference element of the References container.
Definition: cvrf_priv.c:1142
OSCAP_API struct cvrf_model * cvrf_model_clone(const struct cvrf_model *model)
Definition: cvrf_priv.c:1285
OSCAP_API struct cvrf_score_set * cvrf_score_set_new(void)
New ScoreSet member of a CVSSScoreSets container within a Vulnerability element.
Definition: cvrf_priv.c:183
OSCAP_API struct cvrf_relationship * cvrf_relationship_new(void)
New CVRF Relationship element within ProductTree.
Definition: cvrf_priv.c:650
OSCAP_API bool cvrf_doc_publisher_set_contact_details(struct cvrf_doc_publisher *publisher, const char *contact_details)
OSCAP_API bool cvrf_doc_tracking_set_tracking_id(struct cvrf_doc_tracking *tracking, const char *id)
OSCAP_API bool cvrf_document_set_tracking(struct cvrf_document *doc, struct cvrf_doc_tracking *track)
OSCAP_API bool cvrf_document_set_aggregate_severity(struct cvrf_document *doc, const char *severity)
OSCAP_API struct cvrf_branch * cvrf_branch_new(void)
New CVRF branch of ProductTree or sub-branch.
Definition: cvrf_priv.c:702
OSCAP_API void cvrf_model_free(struct cvrf_model *cvrf)
Deallocates memory for the CVRF Model structure and all its child elements.
Definition: cvrf_priv.c:1273
OSCAP_API void cvrf_involvement_free(struct cvrf_involvement *involve)
Deallocates memory for an Involvement element.
Definition: cvrf_priv.c:342
OSCAP_API bool cvrf_involvement_set_description(struct cvrf_involvement *involve, const char *description)
OSCAP_API bool cvrf_rpm_attributes_set_evr_format(struct cvrf_rpm_attributes *attributes, const char *evr_format)
OSCAP_API bool cvrf_revision_set_description(struct cvrf_revision *revision, const char *description)
OSCAP_API bool cvrf_reference_set_url(struct cvrf_reference *reference, const char *url)
OSCAP_API bool cvrf_doc_publisher_set_vendor_id(struct cvrf_doc_publisher *publisher, const char *vendor_id)
OSCAP_API const char * cvrf_doc_publisher_get_contact_details(const struct cvrf_doc_publisher *publisher)
OSCAP_API struct cvrf_vulnerability * cvrf_vulnerability_clone(const struct cvrf_vulnerability *vuln)
Definition: cvrf_priv.c:497
OSCAP_API bool cvrf_group_set_description(struct cvrf_group *group, const char *description)
OSCAP_API const char * cvrf_reference_get_description(const struct cvrf_reference *reference)
OSCAP_API struct cvrf_threat * cvrf_threat_clone(const struct cvrf_threat *threat)
Definition: cvrf_priv.c:261
OSCAP_API const char * cvrf_note_get_contents(const struct cvrf_note *note)
OSCAP_API const char * cvrf_rpm_attributes_get_full_package_name(const struct cvrf_rpm_attributes *attributes)
OSCAP_API struct cvrf_score_set_iterator * cvrf_vulnerability_get_score_sets(const struct cvrf_vulnerability *vuln)
OSCAP_API int cvrf_vulnerability_get_ordinal(const struct cvrf_vulnerability *vuln)
OSCAP_API struct cvrf_revision * cvrf_revision_clone(const struct cvrf_revision *revision)
Definition: cvrf_priv.c:979
OSCAP_API void cvrf_vulnerability_free(struct cvrf_vulnerability *vulnerability)
Deallocates memory for a Vulnerability element.
Definition: cvrf_priv.c:475
OSCAP_API const char * cvrf_vulnerability_get_cve_id(const struct cvrf_vulnerability *vuln)
OSCAP_API bool cvrf_relationship_set_relates_to_ref(struct cvrf_relationship *relation, const char *relates_to_ref)
OSCAP_API bool cvrf_vulnerability_add_involvement(struct cvrf_vulnerability *vuln, struct cvrf_involvement *involvement)
OSCAP_API 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:802
OSCAP_API struct cvrf_note * cvrf_note_new(void)
New CVRF Note element within Notes or DocumentNotes container.
Definition: cvrf_priv.c:912
OSCAP_API struct cvrf_revision * cvrf_revision_new(void)
New CVRF Revision structure.
Definition: cvrf_priv.c:958
OSCAP_API struct cvss_impact * cvrf_score_set_get_impact(const struct cvrf_score_set *score_set)
OSCAP_API bool cvrf_branch_set_product_name(struct cvrf_branch *branch, struct cvrf_product_name *name)
OSCAP_API bool cvrf_branch_set_branch_name(struct cvrf_branch *branch, const char *branch_name)
OSCAP_API struct cvrf_reference * cvrf_reference_clone(const struct cvrf_reference *ref)
Definition: cvrf_priv.c:1151
OSCAP_API const char * cvrf_relationship_get_product_reference(const struct cvrf_relationship *relation)
OSCAP_API const char * cvrf_reference_get_url(const struct cvrf_reference *reference)
OSCAP_API bool cvrf_note_set_audience(struct cvrf_note *note, const char *audience)
OSCAP_API bool cvrf_vulnerability_cwe_set_cwe(struct cvrf_vulnerability_cwe *vuln_cwe, const char *cwe)
OSCAP_API const char * cvrf_score_set_get_vector(const struct cvrf_score_set *score_set)
OSCAP_API bool cvrf_remediation_set_description(struct cvrf_remediation *remed, const char *description)
OSCAP_API const char * cvrf_document_get_doc_distribution(const struct cvrf_document *doc)
OSCAP_API bool cvrf_relationship_set_product_reference(struct cvrf_relationship *relation, const char *product_reference)
OSCAP_API struct cvrf_session * cvrf_session_new_from_source_index(struct oscap_source *source)
Definition: cvrf_eval.c:106
OSCAP_API const char * cvrf_note_get_title(const struct cvrf_note *note)
OSCAP_API bool cvrf_group_set_group_id(struct cvrf_group *group, const char *group_id)
OSCAP_API const char * cvrf_model_get_doc_title(const struct cvrf_model *model)
OSCAP_API const char * cvrf_note_get_audience(const struct cvrf_note *note)
OSCAP_API const char * cvrf_doc_tracking_get_generator_engine(const struct cvrf_doc_tracking *tracking)
OSCAP_API struct cvrf_index * cvrf_session_get_index(const struct cvrf_session *session)
OSCAP_API const char * cvrf_involvement_get_description(const struct cvrf_involvement *involve)
OSCAP_API const char * cvrf_document_get_namespace(const struct cvrf_document *doc)
OSCAP_API const char * cvrf_threat_get_description(const struct cvrf_threat *threat)
OSCAP_API const char * cvrf_document_get_aggregate_severity(const struct cvrf_document *doc)
OSCAP_API bool cvrf_product_tree_add_group(struct cvrf_product_tree *tree, struct cvrf_group *group)
OSCAP_API struct cvrf_product_tree * cvrf_product_tree_new(void)
New ProductTree structure.
Definition: cvrf_priv.c:770
OSCAP_API bool cvrf_index_set_index_file(struct cvrf_index *index, const char *index_file)
OSCAP_API const char * cvrf_doc_publisher_get_vendor_id(const struct cvrf_doc_publisher *publisher)
OSCAP_API struct cvrf_relationship * cvrf_relationship_clone(const struct cvrf_relationship *relation)
Definition: cvrf_priv.c:673
OSCAP_API struct cvrf_doc_publisher * cvrf_document_get_publisher(const struct cvrf_document *doc)
OSCAP_API bool cvrf_product_name_set_product_id(struct cvrf_product_name *full_name, const char *product_id)
OSCAP_API void cvrf_acknowledgment_free(struct cvrf_acknowledgment *ack)
Deallocates memory for an Acknowledgment element of the Acknowledgments container.
Definition: cvrf_priv.c:873
OSCAP_API const char * cvrf_model_get_doc_type(const struct cvrf_model *model)
OSCAP_API struct cvrf_document * cvrf_document_clone(const struct cvrf_document *doc)
Definition: cvrf_priv.c:1221
OSCAP_API const char * cvrf_vulnerability_get_title(const struct cvrf_vulnerability *vuln)
OSCAP_API bool cvrf_vulnerability_add_remediation(struct cvrf_vulnerability *vuln, struct cvrf_remediation *remed)
OSCAP_API 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.
OSCAP_API int cvrf_note_get_ordinal(const struct cvrf_note *note)
OSCAP_API bool cvrf_document_set_doc_distribution(struct cvrf_document *doc, const char *distribution)
OSCAP_API bool cvrf_vulnerability_set_system_id(struct cvrf_vulnerability *vuln, const char *id)
OSCAP_API struct cvrf_vulnerability_cwe * cvrf_vulnerability_cwe_new(void)
New CVRF CWE structure.
Definition: cvrf_priv.c:369
OSCAP_API void cvrf_session_free(struct cvrf_session *session)
Deallocates memory for a CVRF Session structure.
Definition: cvrf_eval.c:120
OSCAP_API bool cvrf_model_add_vulnerability(struct cvrf_model *model, struct cvrf_vulnerability *vuln)
OSCAP_API struct cvrf_remediation * cvrf_remediation_clone(const struct cvrf_remediation *remed)
Definition: cvrf_priv.c:117
OSCAP_API void cvrf_remediation_free(struct cvrf_remediation *remed)
Deallocates memory for a Remediation element of the Remediations container.
Definition: cvrf_priv.c:104
OSCAP_API const char * cvrf_index_get_index_file(const struct cvrf_index *index)
OSCAP_API struct cvrf_model_iterator * cvrf_index_get_models(const struct cvrf_index *index)
OSCAP_API struct cvrf_product_status * cvrf_product_status_clone(const struct cvrf_product_status *stat)
Definition: cvrf_priv.c:305
OSCAP_API struct cvrf_threat_iterator * cvrf_vulnerability_get_threats(const struct cvrf_vulnerability *vuln)
OSCAP_API const char * cvrf_revision_get_date(const struct cvrf_revision *revision)
OSCAP_API struct cvrf_group * cvrf_group_clone(const struct cvrf_group *group)
Definition: cvrf_priv.c:625
OSCAP_API bool cvrf_index_set_source_url(struct cvrf_index *index, const char *url)
OSCAP_API struct cvrf_index * cvrf_index_clone(const struct cvrf_index *index)
Definition: cvrf_priv.c:1343
OSCAP_API const char * cvrf_remediation_get_date(const struct cvrf_remediation *remed)
OSCAP_API const char * cvrf_doc_tracking_get_tracking_id(const struct cvrf_doc_tracking *tracking)
OSCAP_API struct cvrf_product_name * cvrf_product_name_new(void)
New FullProductName of Branch or ProductTree.
Definition: cvrf_priv.c:563
cvss_category
CVSS score category.
Definition: cvss_score.h:48
General OpenScap functions and types.
Definition: cvrf_priv.c:841
Definition: cvrf_priv.c:685
Definition: cvrf_priv.c:1068
Definition: cvrf_priv.c:990
Definition: cvrf_priv.c:1162
Definition: cvrf_priv.c:592
Definition: cvrf_priv.c:1312
Definition: cvrf_priv.c:316
Definition: cvrf_priv.c:1238
Definition: cvrf_priv.c:896
Definition: cvrf_priv.c:556
Definition: cvrf_priv.c:275
Definition: cvrf_priv.c:753
Definition: cvrf_priv.c:1118
Definition: cvrf_priv.c:636
Definition: cvrf_priv.c:64
Definition: cvrf_priv.c:949
Definition: cvrf_eval.c:134
Definition: cvrf_priv.c:133
Definition: cvrf_eval.c:67
Definition: cvrf_priv.c:216
Definition: cvrf_priv.c:362
Definition: cvrf_priv.c:399
CVSS impact.
Definition: cvss_priv.h:80
Definition: list.h:82
Definition: oscap_source.c:66
String iterator.