From 87289ec4d8dae9a84d43744bd2bf99d9bdf10d19 Mon Sep 17 00:00:00 2001 From: Nick Carboni Date: Thu, 12 Dec 2019 13:36:45 -0500 Subject: [PATCH] Update the search for the xml element we use for SCAP The format of the xml file has changed so the existing search was not finding any results. This search works as of scap-security-guide version 0.1.46 https://bugzilla.redhat.com/show_bug.cgi?id=1769901 --- lib/linux_admin/scap.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/linux_admin/scap.rb b/lib/linux_admin/scap.rb index 5d4de06..45fdf02 100644 --- a/lib/linux_admin/scap.rb +++ b/lib/linux_admin/scap.rb @@ -83,7 +83,7 @@ def write_ds_xml(io, profile_xml) end def model_xml_element(doc) - doc.css("//nist_list|model", "nist_list" => "http://checklists.nist.gov/xccdf/1.2").detect { |model| model.namespace.prefix.nil? } + doc.xpath("//ns10:model").first end end end