openscap 0.5.2 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cf5877a6ea4ed1691b34456d8f1f75106a2d8a7d0ef69464a6c782ff8f404930
4
- data.tar.gz: 4dcedbaab2520d6930b8c8815167e5c8674e7d3f321cad5020e36404692b563c
3
+ metadata.gz: 0bc547f7f6f44dcfc10ef4e815f6c26e7bab650247eae7241a4bc95abce56083
4
+ data.tar.gz: 5b0d572d1112b46c8559fe2111a5c296481293b673a0fafa4b7857baacd385cd
5
5
  SHA512:
6
- metadata.gz: 892db2957d5cad543f1326b593481c9c9b48a5e62564fc5d7cf182dd116d4b1083ba2ea7271fbb49d1a3b29906e90f1e00e09ab5d253ed22446ea61ccf78c7ea
7
- data.tar.gz: e546ff56a90328f03c43c152408b2bf4fa34b2f8dd5589fa5e3d8febfa57edec0e5eeb915b3b0a0e77589344dd9b619c43593514f66e9cdb1d212e9cbaf49361
6
+ metadata.gz: 9f3f7b7bd3c070f859516235223d605f5601d16a89761ca5d1ff91ce2039636743747458e6c59b5d66be9bbf9ed40cf0a2914e2d18aa57ddd15eb9b971e23833
7
+ data.tar.gz: 6cca96b95d1a55adbeb61138a949f01f07e216e90e0d8619e1e40de674f1014b7108faa2fc0a8cbab59c86a4bc9448bab570fb7e61adc090b8d07f6fada62709
@@ -43,16 +43,6 @@ module OpenSCAP
43
43
  source = OpenSCAP::Source.new source_p
44
44
  OpenSCAP::DS::Sds.new(source)
45
45
  end
46
-
47
- def html
48
- html_p = OpenSCAP.ds_rds_session_get_html_report @session
49
- OpenSCAP.raise! if OpenSCAP.error?
50
- return nil if html_p.null?
51
-
52
- html = html_p.read_string
53
- OpenSCAP::LibC.free html_p
54
- html
55
- end
56
46
  end
57
47
  end
58
48
 
@@ -61,5 +51,4 @@ module OpenSCAP
61
51
  attach_function :ds_rds_session_select_report, %i[pointer string], :pointer
62
52
  attach_function :ds_rds_session_replace_report_with_source, %i[pointer pointer], :int
63
53
  attach_function :ds_rds_session_select_report_request, %i[pointer string], :pointer
64
- attach_function :ds_rds_session_get_html_report, [:pointer], :pointer
65
54
  end
@@ -34,12 +34,6 @@ module OpenSCAP
34
34
  checklist
35
35
  end
36
36
 
37
- def html_guide(profile = nil)
38
- html = OpenSCAP.ds_sds_session_get_html_guide(@raw, profile)
39
- OpenSCAP.raise! if html.nil?
40
- html
41
- end
42
-
43
37
  def destroy
44
38
  OpenSCAP.ds_sds_session_free(@raw)
45
39
  @raw = nil
@@ -50,5 +44,4 @@ module OpenSCAP
50
44
  attach_function :ds_sds_session_new_from_source, [:pointer], :pointer
51
45
  attach_function :ds_sds_session_free, [:pointer], :void
52
46
  attach_function :ds_sds_session_select_checklist, %i[pointer string string string], :pointer
53
- attach_function :ds_sds_session_get_html_guide, %i[pointer string], :string
54
47
  end
@@ -4,7 +4,7 @@ require 'ffi'
4
4
 
5
5
  module OpenSCAP
6
6
  extend FFI::Library
7
- ffi_lib ['libopenscap.so.8', 'libopenscap.so.25', 'openscap']
7
+ ffi_lib ['libopenscap.so.8', 'libopenscap.so.25', 'libopenscap.so.33', 'openscap']
8
8
 
9
9
  def self.error?
10
10
  oscap_err
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module OpenSCAP
4
- VERSION = '0.5.2'
4
+ VERSION = '0.6.0'
5
5
  end
@@ -11,15 +11,16 @@ module OpenSCAP
11
11
 
12
12
  def id = OpenSCAP.xccdf_fix_get_id @raw
