File tree Expand file tree Collapse file tree 2 files changed +4
-0
lines changed
Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ assert_exists 1 '/Benchmark/TestResult/rule-result[@idref="xccdf_com.example.www
2121assert_exists 1 ' /Benchmark/TestResult/rule-result[@idref="xccdf_com.example.www_rule_R2"]/result[text()="pass"]'
2222assert_exists 1 ' /Benchmark/TestResult/rule-result[@idref="xccdf_com.example.www_rule_R3"]/result[text()="pass"]'
2323assert_exists 1 ' /Benchmark/TestResult/rule-result[@idref="xccdf_com.example.www_rule_R4"]/result[text()="notselected"]'
24+ grep " xccdf-1.2:" $tailoring
2425
2526# select additional rules R3, R4
2627python3 $autotailor --id-namespace " com.example.www" --select R3 --select R4 $ds $original_profile > $tailoring
Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ import json
2929
3030
3131NS = "http://checklists.nist.gov/xccdf/1.2"
32+ NS_PREFIX = "xccdf-1.2"
3233DEFAULT_PROFILE_SUFFIX = "_customized"
3334DEFAULT_REVERSE_DNS = "org.ssgproject.content"
3435ROLES = ["full" , "unscored" , "unchecked" ]
@@ -408,6 +409,8 @@ if __name__ == "__main__":
408409 parser = get_parser ()
409410 args = parser .parse_args ()
410411
412+ ET .register_namespace (NS_PREFIX , NS )
413+
411414 if not args .profile and not args .json_tailoring :
412415 parser .error ("one of the following arguments has to be provided: "
413416 "BASE_PROFILE_ID or --json-tailoring JSON_TAILORING_FILENAME" )
You can’t perform that action at this time.
0 commit comments