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 +4 -4
- data/lib/openscap/ds/arf.rb +0 -11
- data/lib/openscap/ds/sds.rb +0 -7
- data/lib/openscap/openscap.rb +1 -1
- data/lib/openscap/version.rb +1 -1
- data/lib/openscap/xccdf/fix.rb +18 -17
- data/lib/openscap/xccdf/fixtext.rb +1 -1
- metadata +3 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0bc547f7f6f44dcfc10ef4e815f6c26e7bab650247eae7241a4bc95abce56083
|
4
|
+
data.tar.gz: 5b0d572d1112b46c8559fe2111a5c296481293b673a0fafa4b7857baacd385cd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9f3f7b7bd3c070f859516235223d605f5601d16a89761ca5d1ff91ce2039636743747458e6c59b5d66be9bbf9ed40cf0a2914e2d18aa57ddd15eb9b971e23833
|
7
|
+
data.tar.gz: 6cca96b95d1a55adbeb61138a949f01f07e216e90e0d8619e1e40de674f1014b7108faa2fc0a8cbab59c86a4bc9448bab570fb7e61adc090b8d07f6fada62709
|
data/lib/openscap/ds/arf.rb
CHANGED
@@ -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
|
data/lib/openscap/ds/sds.rb
CHANGED
@@ -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
|
data/lib/openscap/openscap.rb
CHANGED
data/lib/openscap/version.rb
CHANGED
data/lib/openscap/xccdf/fix.rb
CHANGED
@@ -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
|
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
|
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
|
-
:
|
34
|
-
:
|
35
|
-
:
|
36
|
-
:
|
37
|
-
:
|
38
|
-
:
|
39
|
-
:
|
40
|
-
:
|
41
|
-
:
|
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
|
-
:
|
46
|
-
:
|
47
|
-
:
|
48
|
-
:
|
49
|
-
:
|
50
|
-
:
|
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
|
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.
|
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:
|
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.
|
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: []
|