smart_proxy_openscap 0.6.7 → 0.6.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1d6c00f161b70fbab31c6ccf9c8bdf9ab2682fa3
|
|
4
|
+
data.tar.gz: cbb4bc57214e6f68c19fe30fff5448d188190d7a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: db24f262b735f44a7b60f30ed0b89eeb78cc1b5daaebc14bdae22b663063e8c000dbda9ea5b0d3e6bda081dc67af6bb5d9033930f67c0876dc904074d2fed4f0
|
|
7
|
+
data.tar.gz: c2c87b3bde1eec166aed4c064c52b0beabfb2f366492a1fb3492423f44b78a7398fcbea0fbd261287e8c7e15145b41c7070986214c3b2eb42d332ea7adc88eb6
|
|
@@ -14,8 +14,9 @@ module Proxy
|
|
|
14
14
|
profile_id = policy ? nil : policy
|
|
15
15
|
html = sds.html_guide profile_id
|
|
16
16
|
File.write(out_file, { :html => html.force_encoding('UTF-8') }.to_json)
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
ensure
|
|
18
|
+
sds.destroy if sds
|
|
19
|
+
source.destroy if source
|
|
19
20
|
::OpenSCAP.oscap_cleanup
|
|
20
21
|
end
|
|
21
22
|
end
|
|
@@ -13,22 +13,25 @@ module Proxy
|
|
|
13
13
|
source = ::OpenSCAP::Source.new(in_file)
|
|
14
14
|
json = type == 'scap_content' ? scap_content_profiles(source) : tailoring_profiles(source)
|
|
15
15
|
File.write out_file, json
|
|
16
|
-
|
|
16
|
+
ensure
|
|
17
|
+
source.destroy if source
|
|
17
18
|
::OpenSCAP.oscap_cleanup
|
|
18
19
|
end
|
|
19
20
|
|
|
20
21
|
def scap_content_profiles(source)
|
|
21
22
|
bench = benchmark_profiles source
|
|
22
23
|
profiles = collect_profiles bench
|
|
23
|
-
bench.destroy
|
|
24
24
|
profiles.to_json
|
|
25
|
+
ensure
|
|
26
|
+
bench.destroy if bench
|
|
25
27
|
end
|
|
26
28
|
|
|
27
29
|
def tailoring_profiles(source)
|
|
28
30
|
tailoring = ::OpenSCAP::Xccdf::Tailoring.new(source, nil)
|
|
29
31
|
profiles = collect_profiles tailoring
|
|
30
|
-
tailoring.destroy
|
|
31
32
|
profiles.to_json
|
|
33
|
+
ensure
|
|
34
|
+
tailoring.destroy if tailoring
|
|
32
35
|
end
|
|
33
36
|
|
|
34
37
|
def collect_profiles(profile_source)
|
|
@@ -41,8 +44,8 @@ module Proxy
|
|
|
41
44
|
sds = ::OpenSCAP::DS::Sds.new(source)
|
|
42
45
|
bench_source = sds.select_checklist!
|
|
43
46
|
benchmark = ::OpenSCAP::Xccdf::Benchmark.new(bench_source)
|
|
44
|
-
|
|
45
|
-
|
|
47
|
+
ensure
|
|
48
|
+
sds.destroy if sds
|
|
46
49
|
end
|
|
47
50
|
end
|
|
48
51
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: smart_proxy_openscap
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.6.
|
|
4
|
+
version: 0.6.8
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Šimon Lukašík
|
|
@@ -10,7 +10,7 @@ authors:
|
|
|
10
10
|
autorequire:
|
|
11
11
|
bindir: bin
|
|
12
12
|
cert_chain: []
|
|
13
|
-
date: 2017-
|
|
13
|
+
date: 2017-10-25 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: rake
|