utils package

utils.add_platform_rule module

utils.add_platform_rule.check_existence_value(value)
utils.add_platform_rule.clusterTestFunc(args)
utils.add_platform_rule.createFunc(args)
utils.add_platform_rule.createTestProfile(rule)
utils.add_platform_rule.entity_value(value)
utils.add_platform_rule.main()
utils.add_platform_rule.needs_oc(func)
utils.add_platform_rule.needs_working_cluster(func)
utils.add_platform_rule.operation_value(value)
utils.add_platform_rule.testFunc(args)
utils.add_platform_rule.which(program)

utils.ansible_playbook_to_role module

utils.compare_ds module

utils.compare_ds.compare_fix_elements(old_fix, new_fix, remediation_type, rule_id, show_diffs)
utils.compare_ds.compare_fix_texts(old_r, new_r)
utils.compare_ds.compare_oval_definitions(old_oval_def_doc, old_oval_def_id, new_oval_def_doc, new_oval_def_id)
utils.compare_ds.compare_ovals(old_rule, new_rule, old_oval_defs, new_oval_defs, show_diffs)
utils.compare_ds.compare_remediations(old_rule, new_rule, remediation_type, show_diffs)
utils.compare_ds.compare_rules(old_rule, new_rule, old_oval_defs, new_oval_defs, show_diffs)
utils.compare_ds.definition_to_elements(definition)
utils.compare_ds.find_all_oval_defs(root)
utils.compare_ds.find_benchmark(root, id_)
utils.compare_ds.find_oval_definition(oval_doc, def_id)
utils.compare_ds.find_oval_test(oval_doc, test_id)
utils.compare_ds.get_benchmarks(root)
utils.compare_ds.get_rules_to_compare(benchmark, rule_id)
utils.compare_ds.main()
utils.compare_ds.parse_args()
utils.compare_ds.print_offending_elements(elements, sign)
utils.compare_ds.process_benchmarks(old_benchmark, new_benchmark, old_oval_defs, new_oval_defs, rule_id, show_diffs)

utils.count_oval_objects module

count_oval_objects.py

Shows OVAL objects used by XCCDF rules.

Author: Jan Cerny <jcerny@redhat.com>

utils.count_oval_objects.find_oval_objects(oval_refs)

Finds OVAL objects according to definitions ID

utils.count_oval_objects.load_xml(file_name)

Loads XML files to memory and parses it into element tree

utils.count_oval_objects.main()
utils.count_oval_objects.parse_args()
utils.count_oval_objects.print_stats(stats)

Print statistic of most used objects in input

utils.create-stig-overlay module

utils.duplicated_prodtypes module

utils.find_duplicates module

This script should find duplicates e.g. specific template is same as shared one

class utils.find_duplicates.BashDuplicatesFinder(root_dir, specific_dirs_mask, shared_dir, shared_files_mask='*.sh')

Bases: utils.find_duplicates.DuplicatesFinder

class utils.find_duplicates.DuplicatesFinder(root_dir, specific_dirs_mask, shared_dir, shared_files_mask)

Bases: object

search()
Returns

True if any duplicate found

class utils.find_duplicates.OvalDuplicatesFinder(root_dir, specific_dirs_mask, shared_dir, shared_files_mask='*.xml')

Bases: utils.find_duplicates.DuplicatesFinder

utils.find_duplicates.main()

main function

utils.find_duplicates.parse_args()
utils.find_duplicates.recursive_globi(mask)

Simple replacement of glob.globi(mask, recursive=true) Reason: Older Python versions support

utils.find_shadowed_files module

utils.find_shadowed_files.main()
utils.find_shadowed_files.parse_args()
utils.find_shadowed_files.print_shadows(resource, language, product)
utils.find_shadowed_files.safe_listdir(path)

utils.fix-rules module

utils.fix_file_ocilclause module

utils.gen_tables module

utils.generate_contributors module

utils.generate_contributors.main()

utils.ignition-remediation module

utils.migrate_template_csv_to_rule module

utils.mod_checks module

utils.mod_fixes module

utils.mod_prodtype module

utils.move_rules module

utils.regexify_banner module

utils.regexify_banner.main()
utils.regexify_banner.parse_args()

utils.rule_dir_diff module

utils.rule_dir_json module

utils.rule_dir_stats module

utils.testoval module

utils.xccdf2csv-stig module

Module contents