openscap_parser 0.1.0 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/Dockerfile +15 -0
- data/README.md +32 -10
- data/Rakefile +2 -0
- data/lib/openscap_parser.rb +14 -35
- data/lib/openscap_parser/benchmark.rb +38 -0
- data/lib/openscap_parser/benchmarks.rb +21 -0
- data/lib/openscap_parser/datastream_file.rb +15 -0
- data/lib/openscap_parser/fix.rb +55 -0
- data/lib/openscap_parser/fixes.rb +21 -0
- data/lib/openscap_parser/oval_report.rb +24 -0
- data/lib/openscap_parser/profile.rb +31 -0
- data/lib/openscap_parser/profiles.rb +7 -12
- data/lib/openscap_parser/rule.rb +51 -10
- data/lib/openscap_parser/rule_identifier.rb +21 -0
- data/lib/openscap_parser/rule_reference.rb +14 -0
- data/lib/openscap_parser/rule_references.rb +32 -0
- data/lib/openscap_parser/rule_result.rb +31 -2
- data/lib/openscap_parser/rule_results.rb +21 -0
- data/lib/openscap_parser/rules.rb +9 -8
- data/lib/openscap_parser/selectors.rb +9 -0
- data/lib/openscap_parser/set_value.rb +18 -0
- data/lib/openscap_parser/set_values.rb +21 -0
- data/lib/openscap_parser/sub.rb +18 -0
- data/lib/openscap_parser/subs.rb +38 -0
- data/lib/openscap_parser/tailoring.rb +27 -0
- data/lib/openscap_parser/tailoring_file.rb +15 -0
- data/lib/openscap_parser/tailorings.rb +22 -0
- data/lib/openscap_parser/test_result.rb +62 -0
- data/lib/openscap_parser/test_result_file.rb +12 -0
- data/lib/openscap_parser/test_results.rb +19 -0
- data/lib/openscap_parser/util.rb +10 -0
- data/lib/openscap_parser/version.rb +1 -1
- data/lib/openscap_parser/xml_file.rb +13 -0
- data/lib/openscap_parser/xml_node.rb +36 -0
- data/lib/oval/definition.rb +47 -0
- data/lib/oval/definition_result.rb +17 -0
- data/lib/oval/reference.rb +21 -0
- data/lib/railtie.rb +15 -0
- data/lib/ssg.rb +5 -0
- data/lib/ssg/downloader.rb +94 -0
- data/lib/ssg/unarchiver.rb +34 -0
- data/lib/tasks/ssg.rake +33 -0
- data/openscap_parser.gemspec +13 -10
- metadata +94 -14
- data/lib/openscap_parser/xml_report.rb +0 -25
@@ -1,25 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
require 'nokogiri'
|
3
|
-
|
4
|
-
module OpenscapParser
|
5
|
-
# Methods related with parsing directly the XML from the Report
|
6
|
-
# as opposed to using the OpenSCAP APIs
|
7
|
-
module XMLReport
|
8
|
-
def self.included(base)
|
9
|
-
base.class_eval do
|
10
|
-
def host
|
11
|
-
@report_xml.search('target').text
|
12
|
-
end
|
13
|
-
|
14
|
-
def description
|
15
|
-
@report_xml.search('description').first.text
|
16
|
-
end
|
17
|
-
|
18
|
-
def report_xml(report_contents = '')
|
19
|
-
@report_xml ||= ::Nokogiri::XML.parse(report_contents)
|
20
|
-
@report_xml.remove_namespaces! if @report_xml.namespaces.keys.include? 'xmlns:arf'
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|