13
13
  def platform = OpenSCAP.xccdf_fix_get_platform @raw
14
- def fix_system = OpenSCAP.xccdf_fix_get_system @raw
14
+ def system = OpenSCAP.xccdf_fix_get_system @raw
15
15
  def content = OpenSCAP.xccdf_fix_get_content @raw
16
16
  def reboot = OpenSCAP.xccdf_fix_get_reboot @raw
17
17
  def strategy = OpenSCAP.xccdf_fix_get_strategy @raw
18
18
  def disruption = OpenSCAP.xccdf_fix_get_disruption @raw
19
19
  def complexity = OpenSCAP.xccdf_fix_get_complexity @raw
20
+ alias fix_system system
20
21
 
21
22
  def to_hash
22
- { id:, platform:, system: fix_system, content: }
23
+ { id:, platform:, system:, content: }
23
24
  end
24
25
  end
25
26
  end
@@ -30,24 +31,24 @@ module OpenSCAP
30
31
  attach_function :xccdf_fix_get_reboot, [:pointer], :bool
31
32
 
32
33
  XccdfStrategy = enum(
33
- :strategy_unknown, 0, # Strategy not defined
34
- :strategy_configure, # Adjust target config or settings
35
- :strategy_disable, # Turn off or deinstall something
36
- :strategy_enable, # Turn on or install something
37
- :strategy_patch, # Apply a patch, hotfix, or update
38
- :strategy_policy, # Remediation by changing policies/procedures
39
- :strategy_restrict, # Adjust permissions or ACLs
40
- :strategy_update, # Install upgrade or update the system
41
- :strategy_combination # Combo of two or more of the above
34
+ :unknown, 0, # Strategy not defined
35
+ :configure, # Adjust target config or settings
36
+ :disable, # Turn off or deinstall something
37
+ :enable, # Turn on or install something
38
+ :patch, # Apply a patch, hotfix, or update
39
+ :policy, # Remediation by changing policies/procedures
40
+ :restrict, # Adjust permissions or ACLs
41
+ :update, # Install upgrade or update the system
42
+ :combination # Combo of two or more of the above
42
43
  )
43
44
  attach_function :xccdf_fix_get_strategy, [:pointer], XccdfStrategy
44
45
  XccdfLevel = enum(
45
- :level_not_defined, 0,
46
- :level_unknown, 1, # Unknown.
47
- :level_info, # Info.
48
- :level_low, # Low.
49
- :level_medium, # Medium.
50
- :level_high # High.
46
+ :not_defined, 0,
47
+ :unknown, 1,
48
+ :info,
49
+ :low,
50
+ :medium,
51
+ :high
51
52
  )
52
53
  attach_function :xccdf_fix_get_disruption, [:pointer], XccdfLevel
53
54
  attach_function :xccdf_fix_get_complexity, [:pointer], XccdfLevel
@@ -9,7 +9,7 @@ module OpenSCAP
9
9
  @raw = raw
10
10
  end
11
11
 
12
- def text = Text.new(OpenSCAP.xccdf_fixtext_get_text(@raw)).text
12
+ def content = Text.new(OpenSCAP.xccdf_fixtext_get_text(@raw)).text
13
13
  def fixref = OpenSCAP.xccdf_fixtext_get_fixref @raw
14
14
  def reboot = OpenSCAP.xccdf_fixtext_get_reboot @raw
15
15
  def strategy = OpenSCAP.xccdf_fixtext_get_strategy @raw
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openscap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Simon Lukasik
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2023-11-03 00:00:00.000000000 Z
10
+ date: 2025-02-13 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: ffi
@@ -68,7 +67,6 @@ homepage: https://github.com/isimluk/ruby-openscap
68
67
  licenses:
69
68
  - GPL-2.0
70
69
  metadata: {}
71
- post_install_message:
72
70
  rdoc_options: []
73
71
  require_paths:
74
72
  - lib
@@ -83,8 +81,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
83
81
  - !ruby/object:Gem::Version
84
82
  version: '0'
85
83
  requirements: []
86
- rubygems_version: 3.4.10
87
- signing_key:
84
+ rubygems_version: 3.6.2
88
85
  specification_version: 4
89
86
  summary: A FFI wrapper around the OpenSCAP library
90
87
  test_files: []