def process_product_names(args, known_rules): result = rds.walk_rules_stats(args, known_rules, rds.product_names_oval, rds.product_names_remediation) affected_rules = result[0] affected_ovals = result[1] affected_remediations = result[2] affected_remediations_type = result[4] verbose_output = result[5] if not args.summary_only: print("Product Names Specifics:") for line in verbose_output: print(line) print("\n") print("Product Names Summary:") print("Total affected rules: %d" % affected_rules) if not args.fixes_only: print("Rules with differing products and OVAL names: %d / %d" % (affected_ovals, affected_rules)) if not args.ovals_only: print("Rules with differing product and remediation names: %d / %d" % (affected_remediations, affected_rules)) for r_type in ssg.build_remediations.REMEDIATION_TO_EXT_MAP: r_missing = affected_remediations_type[r_type] print( "Rules with differing product and %s remediation names: %d / %d" % (r_type, r_missing, affected_rules)) print("\n")
def process_two_plus(args, known_rules): result = rds.walk_rules_stats(args, known_rules, rds.two_plus_oval, rds.two_plus_remediation) affected_rules = result[0] affected_ovals = result[1] affected_remediations = result[2] affected_remediations_type = result[4] verbose_output = result[5] if not args.summary_only: print("Two Plus Object Specifics:") for line in verbose_output: print(line) print("\n") print("Two Plus Objects Summary:") print("Total affected rules: %d" % affected_rules) if not args.fixes_only: print("Rules with two or more OVALs: %d / %d" % (affected_ovals, affected_rules)) if not args.ovals_only: print("Rules with two or more remediations: %d / %d" % (affected_remediations, affected_rules)) for r_type in ssg.build_remediations.REMEDIATION_TO_EXT_MAP: r_missing = affected_remediations_type[r_type] print("Rules with two or more %s remediations: %d / %d" % (r_type, r_missing, affected_rules)) print("\n")
def process_two_plus(args, known_rules): result = rds.walk_rules_stats(args, known_rules, rds.two_plus_oval, rds.two_plus_remediation) affected_rules = result[0] affected_ovals = result[1] affected_remediations = result[2] affected_remediations_type = result[4] verbose_output = result[5] if not args.summary_only: print("Two Plus Object Specifics:") for line in verbose_output: print(line) print("\n") print("Two Plus Objects Summary:") print("Total affected rules: %d" % affected_rules) if not args.fixes_only: print("Rules with two or more OVALs: %d / %d" % (affected_ovals, affected_rules)) if not args.ovals_only: print("Rules with two or more remediations: %d / %d" % (affected_remediations, affected_rules)) for r_type in ssg.build_remediations.REMEDIATION_TO_EXT_MAP: r_missing = affected_remediations_type[r_type] print("Rules with two or more %s remediations: %d / %d" % (r_type, r_missing, affected_rules)) print("\n")
def process_product_names(args, known_rules): result = rds.walk_rules_stats(args, known_rules, rds.product_names_oval, rds.product_names_remediation) affected_rules = result[0] affected_ovals = result[1] affected_remediations = result[2] affected_remediations_type = result[4] verbose_output = result[5] if not args.summary_only: print("Product Names Specifics:") for line in verbose_output: print(line) print("\n") print("Product Names Summary:") print("Total affected rules: %d" % affected_rules) if not args.fixes_only: print("Rules with differing products and OVAL names: %d / %d" % (affected_ovals, affected_rules)) if not args.ovals_only: print("Rules with differing product and remediation names: %d / %d" % (affected_remediations, affected_rules)) for r_type in ssg.build_remediations.REMEDIATION_TO_EXT_MAP: r_missing = affected_remediations_type[r_type] print("Rules with differing product and %s remediation names: %d / %d" % (r_type, r_missing, affected_rules)) print("\n")