ssg.oval_object_model.oval_document module

exception ssg.oval_object_model.oval_document.MissingOVALComponent[source]

Bases: Exception

class ssg.oval_object_model.oval_document.OVALDocument[source]

Bases: OVALContainer

finalize_affected_platforms(env_yaml)[source]

Depending on your use-case of OVAL you may not need the <affected> element. Such use-cases including using OVAL as a check engine for XCCDF benchmarks. Since the XCCDF Benchmarks use cpe:platform with CPE IDs, the affected element in OVAL definitions is redundant and just bloats the files. This function removes all irrelevant affected platform elements from given OVAL tree. It then adds one platform of the product we are building.

get_xml_element(oval_definition_references=None)[source]
is_empty()[source]
load_shorthand(xml_string, product=None, rule_id=None)[source]
property product_name
product_version = ''
save_as_xml(fd, oval_definition_references=None)[source]
schema_version = '5.11'
property ssg_version
validate_references()[source]
ssg.oval_object_model.oval_document.load_oval_document(oval_document_xml_el)[source]
ssg.oval_object_model.oval_document.selection_of_oval_components_generator(component_dict, id_selection)[source]