ssg.oval_object_model.oval_entities.definition module

class ssg.oval_object_model.oval_entities.definition.Affected(tag, family)[source]

Bases: OVALBaseObject

finalize_affected_platforms(type_, full_name)[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()[source]
is_applicable_for_product(product_)[source]

Based on the <platform> specifier of the OVAL check determine if this OVAL check is applicable for this product. Return ‘True’ if so, ‘False’ otherwise

platform_tag = 'platform'
platforms = None
product_tag = 'product'
products = None
class ssg.oval_object_model.oval_entities.definition.Criteria(tag)[source]

Bases: GeneralCriteriaNode

add_child_criteria_node(child)[source]
get_extend_definition_references()[source]
get_test_references()[source]
get_xml_element()[source]
operator = 'AND'
translate_id(translator, store_defname=False)[source]
class ssg.oval_object_model.oval_entities.definition.Criterion(tag, ref)[source]

Bases: TerminateCriteriaNode

prefix_ref = 'test'
class ssg.oval_object_model.oval_entities.definition.Definition(tag, id_, class_, metadata)[source]

Bases: OVALComponent

check_affected()[source]
criteria = None
get_xml_element()[source]
is_applicable_for_product(product)[source]
translate_id(translator, store_defname=False)[source]
class ssg.oval_object_model.oval_entities.definition.ExtendDefinition(tag, ref)[source]

Bases: TerminateCriteriaNode

prefix_ref = 'definition'
class ssg.oval_object_model.oval_entities.definition.GeneralCriteriaNode(tag)[source]

Bases: OVALBaseObject

applicability_check = False
comment = ''
get_xml_element()[source]
negate = False
class ssg.oval_object_model.oval_entities.definition.Metadata(tag)[source]

Bases: OVALBaseObject

add_reference(ref_id, source)[source]
array_of_affected = None
array_of_references = None
description = ''
description_tag = 'description'
finalize_affected_platforms(type_, full_name)[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()[source]
is_applicable_for_product(product)[source]

Based on the <platform> specifier of the OVAL check determine if this OVAL check is applicable for this product. Return ‘True’ if so, ‘False’ otherwise

title = ''
title_tag = 'title'
class ssg.oval_object_model.oval_entities.definition.Reference(tag, source, ref_id)[source]

Bases: OVALBaseObject

get_xml_element()[source]
ref_url = ''
class ssg.oval_object_model.oval_entities.definition.TerminateCriteriaNode(tag, ref)[source]

Bases: GeneralCriteriaNode

get_xml_element()[source]
prefix_ref = ''
translate_id(translator, store_defname=False)[source]
ssg.oval_object_model.oval_entities.definition.load_affected(all_affected_elements)[source]
ssg.oval_object_model.oval_entities.definition.load_criteria(oval_criteria_xml_el)[source]
ssg.oval_object_model.oval_entities.definition.load_definition(oval_definition_xml_el)[source]
ssg.oval_object_model.oval_entities.definition.load_metadata(oval_metadata_xml_el, definition_id)[source]
ssg.oval_object_model.oval_entities.definition.load_references(all_reference_elements)[source]
ssg.oval_object_model.oval_entities.definition.load_terminate_criteria(xml_el, class_, ref_prefix)[source]