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.
Files changed (47) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/Dockerfile +15 -0
  4. data/README.md +32 -10
  5. data/Rakefile +2 -0
  6. data/lib/openscap_parser.rb +14 -35
  7. data/lib/openscap_parser/benchmark.rb +38 -0
  8. data/lib/openscap_parser/benchmarks.rb +21 -0
  9. data/lib/openscap_parser/datastream_file.rb +15 -0
  10. data/lib/openscap_parser/fix.rb +55 -0
  11. data/lib/openscap_parser/fixes.rb +21 -0
  12. data/lib/openscap_parser/oval_report.rb +24 -0
  13. data/lib/openscap_parser/profile.rb +31 -0
  14. data/lib/openscap_parser/profiles.rb +7 -12
  15. data/lib/openscap_parser/rule.rb +51 -10
  16. data/lib/openscap_parser/rule_identifier.rb +21 -0
  17. data/lib/openscap_parser/rule_reference.rb +14 -0
  18. data/lib/openscap_parser/rule_references.rb +32 -0
  19. data/lib/openscap_parser/rule_result.rb +31 -2
  20. data/lib/openscap_parser/rule_results.rb +21 -0
  21. data/lib/openscap_parser/rules.rb +9 -8
  22. data/lib/openscap_parser/selectors.rb +9 -0
  23. data/lib/openscap_parser/set_value.rb +18 -0
  24. data/lib/openscap_parser/set_values.rb +21 -0
  25. data/lib/openscap_parser/sub.rb +18 -0
  26. data/lib/openscap_parser/subs.rb +38 -0
  27. data/lib/openscap_parser/tailoring.rb +27 -0
  28. data/lib/openscap_parser/tailoring_file.rb +15 -0
  29. data/lib/openscap_parser/tailorings.rb +22 -0
  30. data/lib/openscap_parser/test_result.rb +62 -0
  31. data/lib/openscap_parser/test_result_file.rb +12 -0
  32. data/lib/openscap_parser/test_results.rb +19 -0
  33. data/lib/openscap_parser/util.rb +10 -0
  34. data/lib/openscap_parser/version.rb +1 -1
  35. data/lib/openscap_parser/xml_file.rb +13 -0
  36. data/lib/openscap_parser/xml_node.rb +36 -0
  37. data/lib/oval/definition.rb +47 -0
  38. data/lib/oval/definition_result.rb +17 -0
  39. data/lib/oval/reference.rb +21 -0
  40. data/lib/railtie.rb +15 -0
  41. data/lib/ssg.rb +5 -0
  42. data/lib/ssg/downloader.rb +94 -0
  43. data/lib/ssg/unarchiver.rb +34 -0
  44. data/lib/tasks/ssg.rake +33 -0
  45. data/openscap_parser.gemspec +13 -10
  46. metadata +94 -14
  47. 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