identitynow_rule_validator 1.0.0b → 1.0.1
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
- checksums.yaml.gz.sig +2 -2
- data.tar.gz.sig +0 -0
- data/lib/identitynow_rule_validator.rb +38 -18
- data/lib/rules.json +1 -1
- metadata +21 -8
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 56ffc42be2a9723b22ab7b821476c7f069d19d4f802675697d6768087c11688c
|
|
4
|
+
data.tar.gz: d87cbeb3d869122613243c59bce753370aa472537c7d39d3d9e51667d2c169cd
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 35a340dd16aeaba421f047c212d46959a49d29f828f908e2df1e30c84aef530da6020dbcc3d96175d0fca3c65322769311d553eb3f146b9f5eee9aee92b0bd18
|
|
7
|
+
data.tar.gz: 41b4e435b64a2ddb86245fa48330a46faf13c38280a26d76b2ff82d891c9f851fd7476760e889f7c04b04a0ab5754d91a3602c2c4e0fcf0c772ee64365ee14e8
|
checksums.yaml.gz.sig
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
Q��
|
|
2
|
+
g�#s�����y��랬Э��o�Ja8���'�)���v�q��ׅeG!���U�R�Me�#`J�y/��I�����
|
data.tar.gz.sig
CHANGED
|
Binary file
|
|
@@ -38,6 +38,8 @@ class IdentityNowRuleValidator
|
|
|
38
38
|
|
|
39
39
|
self.report_findings
|
|
40
40
|
|
|
41
|
+
return @@findings
|
|
42
|
+
|
|
41
43
|
end
|
|
42
44
|
|
|
43
45
|
def self.validate_files( files )
|
|
@@ -58,6 +60,8 @@ class IdentityNowRuleValidator
|
|
|
58
60
|
|
|
59
61
|
self.report_findings
|
|
60
62
|
|
|
63
|
+
return @@findings
|
|
64
|
+
|
|
61
65
|
end
|
|
62
66
|
|
|
63
67
|
def self.validate_file( file )
|
|
@@ -70,6 +74,8 @@ class IdentityNowRuleValidator
|
|
|
70
74
|
|
|
71
75
|
self.report_findings
|
|
72
76
|
|
|
77
|
+
return @@findings
|
|
78
|
+
|
|
73
79
|
end
|
|
74
80
|
|
|
75
81
|
private
|
|
@@ -99,7 +105,7 @@ class IdentityNowRuleValidator
|
|
|
99
105
|
#
|
|
100
106
|
# Program Start / Version
|
|
101
107
|
#
|
|
102
|
-
Program.start( "IdentityNow Rule Validator", "Neil McGlennon (neil.mcglennon@sailpoint.com)", "1.0.
|
|
108
|
+
Program.start( "IdentityNow Rule Validator", "Neil McGlennon (neil.mcglennon@sailpoint.com)", "1.0.1", "2020-05-12" )
|
|
103
109
|
|
|
104
110
|
end
|
|
105
111
|
|
|
@@ -143,29 +149,43 @@ class IdentityNowRuleValidator
|
|
|
143
149
|
def self.report_findings
|
|
144
150
|
|
|
145
151
|
#
|
|
146
|
-
#
|
|
152
|
+
# If there are no findings, then we're good. Display a success message.
|
|
147
153
|
#
|
|
148
|
-
@@findings.
|
|
154
|
+
if @@findings.nil? || @@findings.empty?
|
|
149
155
|
|
|
150
|
-
#
|
|
151
|
-
# Output the file header
|
|
152
|
-
#
|
|
153
|
-
if ( finding[:file] != @@previousFile )
|
|
154
|
-
puts File.dirname( finding[:file] ) + "\n"
|
|
155
|
-
puts File.basename( finding[:file] ).bold + "\n\n"
|
|
156
|
-
end
|
|
156
|
+
puts "\n\t#{"Success".green}: No issues found!\n\n"
|
|
157
157
|
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
type = ( finding[:type] == "error" ) ? "Error".red : "Warning".yellow
|
|
163
|
-
puts "\t#{type}: #{finding[:message]}\n\n"
|
|
158
|
+
#
|
|
159
|
+
# We have some findings to show.
|
|
160
|
+
#
|
|
161
|
+
else
|
|
164
162
|
|
|
165
163
|
#
|
|
166
|
-
#
|
|
164
|
+
# Iterate through all of our findings.
|
|
167
165
|
#
|
|
168
|
-
@@
|
|
166
|
+
@@findings.each do |finding|
|
|
167
|
+
|
|
168
|
+
#
|
|
169
|
+
# Output the file header
|
|
170
|
+
#
|
|
171
|
+
if ( finding[:file] != @@previousFile )
|
|
172
|
+
puts File.dirname( finding[:file] ) + "\n"
|
|
173
|
+
puts File.basename( finding[:file] ).bold + "\n\n"
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
#
|
|
177
|
+
# Output the issue
|
|
178
|
+
#
|
|
179
|
+
puts "\tLine #{finding[:line]}: #{finding[:text][0..80].gsub(/\s\w+$/,'...').light_black}"
|
|
180
|
+
type = ( finding[:type] == "error" ) ? "Error".red : "Warning".yellow
|
|
181
|
+
puts "\t#{type}: #{finding[:message]}\n\n"
|
|
182
|
+
|
|
183
|
+
#
|
|
184
|
+
# Set this for the next iteration
|
|
185
|
+
#
|
|
186
|
+
@@previousFile = finding[:file]
|
|
187
|
+
|
|
188
|
+
end
|
|
169
189
|
|
|
170
190
|
end
|
|
171
191
|
|
data/lib/rules.json
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: identitynow_rule_validator
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- neil-mcglennon-sp
|
|
@@ -35,22 +35,36 @@ cert_chain:
|
|
|
35
35
|
KxiqTPt+66S5Zu9TMeBdYHKYzP8OMs2AwIPrSQH1tGxuGdrjvMvRU3XPxEnuJTwE
|
|
36
36
|
1Av2VddcX+awmjPuUJVxXSyVzEbPZg==
|
|
37
37
|
-----END CERTIFICATE-----
|
|
38
|
-
date: 2020-
|
|
38
|
+
date: 2020-05-12 00:00:00.000000000 Z
|
|
39
39
|
dependencies:
|
|
40
|
+
- !ruby/object:Gem::Dependency
|
|
41
|
+
name: colorize
|
|
42
|
+
requirement: !ruby/object:Gem::Requirement
|
|
43
|
+
requirements:
|
|
44
|
+
- - "~>"
|
|
45
|
+
- !ruby/object:Gem::Version
|
|
46
|
+
version: 0.8.1
|
|
47
|
+
type: :runtime
|
|
48
|
+
prerelease: false
|
|
49
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
50
|
+
requirements:
|
|
51
|
+
- - "~>"
|
|
52
|
+
- !ruby/object:Gem::Version
|
|
53
|
+
version: 0.8.1
|
|
40
54
|
- !ruby/object:Gem::Dependency
|
|
41
55
|
name: bundler
|
|
42
56
|
requirement: !ruby/object:Gem::Requirement
|
|
43
57
|
requirements:
|
|
44
58
|
- - "~>"
|
|
45
59
|
- !ruby/object:Gem::Version
|
|
46
|
-
version:
|
|
60
|
+
version: 2.1.4
|
|
47
61
|
type: :development
|
|
48
62
|
prerelease: false
|
|
49
63
|
version_requirements: !ruby/object:Gem::Requirement
|
|
50
64
|
requirements:
|
|
51
65
|
- - "~>"
|
|
52
66
|
- !ruby/object:Gem::Version
|
|
53
|
-
version:
|
|
67
|
+
version: 2.1.4
|
|
54
68
|
- !ruby/object:Gem::Dependency
|
|
55
69
|
name: rake
|
|
56
70
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -90,12 +104,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
90
104
|
version: '0'
|
|
91
105
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
92
106
|
requirements:
|
|
93
|
-
- - "
|
|
107
|
+
- - ">="
|
|
94
108
|
- !ruby/object:Gem::Version
|
|
95
|
-
version:
|
|
109
|
+
version: '0'
|
|
96
110
|
requirements: []
|
|
97
|
-
|
|
98
|
-
rubygems_version: 2.7.6
|
|
111
|
+
rubygems_version: 3.0.3
|
|
99
112
|
signing_key:
|
|
100
113
|
specification_version: 4
|
|
101
114
|
summary: IdentityNow Rule Validator
|
metadata.gz.sig
CHANGED
|
Binary file
|