2222
2323DEFAULT_SELECTOR = "__DEFAULT"
2424HASH_ROW = "#" * 79
25- LANGUAGE_TO_SYSTEM = {"ansible" : ansible_system , "bash" : bash_system , "hummingbird" : hummingbird_system }
25+ LANGUAGE_TO_SYSTEM = {
26+ "ansible" : ansible_system ,
27+ "bash" : bash_system ,
28+ "hummingbird" : hummingbird_system }
2629LANGUAGE_TO_TARGET = {"ansible" : "playbook" , "bash" : "script" , "hummingbird" : "script" }
2730LANGUAGE_TO_EXTENSION = {"ansible" : "yml" , "bash" : "sh" , "hummingbird" : "sh" }
2831ANSIBLE_VAR_PATTERN = re .compile (
@@ -309,7 +312,9 @@ def create_header(self, profile):
309312 how_to_apply = "# $ sudo ./remediation-script.sh\n "
310313 elif self .language == "hummingbird" :
311314 shebang_with_newline = "#!/usr/bin/env bash\n "
312- remediation_type = "Bash Remediation Script for building Project Hummingbird container images"
315+ remediation_type = (
316+ "Bash Remediation Script for building Project Hummingbird "
317+ "container images" )
313318 how_to_apply = "# RUN remediation-script.sh ${NEWROOT}\n "
314319 profile_title = profile .find ("./{%s}title" % XCCDF12_NS ).text
315320 description = profile .find ("./{%s}description" % XCCDF12_NS ).text
@@ -381,7 +386,6 @@ def generate_bash_rule_remediation(self, rule_id, status, refinements):
381386 output .append (end_msg )
382387 return "" .join (output )
383388
384-
385389 def generate_hummingbird_rule_remediation (self , rule_id , refinements ):
386390 fix_el = self .remediations [rule_id ]
387391 if fix_el is None :
@@ -405,7 +409,6 @@ def generate_hummingbird_rule_remediation(self, rule_id, refinements):
405409 output .append (end_msg )
406410 return "" .join (output )
407411
408-
409412 def generate_ansible_rule_remediation (self , fix_el , refinements ):
410413 rule_vars = {}
411414 tasks = []
0 commit comments