foreman_scap_client 0.1.2 → 0.2.0
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 +4 -4
- data/lib/foreman_scap_client/client.rb +8 -0
- data/lib/foreman_scap_client/version.rb +1 -1
- metadata +11 -11
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b28238d64ee3a46f8c5a26d708296465a01f36e4
|
|
4
|
+
data.tar.gz: 55b7c4e5c6f3e409b29e86eb1dfb09ead09a7341
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 50008f95f40178fb2840eaf529f882bbbee3bfe35850fbe364b9b17a73dfc34566d5b97aca5c176c4895420a826f74afc8742024f89115d63077d8621d15e219
|
|
7
|
+
data.tar.gz: aa2121ee4ae12f90d8d6c3305a53719caf1a40d478b628e2cd0fbd86f82e6077f3f411c2c12b90d0b2736495691f39e5c994be2136f7e9e6160f14618a3f2647
|
|
@@ -11,6 +11,7 @@ module ForemanScapClient
|
|
|
11
11
|
class Client
|
|
12
12
|
def run(policy_id)
|
|
13
13
|
@policy_id = policy_id
|
|
14
|
+
ensure_policy_exist
|
|
14
15
|
ensure_scan_file
|
|
15
16
|
Dir.mktmpdir do |dir|
|
|
16
17
|
@tmp_dir = dir
|
|
@@ -117,6 +118,13 @@ module ForemanScapClient
|
|
|
117
118
|
https
|
|
118
119
|
end
|
|
119
120
|
|
|
121
|
+
def ensure_policy_exist
|
|
122
|
+
if config[@policy_id].nil?
|
|
123
|
+
puts "Policy id #{@policy_id} not found."
|
|
124
|
+
exit(1)
|
|
125
|
+
end
|
|
126
|
+
end
|
|
127
|
+
|
|
120
128
|
def ensure_scan_file
|
|
121
129
|
return if File.exist?(config[@policy_id][:content_path])
|
|
122
130
|
puts "File #{config[@policy_id][:content_path]} is missing. Downloading it from proxy"
|
metadata
CHANGED
|
@@ -1,43 +1,43 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: foreman_scap_client
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Marek Hulan
|
|
8
|
-
- Šimon Lukašík
|
|
8
|
+
- "Šimon Lukašík"
|
|
9
9
|
- Shlomi Zadok
|
|
10
10
|
autorequire:
|
|
11
11
|
bindir: bin
|
|
12
12
|
cert_chain: []
|
|
13
|
-
date:
|
|
13
|
+
date: 2016-09-01 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: bundler
|
|
17
17
|
requirement: !ruby/object:Gem::Requirement
|
|
18
18
|
requirements:
|
|
19
|
-
- - ~>
|
|
19
|
+
- - "~>"
|
|
20
20
|
- !ruby/object:Gem::Version
|
|
21
21
|
version: '1.7'
|
|
22
22
|
type: :development
|
|
23
23
|
prerelease: false
|
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
|
25
25
|
requirements:
|
|
26
|
-
- - ~>
|
|
26
|
+
- - "~>"
|
|
27
27
|
- !ruby/object:Gem::Version
|
|
28
28
|
version: '1.7'
|
|
29
29
|
- !ruby/object:Gem::Dependency
|
|
30
30
|
name: rake
|
|
31
31
|
requirement: !ruby/object:Gem::Requirement
|
|
32
32
|
requirements:
|
|
33
|
-
- - ~>
|
|
33
|
+
- - "~>"
|
|
34
34
|
- !ruby/object:Gem::Version
|
|
35
35
|
version: '10.0'
|
|
36
36
|
type: :development
|
|
37
37
|
prerelease: false
|
|
38
38
|
version_requirements: !ruby/object:Gem::Requirement
|
|
39
39
|
requirements:
|
|
40
|
-
- - ~>
|
|
40
|
+
- - "~>"
|
|
41
41
|
- !ruby/object:Gem::Version
|
|
42
42
|
version: '10.0'
|
|
43
43
|
description: Client script that runs openscap scan and uploads the result to foreman
|
|
@@ -68,18 +68,18 @@ require_paths:
|
|
|
68
68
|
- lib
|
|
69
69
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
70
70
|
requirements:
|
|
71
|
-
- -
|
|
71
|
+
- - ">="
|
|
72
72
|
- !ruby/object:Gem::Version
|
|
73
73
|
version: '0'
|
|
74
74
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
75
75
|
requirements:
|
|
76
|
-
- -
|
|
76
|
+
- - ">="
|
|
77
77
|
- !ruby/object:Gem::Version
|
|
78
78
|
version: '0'
|
|
79
79
|
requirements:
|
|
80
|
-
- /usr/bin/bzip2
|
|
80
|
+
- "/usr/bin/bzip2"
|
|
81
81
|
rubyforge_project:
|
|
82
|
-
rubygems_version: 2.
|
|
82
|
+
rubygems_version: 2.4.6
|
|
83
83
|
signing_key:
|
|
84
84
|
specification_version: 4
|
|
85
85
|
summary: Client script that runs openscap scan and uploads the result to foreman proxy
|