openscap 0.4.9 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +7 -18
- data/Rakefile +2 -2
- data/lib/openscap/all.rb +1 -1
- data/lib/openscap/ds/arf.rb +3 -3
- data/lib/openscap/ds/sds.rb +8 -2
- data/lib/openscap/openscap.rb +9 -0
- data/lib/openscap/source.rb +10 -4
- data/lib/openscap/text.rb +34 -5
- data/lib/openscap/version.rb +1 -1
- data/lib/openscap/xccdf/benchmark.rb +67 -15
- data/lib/openscap/xccdf/fix.rb +7 -14
- data/lib/openscap/xccdf/fixtext.rb +19 -0
- data/lib/openscap/xccdf/group.rb +27 -1
- data/lib/openscap/xccdf/ident.rb +4 -10
- data/lib/openscap/xccdf/item.rb +37 -65
- data/lib/openscap/xccdf/item_common.rb +40 -0
- data/lib/openscap/xccdf/policy.rb +12 -3
- data/lib/openscap/xccdf/policy_model.rb +16 -15
- data/lib/openscap/xccdf/profile.rb +10 -10
- data/lib/openscap/xccdf/reference.rb +5 -21
- data/lib/openscap/xccdf/rule.rb +40 -20
- data/lib/openscap/xccdf/ruleresult.rb +5 -7
- data/lib/openscap/xccdf/session.rb +28 -30
- data/lib/openscap/xccdf/status.rb +34 -0
- data/lib/openscap/xccdf/tailoring.rb +7 -16
- data/lib/openscap/xccdf/testresult.rb +18 -28
- data/lib/openscap/xccdf/value.rb +1 -2
- data/lib/openscap/xccdf.rb +1 -1
- metadata +15 -48
- data/test/common/testcase.rb +0 -38
- data/test/data/arf.xml +0 -275156
- data/test/data/invalid.xml +0 -20
- data/test/data/sds-complex.xml +0 -132
- data/test/data/tailoring.xml +0 -31
- data/test/data/testresult.xml +0 -225
- data/test/data/xccdf.xml +0 -3046
- data/test/ds/arf_test.rb +0 -96
- data/test/ds/sds_test.rb +0 -71
- data/test/integration/arf_waiver_test.rb +0 -91
- data/test/openscap_test.rb +0 -21
- data/test/source_test.rb +0 -78
- data/test/text_test.rb +0 -19
- data/test/xccdf/arf_test.rb +0 -44
- data/test/xccdf/benchmark_test.rb +0 -115
- data/test/xccdf/policy_test.rb +0 -20
- data/test/xccdf/profile_test.rb +0 -20
- data/test/xccdf/session_ds_test.rb +0 -116
- data/test/xccdf/session_test.rb +0 -33
- data/test/xccdf/tailoring_test.rb +0 -30
- data/test/xccdf/testresult_test.rb +0 -99
metadata
CHANGED
@@ -1,43 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: openscap
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Simon Lukasik
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-11-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
-
- !ruby/object:Gem::Dependency
|
14
|
-
name: bundler
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - ">="
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: 1.0.0
|
20
|
-
type: :development
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - ">="
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: 1.0.0
|
27
13
|
- !ruby/object:Gem::Dependency
|
28
14
|
name: ffi
|
29
15
|
requirement: !ruby/object:Gem::Requirement
|
30
16
|
requirements:
|
31
|
-
- - "
|
17
|
+
- - "~>"
|
32
18
|
- !ruby/object:Gem::Version
|
33
|
-
version: 1.
|
19
|
+
version: 1.16.2
|
34
20
|
type: :runtime
|
35
21
|
prerelease: false
|
36
22
|
version_requirements: !ruby/object:Gem::Requirement
|
37
23
|
requirements:
|
38
|
-
- - "
|
24
|
+
- - "~>"
|
39
25
|
- !ruby/object:Gem::Version
|
40
|
-
version: 1.
|
26
|
+
version: 1.16.2
|
41
27
|
description: |-
|
42
28
|
A FFI wrapper around the OpenSCAP library.
|
43
29
|
Currently it provides only subset of libopenscap functionality.
|
@@ -62,9 +48,11 @@ files:
|
|
62
48
|
- lib/openscap/xccdf.rb
|
63
49
|
- lib/openscap/xccdf/benchmark.rb
|
64
50
|
- lib/openscap/xccdf/fix.rb
|
51
|
+
- lib/openscap/xccdf/fixtext.rb
|
65
52
|
- lib/openscap/xccdf/group.rb
|
66
53
|
- lib/openscap/xccdf/ident.rb
|
67
54
|
- lib/openscap/xccdf/item.rb
|
55
|
+
- lib/openscap/xccdf/item_common.rb
|
68
56
|
- lib/openscap/xccdf/policy.rb
|
69
57
|
- lib/openscap/xccdf/policy_model.rb
|
70
58
|
- lib/openscap/xccdf/profile.rb
|
@@ -72,35 +60,15 @@ files:
|
|
72
60
|
- lib/openscap/xccdf/rule.rb
|
73
61
|
- lib/openscap/xccdf/ruleresult.rb
|
74
62
|
- lib/openscap/xccdf/session.rb
|
63
|
+
- lib/openscap/xccdf/status.rb
|
75
64
|
- lib/openscap/xccdf/tailoring.rb
|
76
65
|
- lib/openscap/xccdf/testresult.rb
|
77
66
|
- lib/openscap/xccdf/value.rb
|
78
|
-
|
79
|
-
- test/data/arf.xml
|
80
|
-
- test/data/invalid.xml
|
81
|
-
- test/data/sds-complex.xml
|
82
|
-
- test/data/tailoring.xml
|
83
|
-
- test/data/testresult.xml
|
84
|
-
- test/data/xccdf.xml
|
85
|
-
- test/ds/arf_test.rb
|
86
|
-
- test/ds/sds_test.rb
|
87
|
-
- test/integration/arf_waiver_test.rb
|
88
|
-
- test/openscap_test.rb
|
89
|
-
- test/source_test.rb
|
90
|
-
- test/text_test.rb
|
91
|
-
- test/xccdf/arf_test.rb
|
92
|
-
- test/xccdf/benchmark_test.rb
|
93
|
-
- test/xccdf/policy_test.rb
|
94
|
-
- test/xccdf/profile_test.rb
|
95
|
-
- test/xccdf/session_ds_test.rb
|
96
|
-
- test/xccdf/session_test.rb
|
97
|
-
- test/xccdf/tailoring_test.rb
|
98
|
-
- test/xccdf/testresult_test.rb
|
99
|
-
homepage: https://github.com/OpenSCAP/ruby-openscap
|
67
|
+
homepage: https://github.com/isimluk/ruby-openscap
|
100
68
|
licenses:
|
101
69
|
- GPL-2.0
|
102
70
|
metadata: {}
|
103
|
-
post_install_message:
|
71
|
+
post_install_message:
|
104
72
|
rdoc_options: []
|
105
73
|
require_paths:
|
106
74
|
- lib
|
@@ -108,16 +76,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
108
76
|
requirements:
|
109
77
|
- - ">="
|
110
78
|
- !ruby/object:Gem::Version
|
111
|
-
version:
|
79
|
+
version: 3.2.2
|
112
80
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
113
81
|
requirements:
|
114
82
|
- - ">="
|
115
83
|
- !ruby/object:Gem::Version
|
116
84
|
version: '0'
|
117
85
|
requirements: []
|
118
|
-
|
119
|
-
|
120
|
-
signing_key:
|
86
|
+
rubygems_version: 3.4.10
|
87
|
+
signing_key:
|
121
88
|
specification_version: 4
|
122
89
|
summary: A FFI wrapper around the OpenSCAP library
|
123
90
|
test_files: []
|
data/test/common/testcase.rb
DELETED
@@ -1,38 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'test/unit'
|
4
|
-
|
5
|
-
module OpenSCAP
|
6
|
-
class TestCase < Test::Unit::TestCase
|
7
|
-
def setup
|
8
|
-
workdir = 'test/output'
|
9
|
-
if Dir.pwd.end_with? 'test/output'
|
10
|
-
cleanup # Older TestCase do not run cleanup method.
|
11
|
-
end
|
12
|
-
FileUtils.rm_rf workdir
|
13
|
-
Dir.mkdir workdir
|
14
|
-
Dir.chdir workdir
|
15
|
-
@s = nil
|
16
|
-
OpenSCAP.oscap_init
|
17
|
-
end
|
18
|
-
|
19
|
-
def cleanup
|
20
|
-
@s&.destroy
|
21
|
-
Dir.chdir '../..'
|
22
|
-
OpenSCAP.raise! if OpenSCAP.error?
|
23
|
-
OpenSCAP.oscap_cleanup
|
24
|
-
end
|
25
|
-
|
26
|
-
protected
|
27
|
-
|
28
|
-
def assert_default_score(scores, low, high)
|
29
|
-
assert scores.size == 1
|
30
|
-
s = scores['urn:xccdf:scoring:default']
|
31
|
-
assert !s.nil?
|
32
|
-
assert s[:system] == 'urn:xccdf:scoring:default'
|
33
|
-
assert low < s[:value]
|
34
|
-
assert s[:value] < high
|
35
|
-
assert s[:max] == 100
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|