newrelic_security 0.4.0 → 0.4.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
- data/.github/workflows/pr_ci.yml +2 -2
- data/.rubocop_todo.yml +165 -199
- data/CHANGELOG.md +4 -0
- data/Gemfile_test +1 -0
- data/lib/newrelic_security/instrumentation-security/pg/instrumentation.rb +1 -1
- data/lib/newrelic_security/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7aa76050ffc7e2a0a2b653877a2a4c4628e629030db40ef15a8ae299caa0104a
|
|
4
|
+
data.tar.gz: 24579913bd55a4a3b6291c93024dc01db9527e2f7f1b53458a8f711b092588b0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 97dcd089189944dbaaa3608e49cf1fd02d7f243d968fc20df8d0c2f2b2982964e10397dca13de1a3ed8c8e6bf136e4ce55c8f7d3b0e4f17b88be681eaedb5142
|
|
7
|
+
data.tar.gz: c56816bc316664b08b5f3934022d91b85e29c3cbb2dc9669efc33d3daa4b18d09f398fa47e76307e48c71a32c23c15fa694d66759b9e97f219558a9b54757469
|
data/.github/workflows/pr_ci.yml
CHANGED
data/.rubocop_todo.yml
CHANGED
|
@@ -1,19 +1,11 @@
|
|
|
1
1
|
# This configuration was generated by
|
|
2
|
-
# `rubocop --auto-gen-config`
|
|
3
|
-
#
|
|
2
|
+
# `rubocop --auto-gen-config --no-auto-gen-timestamp`
|
|
3
|
+
# using RuboCop version 1.49.0.
|
|
4
4
|
# The point is for the user to remove these configuration records
|
|
5
5
|
# one by one as the offenses are removed from the code base.
|
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
|
7
7
|
# versions of RuboCop, may require this file to be generated again.
|
|
8
8
|
|
|
9
|
-
# Offense count: 5
|
|
10
|
-
# Configuration parameters: EnforcedStyle, AllowedGems, Include.
|
|
11
|
-
# SupportedStyles: Gemfile, gems.rb, gemspec
|
|
12
|
-
# Include: **/*.gemspec, **/Gemfile, **/gems.rb
|
|
13
|
-
Gemspec/DevelopmentDependencies:
|
|
14
|
-
Exclude:
|
|
15
|
-
- 'newrelic_security.gemspec'
|
|
16
|
-
|
|
17
9
|
# Offense count: 1
|
|
18
10
|
# This cop supports safe autocorrection (--autocorrect).
|
|
19
11
|
# Configuration parameters: Severity, Include.
|
|
@@ -59,7 +51,7 @@ Layout/CommentIndentation:
|
|
|
59
51
|
- 'test/newrelic_security/instrumentation-security/net_http/net_http_test.rb'
|
|
60
52
|
- 'test/newrelic_security/instrumentation-security/pg/pg_test.rb'
|
|
61
53
|
|
|
62
|
-
# Offense count:
|
|
54
|
+
# Offense count: 78
|
|
63
55
|
# This cop supports safe autocorrection (--autocorrect).
|
|
64
56
|
Layout/EmptyLineAfterGuardClause:
|
|
65
57
|
Enabled: false
|
|
@@ -78,37 +70,39 @@ Layout/EmptyLineAfterMagicComment:
|
|
|
78
70
|
- 'lib/newrelic_security/instrumentation-security/instrumentation_utils.rb'
|
|
79
71
|
- 'test/simplecov_test_helper.rb'
|
|
80
72
|
|
|
81
|
-
# Offense count:
|
|
73
|
+
# Offense count: 9
|
|
82
74
|
# This cop supports safe autocorrection (--autocorrect).
|
|
83
75
|
# Configuration parameters: EmptyLineBetweenMethodDefs, EmptyLineBetweenClassDefs, EmptyLineBetweenModuleDefs, AllowAdjacentOneLineDefs, NumberOfEmptyLines.
|
|
84
76
|
Layout/EmptyLineBetweenDefs:
|
|
85
77
|
Exclude:
|
|
86
78
|
- 'lib/newrelic_security/instrumentation-security/nokogiri/chain.rb'
|
|
87
79
|
- 'test/helpers/agent_helper.rb'
|
|
80
|
+
- 'test/newrelic_security/instrumentation-security/pg/pg_test.rb'
|
|
88
81
|
- 'test/newrelic_security/instrumentation-security/rails/rails_test.rb'
|
|
89
82
|
|
|
90
83
|
# Offense count: 2
|
|
91
84
|
# This cop supports safe autocorrection (--autocorrect).
|
|
92
85
|
Layout/EmptyLines:
|
|
93
86
|
Exclude:
|
|
94
|
-
- 'lib/newrelic_security/agent/control/iast_client.rb'
|
|
95
87
|
- 'lib/newrelic_security/instrumentation-security/net_http/instrumentation.rb'
|
|
88
|
+
- 'test/newrelic_security/instrumentation-security/pg/pg_test.rb'
|
|
96
89
|
|
|
97
|
-
# Offense count:
|
|
90
|
+
# Offense count: 11
|
|
98
91
|
# This cop supports safe autocorrection (--autocorrect).
|
|
99
92
|
# Configuration parameters: EnforcedStyle.
|
|
100
93
|
# SupportedStyles: empty_lines, no_empty_lines
|
|
101
94
|
Layout/EmptyLinesAroundBlockBody:
|
|
102
95
|
Exclude:
|
|
103
96
|
- 'lib/newrelic_security/instrumentation-security/httpclient/chain.rb'
|
|
104
|
-
- 'lib/newrelic_security/instrumentation-security/mongo/chain.rb'
|
|
105
97
|
- 'lib/newrelic_security/instrumentation-security/pg/chain.rb'
|
|
106
98
|
- 'newrelic_security.gemspec'
|
|
99
|
+
- 'test/newrelic_security/instrumentation-security/active_record/mysql2_adapter/db/schema.rb'
|
|
107
100
|
- 'test/newrelic_security/instrumentation-security/active_record/postgresql_adapter/db/schema.rb'
|
|
108
101
|
- 'test/newrelic_security/instrumentation-security/active_record/sqlite3_adapter/db/schema.rb'
|
|
109
102
|
- 'test/newrelic_security/instrumentation-security/rails/rails_test.rb'
|
|
103
|
+
- 'test/newrelic_security/instrumentation-security/roda/roda_test.rb'
|
|
110
104
|
|
|
111
|
-
# Offense count:
|
|
105
|
+
# Offense count: 51
|
|
112
106
|
# This cop supports safe autocorrection (--autocorrect).
|
|
113
107
|
# Configuration parameters: EnforcedStyle.
|
|
114
108
|
# SupportedStyles: empty_lines, empty_lines_except_namespace, empty_lines_special, no_empty_lines, beginning_only, ending_only
|
|
@@ -121,32 +115,18 @@ Layout/EmptyLinesAroundMethodBody:
|
|
|
121
115
|
Exclude:
|
|
122
116
|
- 'lib/newrelic_security/agent/control/websocket_client.rb'
|
|
123
117
|
|
|
124
|
-
# Offense count:
|
|
118
|
+
# Offense count: 105
|
|
125
119
|
# This cop supports safe autocorrection (--autocorrect).
|
|
126
120
|
# Configuration parameters: EnforcedStyle.
|
|
127
121
|
# SupportedStyles: empty_lines, empty_lines_except_namespace, empty_lines_special, no_empty_lines
|
|
128
122
|
Layout/EmptyLinesAroundModuleBody:
|
|
129
123
|
Enabled: false
|
|
130
124
|
|
|
131
|
-
# Offense count:
|
|
125
|
+
# Offense count: 53
|
|
132
126
|
# This cop supports safe autocorrection (--autocorrect).
|
|
133
127
|
# Configuration parameters: AllowForAlignment, AllowBeforeTrailingComments, ForceEqualSignAlignment.
|
|
134
128
|
Layout/ExtraSpacing:
|
|
135
|
-
|
|
136
|
-
- 'lib/newrelic_security/agent/control/event.rb'
|
|
137
|
-
- 'lib/newrelic_security/agent/control/exit_event.rb'
|
|
138
|
-
- 'lib/newrelic_security/agent/control/reflected_xss.rb'
|
|
139
|
-
- 'lib/newrelic_security/instrumentation-security/active_record/mysql2_adapter/instrumentation.rb'
|
|
140
|
-
- 'lib/newrelic_security/instrumentation-security/active_record/postgresql_adapter/instrumentation.rb'
|
|
141
|
-
- 'lib/newrelic_security/instrumentation-security/active_record/sqlite3_adapter/instrumentation.rb'
|
|
142
|
-
- 'lib/newrelic_security/instrumentation-security/instrumentation_utils.rb'
|
|
143
|
-
- 'newrelic_security.gemspec'
|
|
144
|
-
- 'test/newrelic_security/instrumentation-security/active_record/postgresql_adapter/postgresql_adapter_test.rb'
|
|
145
|
-
- 'test/newrelic_security/instrumentation-security/active_record/sqlite3_adapter/sqlite3_adapter_test.rb'
|
|
146
|
-
- 'test/newrelic_security/instrumentation-security/mongo/mongo_test.rb'
|
|
147
|
-
- 'test/newrelic_security/instrumentation-security/nokogiri/nokogiri_test.rb'
|
|
148
|
-
- 'test/newrelic_security/instrumentation-security/rails/rails_test.rb'
|
|
149
|
-
- 'test/newrelic_security/instrumentation-security/sinatra/sinatra_test.rb'
|
|
129
|
+
Enabled: false
|
|
150
130
|
|
|
151
131
|
# Offense count: 3
|
|
152
132
|
# This cop supports safe autocorrection (--autocorrect).
|
|
@@ -158,17 +138,14 @@ Layout/FirstArgumentIndentation:
|
|
|
158
138
|
- 'test/newrelic_security/instrumentation-security/active_record/sqlite3_adapter/sqlite3_adapter_test.rb'
|
|
159
139
|
- 'test/newrelic_security/instrumentation-security/net_ldap/net_ldap_test.rb'
|
|
160
140
|
|
|
161
|
-
# Offense count:
|
|
141
|
+
# Offense count: 7
|
|
162
142
|
# This cop supports safe autocorrection (--autocorrect).
|
|
163
143
|
# Configuration parameters: EnforcedStyle, IndentationWidth.
|
|
164
144
|
# SupportedStyles: special_inside_parentheses, consistent, align_braces
|
|
165
145
|
Layout/FirstHashElementIndentation:
|
|
166
146
|
Exclude:
|
|
167
|
-
- 'test/
|
|
168
|
-
- 'test/newrelic_security/instrumentation-security/mongo/mongo_test.rb'
|
|
169
|
-
- 'test/newrelic_security/instrumentation-security/mysql2/mysql2_test.rb'
|
|
147
|
+
- 'test/helpers/database_helper.rb'
|
|
170
148
|
- 'test/newrelic_security/instrumentation-security/net_ldap/net_ldap_test.rb'
|
|
171
|
-
- 'test/newrelic_security/instrumentation-security/pg/pg_test.rb'
|
|
172
149
|
|
|
173
150
|
# Offense count: 8
|
|
174
151
|
# This cop supports safe autocorrection (--autocorrect).
|
|
@@ -182,7 +159,7 @@ Layout/HashAlignment:
|
|
|
182
159
|
- 'test/newrelic_security/instrumentation-security/active_record/sqlite3_adapter/sqlite3_adapter_test.rb'
|
|
183
160
|
- 'test/newrelic_security/instrumentation-security/patron/patron_test.rb'
|
|
184
161
|
|
|
185
|
-
# Offense count:
|
|
162
|
+
# Offense count: 9
|
|
186
163
|
# This cop supports safe autocorrection (--autocorrect).
|
|
187
164
|
# Configuration parameters: EnforcedStyle.
|
|
188
165
|
# SupportedStyles: normal, indented_internal_methods
|
|
@@ -194,7 +171,7 @@ Layout/IndentationConsistency:
|
|
|
194
171
|
- 'test/newrelic_security/instrumentation-security/httpclient/httpclient_test.rb'
|
|
195
172
|
- 'test/newrelic_security/instrumentation-security/net_http/net_http_test.rb'
|
|
196
173
|
|
|
197
|
-
# Offense count:
|
|
174
|
+
# Offense count: 14
|
|
198
175
|
# This cop supports safe autocorrection (--autocorrect).
|
|
199
176
|
# Configuration parameters: IndentationWidth, EnforcedStyle.
|
|
200
177
|
# SupportedStyles: spaces, tabs
|
|
@@ -205,13 +182,13 @@ Layout/IndentationStyle:
|
|
|
205
182
|
- 'test/newrelic_security/instrumentation-security/httpclient/httpclient_test.rb'
|
|
206
183
|
- 'test/newrelic_security/instrumentation-security/net_http/net_http_test.rb'
|
|
207
184
|
|
|
208
|
-
# Offense count:
|
|
185
|
+
# Offense count: 462
|
|
209
186
|
# This cop supports safe autocorrection (--autocorrect).
|
|
210
187
|
# Configuration parameters: Width, AllowedPatterns.
|
|
211
188
|
Layout/IndentationWidth:
|
|
212
189
|
Enabled: false
|
|
213
190
|
|
|
214
|
-
# Offense count:
|
|
191
|
+
# Offense count: 105
|
|
215
192
|
# This cop supports safe autocorrection (--autocorrect).
|
|
216
193
|
# Configuration parameters: AllowDoxygenCommentStyle, AllowGemfileRubyComment.
|
|
217
194
|
Layout/LeadingCommentSpace:
|
|
@@ -225,11 +202,10 @@ Layout/MultilineArrayBraceLayout:
|
|
|
225
202
|
Exclude:
|
|
226
203
|
- 'lib/newrelic_security/instrumentation-security/instrumentation_utils.rb'
|
|
227
204
|
|
|
228
|
-
# Offense count:
|
|
205
|
+
# Offense count: 1
|
|
229
206
|
# This cop supports safe autocorrection (--autocorrect).
|
|
230
207
|
Layout/MultilineBlockLayout:
|
|
231
208
|
Exclude:
|
|
232
|
-
- 'lib/newrelic_security/agent/logging/status_logger.rb'
|
|
233
209
|
- 'lib/newrelic_security/instrumentation-security/curb/instrumentation.rb'
|
|
234
210
|
|
|
235
211
|
# Offense count: 7
|
|
@@ -266,7 +242,7 @@ Layout/SpaceAroundKeyword:
|
|
|
266
242
|
Exclude:
|
|
267
243
|
- 'test/newrelic_security/instrumentation-security/curb/curb_test.rb'
|
|
268
244
|
|
|
269
|
-
# Offense count:
|
|
245
|
+
# Offense count: 442
|
|
270
246
|
# This cop supports safe autocorrection (--autocorrect).
|
|
271
247
|
# Configuration parameters: AllowForAlignment, EnforcedStyleForExponentOperator.
|
|
272
248
|
# SupportedStylesForExponentOperator: space, no_space
|
|
@@ -284,14 +260,18 @@ Layout/SpaceBeforeBlockBraces:
|
|
|
284
260
|
- 'lib/newrelic_security/agent/control/http_context.rb'
|
|
285
261
|
- 'test/newrelic_security/instrumentation-security/curb/curb_test.rb'
|
|
286
262
|
|
|
287
|
-
# Offense count:
|
|
263
|
+
# Offense count: 29
|
|
288
264
|
# This cop supports safe autocorrection (--autocorrect).
|
|
289
265
|
# Configuration parameters: AllowForAlignment.
|
|
290
266
|
Layout/SpaceBeforeFirstArg:
|
|
291
267
|
Exclude:
|
|
268
|
+
- 'test/newrelic_security/instrumentation-security/active_record/mysql2_adapter/mysql2_adapter_test.rb'
|
|
292
269
|
- 'test/newrelic_security/instrumentation-security/active_record/postgresql_adapter/postgresql_adapter_test.rb'
|
|
293
270
|
- 'test/newrelic_security/instrumentation-security/active_record/sqlite3_adapter/sqlite3_adapter_test.rb'
|
|
271
|
+
- 'test/newrelic_security/instrumentation-security/grape/grape_test.rb'
|
|
272
|
+
- 'test/newrelic_security/instrumentation-security/padrino/padrino_test.rb'
|
|
294
273
|
- 'test/newrelic_security/instrumentation-security/rails/rails_test.rb'
|
|
274
|
+
- 'test/newrelic_security/instrumentation-security/roda/roda_test.rb'
|
|
295
275
|
- 'test/newrelic_security/instrumentation-security/sinatra/sinatra_test.rb'
|
|
296
276
|
|
|
297
277
|
# Offense count: 6
|
|
@@ -303,7 +283,7 @@ Layout/SpaceInsideArrayLiteralBrackets:
|
|
|
303
283
|
Exclude:
|
|
304
284
|
- 'test/newrelic_security/instrumentation-security/mongo/mongo_test.rb'
|
|
305
285
|
|
|
306
|
-
# Offense count:
|
|
286
|
+
# Offense count: 6
|
|
307
287
|
# This cop supports safe autocorrection (--autocorrect).
|
|
308
288
|
# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces, SpaceBeforeBlockParameters.
|
|
309
289
|
# SupportedStyles: space, no_space
|
|
@@ -312,10 +292,9 @@ Layout/SpaceInsideBlockBraces:
|
|
|
312
292
|
Exclude:
|
|
313
293
|
- 'lib/newrelic_security/agent/configuration/manager.rb'
|
|
314
294
|
- 'lib/newrelic_security/agent/control/http_context.rb'
|
|
315
|
-
- 'lib/newrelic_security/instrumentation-security/net_http/instrumentation.rb'
|
|
316
295
|
- 'test/newrelic_security/instrumentation-security/io/io_test.rb'
|
|
317
296
|
|
|
318
|
-
# Offense count:
|
|
297
|
+
# Offense count: 479
|
|
319
298
|
# This cop supports safe autocorrection (--autocorrect).
|
|
320
299
|
# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces.
|
|
321
300
|
# SupportedStyles: space, no_space, compact
|
|
@@ -323,12 +302,13 @@ Layout/SpaceInsideBlockBraces:
|
|
|
323
302
|
Layout/SpaceInsideHashLiteralBraces:
|
|
324
303
|
Enabled: false
|
|
325
304
|
|
|
326
|
-
# Offense count:
|
|
305
|
+
# Offense count: 51
|
|
327
306
|
# This cop supports safe autocorrection (--autocorrect).
|
|
328
307
|
# Configuration parameters: EnforcedStyle.
|
|
329
308
|
# SupportedStyles: space, compact, no_space
|
|
330
309
|
Layout/SpaceInsideParens:
|
|
331
310
|
Exclude:
|
|
311
|
+
- 'lib/newrelic_security/agent/control/iast_client.rb'
|
|
332
312
|
- 'lib/newrelic_security/agent/control/reflected_xss.rb'
|
|
333
313
|
- 'newrelic_security.gemspec'
|
|
334
314
|
- 'test/newrelic_security/instrumentation-security/mongo/mongo_test.rb'
|
|
@@ -354,26 +334,25 @@ Layout/SpaceInsideStringInterpolation:
|
|
|
354
334
|
Exclude:
|
|
355
335
|
- 'lib/newrelic_security/instrumentation-security/net_http/instrumentation.rb'
|
|
356
336
|
|
|
357
|
-
# Offense count:
|
|
337
|
+
# Offense count: 108
|
|
358
338
|
# This cop supports safe autocorrection (--autocorrect).
|
|
359
339
|
# Configuration parameters: EnforcedStyle.
|
|
360
340
|
# SupportedStyles: final_newline, final_blank_line
|
|
361
341
|
Layout/TrailingEmptyLines:
|
|
362
342
|
Enabled: false
|
|
363
343
|
|
|
364
|
-
# Offense count:
|
|
344
|
+
# Offense count: 399
|
|
365
345
|
# This cop supports safe autocorrection (--autocorrect).
|
|
366
346
|
# Configuration parameters: AllowInHeredoc.
|
|
367
347
|
Layout/TrailingWhitespace:
|
|
368
348
|
Enabled: false
|
|
369
349
|
|
|
370
|
-
# Offense count:
|
|
350
|
+
# Offense count: 6
|
|
371
351
|
# This cop supports safe autocorrection (--autocorrect).
|
|
372
352
|
Lint/AmbiguousOperatorPrecedence:
|
|
373
353
|
Exclude:
|
|
374
354
|
- 'lib/newrelic_security/agent/control/health_check.rb'
|
|
375
355
|
- 'lib/newrelic_security/agent/control/reflected_xss.rb'
|
|
376
|
-
- 'lib/newrelic_security/agent/logging/status_logger.rb'
|
|
377
356
|
- 'lib/newrelic_security/websocket-client-simple/websocket-ruby/lib/websocket/frame/handler/handler75.rb'
|
|
378
357
|
- 'lib/newrelic_security/websocket-client-simple/websocket-ruby/lib/websocket/handshake/handler/server76.rb'
|
|
379
358
|
|
|
@@ -384,7 +363,12 @@ Lint/AssignmentInCondition:
|
|
|
384
363
|
Exclude:
|
|
385
364
|
- 'lib/newrelic_security/websocket-client-simple/client.rb'
|
|
386
365
|
|
|
387
|
-
# Offense count:
|
|
366
|
+
# Offense count: 1
|
|
367
|
+
Lint/BinaryOperatorWithIdenticalOperands:
|
|
368
|
+
Exclude:
|
|
369
|
+
- 'lib/newrelic_security/agent/control/http_context.rb'
|
|
370
|
+
|
|
371
|
+
# Offense count: 10
|
|
388
372
|
# Configuration parameters: IgnoreLiteralBranches, IgnoreConstantBranches.
|
|
389
373
|
Lint/DuplicateBranch:
|
|
390
374
|
Exclude:
|
|
@@ -410,14 +394,15 @@ Lint/EmptyWhen:
|
|
|
410
394
|
Exclude:
|
|
411
395
|
- 'lib/newrelic_security/agent/control/control_command.rb'
|
|
412
396
|
|
|
413
|
-
# Offense count:
|
|
397
|
+
# Offense count: 86
|
|
414
398
|
# This cop supports safe autocorrection (--autocorrect).
|
|
415
399
|
Lint/EnsureReturn:
|
|
416
400
|
Enabled: false
|
|
417
401
|
|
|
418
|
-
# Offense count:
|
|
402
|
+
# Offense count: 10
|
|
419
403
|
Lint/HashCompareByIdentity:
|
|
420
404
|
Exclude:
|
|
405
|
+
- 'lib/newrelic_security/instrumentation-security/ethon/instrumentation.rb'
|
|
421
406
|
- 'lib/newrelic_security/instrumentation-security/mysql2/instrumentation.rb'
|
|
422
407
|
- 'lib/newrelic_security/instrumentation-security/sqlite3/instrumentation.rb'
|
|
423
408
|
|
|
@@ -432,20 +417,13 @@ Lint/MissingSuper:
|
|
|
432
417
|
Exclude:
|
|
433
418
|
- 'test/newrelic_security/instrumentation-security/rails/rails_test.rb'
|
|
434
419
|
|
|
435
|
-
# Offense count:
|
|
420
|
+
# Offense count: 28
|
|
436
421
|
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
437
422
|
Lint/NonAtomicFileOperation:
|
|
438
423
|
Exclude:
|
|
439
424
|
- 'test/newrelic_security/instrumentation-security/dir/dir_test.rb'
|
|
440
425
|
- 'test/newrelic_security/instrumentation-security/file/file_test.rb'
|
|
441
426
|
- 'test/newrelic_security/instrumentation-security/io/io_test.rb'
|
|
442
|
-
- 'test/newrelic_security/instrumentation-security/pty/pty_test.rb'
|
|
443
|
-
|
|
444
|
-
# Offense count: 1
|
|
445
|
-
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
446
|
-
Lint/NonDeterministicRequireOrder:
|
|
447
|
-
Exclude:
|
|
448
|
-
- 'test/test_helper.rb'
|
|
449
427
|
|
|
450
428
|
# Offense count: 2
|
|
451
429
|
Lint/NonLocalExitFromIterator:
|
|
@@ -465,7 +443,7 @@ Lint/RedundantStringCoercion:
|
|
|
465
443
|
Exclude:
|
|
466
444
|
- 'test/newrelic_security/instrumentation-security/nokogiri/nokogiri_test.rb'
|
|
467
445
|
|
|
468
|
-
# Offense count:
|
|
446
|
+
# Offense count: 30
|
|
469
447
|
Lint/RescueException:
|
|
470
448
|
Exclude:
|
|
471
449
|
- 'lib/newrelic_security/agent/agent.rb'
|
|
@@ -477,113 +455,99 @@ Lint/RescueException:
|
|
|
477
455
|
- 'lib/newrelic_security/agent/control/reflected_xss.rb'
|
|
478
456
|
- 'lib/newrelic_security/agent/control/websocket_client.rb'
|
|
479
457
|
- 'lib/newrelic_security/agent/utils/agent_utils.rb'
|
|
458
|
+
- 'test/newrelic_security/instrumentation-security/async-http/async_http_test.rb'
|
|
480
459
|
|
|
481
460
|
# Offense count: 1
|
|
482
461
|
Lint/SelfAssignment:
|
|
483
462
|
Exclude:
|
|
484
463
|
- 'lib/newrelic_security/agent/control/reflected_xss.rb'
|
|
485
464
|
|
|
486
|
-
# Offense count:
|
|
465
|
+
# Offense count: 8
|
|
487
466
|
# Configuration parameters: AllowComments, AllowNil.
|
|
488
467
|
Lint/SuppressedException:
|
|
489
468
|
Exclude:
|
|
490
469
|
- 'lib/newrelic_security/agent/utils/agent_utils.rb'
|
|
491
|
-
- 'test/
|
|
492
|
-
- 'test/newrelic_security/instrumentation-security/mongo/mongo_test.rb'
|
|
493
|
-
- 'test/newrelic_security/instrumentation-security/mysql2/mysql2_test.rb'
|
|
494
|
-
- 'test/newrelic_security/instrumentation-security/pg/pg_test.rb'
|
|
470
|
+
- 'test/helpers/database_helper.rb'
|
|
495
471
|
|
|
496
|
-
# Offense count:
|
|
472
|
+
# Offense count: 7
|
|
497
473
|
# This cop supports safe autocorrection (--autocorrect).
|
|
498
474
|
Lint/ToJSON:
|
|
499
475
|
Exclude:
|
|
500
476
|
- 'lib/newrelic_security/agent/control/app_info.rb'
|
|
477
|
+
- 'lib/newrelic_security/agent/control/application_url_mappings.rb'
|
|
478
|
+
- 'lib/newrelic_security/agent/control/critical_message.rb'
|
|
501
479
|
- 'lib/newrelic_security/agent/control/event.rb'
|
|
502
480
|
- 'lib/newrelic_security/agent/control/exit_event.rb'
|
|
503
|
-
- 'lib/newrelic_security/agent/control/fuzz_fail_event.rb'
|
|
504
481
|
- 'lib/newrelic_security/agent/control/health_check.rb'
|
|
505
482
|
- 'lib/newrelic_security/agent/control/iast_data_transfer_request.rb'
|
|
506
483
|
|
|
507
|
-
# Offense count:
|
|
484
|
+
# Offense count: 11
|
|
508
485
|
# This cop supports safe autocorrection (--autocorrect).
|
|
509
486
|
# Configuration parameters: IgnoreEmptyBlocks, AllowUnusedKeywordArguments.
|
|
510
487
|
Lint/UnusedBlockArgument:
|
|
511
488
|
Exclude:
|
|
512
489
|
- 'lib/newrelic_security/agent/control/http_context.rb'
|
|
490
|
+
- 'lib/newrelic_security/agent/logging/init_logger.rb'
|
|
491
|
+
- 'lib/newrelic_security/agent/logging/logger.rb'
|
|
513
492
|
- 'lib/newrelic_security/instrumentation-security/curb/instrumentation.rb'
|
|
514
493
|
- 'test/newrelic_security/instrumentation-security/pty/pty_test.rb'
|
|
515
494
|
|
|
516
|
-
# Offense count:
|
|
495
|
+
# Offense count: 46
|
|
517
496
|
# This cop supports safe autocorrection (--autocorrect).
|
|
518
497
|
# Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods, IgnoreNotImplementedMethods.
|
|
519
498
|
Lint/UnusedMethodArgument:
|
|
520
|
-
|
|
521
|
-
- 'lib/newrelic_security/agent/control/collector.rb'
|
|
522
|
-
- 'lib/newrelic_security/instrumentation-security/active_record/mysql2_adapter/instrumentation.rb'
|
|
523
|
-
- 'lib/newrelic_security/instrumentation-security/active_record/postgresql_adapter/instrumentation.rb'
|
|
524
|
-
- 'lib/newrelic_security/instrumentation-security/active_record/sqlite3_adapter/instrumentation.rb'
|
|
525
|
-
- 'lib/newrelic_security/instrumentation-security/curb/instrumentation.rb'
|
|
526
|
-
- 'lib/newrelic_security/instrumentation-security/httpclient/instrumentation.rb'
|
|
527
|
-
- 'lib/newrelic_security/instrumentation-security/instrumentation_loader.rb'
|
|
528
|
-
- 'lib/newrelic_security/instrumentation-security/instrumentation_utils.rb'
|
|
529
|
-
- 'lib/newrelic_security/instrumentation-security/io/instrumentation.rb'
|
|
530
|
-
- 'lib/newrelic_security/instrumentation-security/kernel/instrumentation.rb'
|
|
531
|
-
- 'lib/newrelic_security/instrumentation-security/mysql2/instrumentation.rb'
|
|
532
|
-
- 'lib/newrelic_security/instrumentation-security/pg/instrumentation.rb'
|
|
533
|
-
- 'lib/newrelic_security/instrumentation-security/rails/instrumentation.rb'
|
|
534
|
-
- 'lib/newrelic_security/instrumentation-security/sqlite3/instrumentation.rb'
|
|
535
|
-
- 'test/helpers/event_helper.rb'
|
|
499
|
+
Enabled: false
|
|
536
500
|
|
|
537
|
-
# Offense count:
|
|
538
|
-
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
501
|
+
# Offense count: 21
|
|
539
502
|
Lint/UselessAssignment:
|
|
540
503
|
Exclude:
|
|
504
|
+
- 'lib/newrelic_security/agent/control/collector.rb'
|
|
505
|
+
- 'lib/newrelic_security/agent/control/control_command.rb'
|
|
541
506
|
- 'lib/newrelic_security/agent/control/event_processor.rb'
|
|
542
507
|
- 'lib/newrelic_security/agent/control/iast_client.rb'
|
|
543
508
|
- 'lib/newrelic_security/agent/control/reflected_xss.rb'
|
|
544
|
-
- '
|
|
545
|
-
- 'lib/newrelic_security/instrumentation-security/net_http/instrumentation.rb'
|
|
546
|
-
- 'test/newrelic_security/instrumentation-security/active_record/postgresql_adapter/postgresql_adapter_test.rb'
|
|
547
|
-
- 'test/newrelic_security/instrumentation-security/active_record/sqlite3_adapter/sqlite3_adapter_test.rb'
|
|
509
|
+
- 'test/newrelic_security/instrumentation-security/grape/grape_test.rb'
|
|
548
510
|
- 'test/newrelic_security/instrumentation-security/io/io_test.rb'
|
|
511
|
+
- 'test/newrelic_security/instrumentation-security/padrino/padrino_test.rb'
|
|
512
|
+
- 'test/newrelic_security/instrumentation-security/roda/roda_test.rb'
|
|
549
513
|
|
|
550
|
-
# Offense count:
|
|
514
|
+
# Offense count: 284
|
|
551
515
|
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
|
|
552
516
|
Metrics/AbcSize:
|
|
553
|
-
Max:
|
|
517
|
+
Max: 220
|
|
554
518
|
|
|
555
|
-
# Offense count:
|
|
519
|
+
# Offense count: 9
|
|
556
520
|
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
|
|
557
521
|
# AllowedMethods: refine
|
|
558
522
|
Metrics/BlockLength:
|
|
559
|
-
Max:
|
|
523
|
+
Max: 81
|
|
560
524
|
|
|
561
525
|
# Offense count: 8
|
|
562
526
|
# Configuration parameters: CountBlocks.
|
|
563
527
|
Metrics/BlockNesting:
|
|
564
528
|
Max: 5
|
|
565
529
|
|
|
566
|
-
# Offense count:
|
|
530
|
+
# Offense count: 19
|
|
567
531
|
# Configuration parameters: CountComments, CountAsOne.
|
|
568
532
|
Metrics/ClassLength:
|
|
569
|
-
Max:
|
|
533
|
+
Max: 445
|
|
570
534
|
|
|
571
|
-
# Offense count:
|
|
535
|
+
# Offense count: 43
|
|
572
536
|
# Configuration parameters: AllowedMethods, AllowedPatterns.
|
|
573
537
|
Metrics/CyclomaticComplexity:
|
|
574
538
|
Max: 38
|
|
575
539
|
|
|
576
|
-
# Offense count:
|
|
540
|
+
# Offense count: 251
|
|
577
541
|
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
|
|
578
542
|
Metrics/MethodLength:
|
|
579
|
-
Max:
|
|
543
|
+
Max: 98
|
|
580
544
|
|
|
581
545
|
# Offense count: 10
|
|
582
546
|
# Configuration parameters: CountComments, CountAsOne.
|
|
583
547
|
Metrics/ModuleLength:
|
|
584
548
|
Max: 269
|
|
585
549
|
|
|
586
|
-
# Offense count:
|
|
550
|
+
# Offense count: 38
|
|
587
551
|
# Configuration parameters: AllowedMethods, AllowedPatterns.
|
|
588
552
|
Metrics/PerceivedComplexity:
|
|
589
553
|
Max: 42
|
|
@@ -594,20 +558,31 @@ Minitest/AssertIncludes:
|
|
|
594
558
|
Exclude:
|
|
595
559
|
- 'test/newrelic_security/instrumentation-security/rails/rails_test.rb'
|
|
596
560
|
|
|
597
|
-
# Offense count:
|
|
561
|
+
# Offense count: 25
|
|
598
562
|
# This cop supports safe autocorrection (--autocorrect).
|
|
599
563
|
Minitest/AssertInstanceOf:
|
|
600
564
|
Exclude:
|
|
565
|
+
- 'test/newrelic_security/instrumentation-security/grape/grape_test.rb'
|
|
566
|
+
- 'test/newrelic_security/instrumentation-security/padrino/padrino_test.rb'
|
|
601
567
|
- 'test/newrelic_security/instrumentation-security/rails/rails_test.rb'
|
|
568
|
+
- 'test/newrelic_security/instrumentation-security/roda/roda_test.rb'
|
|
602
569
|
- 'test/newrelic_security/instrumentation-security/sinatra/sinatra_test.rb'
|
|
603
570
|
|
|
571
|
+
# Offense count: 3
|
|
572
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
573
|
+
Minitest/AssertPredicate:
|
|
574
|
+
Exclude:
|
|
575
|
+
- 'test/newrelic_security/instrumentation-security/grape/grape_test.rb'
|
|
576
|
+
- 'test/newrelic_security/instrumentation-security/padrino/padrino_test.rb'
|
|
577
|
+
- 'test/newrelic_security/instrumentation-security/roda/roda_test.rb'
|
|
578
|
+
|
|
604
579
|
# Offense count: 6
|
|
605
580
|
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
606
581
|
Minitest/AssertTruthy:
|
|
607
582
|
Exclude:
|
|
608
583
|
- 'test/newrelic_security/instrumentation-security/kernel/kernel_test.rb'
|
|
609
584
|
|
|
610
|
-
# Offense count:
|
|
585
|
+
# Offense count: 297
|
|
611
586
|
# This cop supports safe autocorrection (--autocorrect).
|
|
612
587
|
Minitest/EmptyLineBeforeAssertionMethods:
|
|
613
588
|
Enabled: false
|
|
@@ -618,9 +593,10 @@ Minitest/LiteralAsActualArgument:
|
|
|
618
593
|
Exclude:
|
|
619
594
|
- 'test/newrelic_security/instrumentation-security/io/io_test.rb'
|
|
620
595
|
|
|
621
|
-
# Offense count:
|
|
596
|
+
# Offense count: 9
|
|
622
597
|
Naming/AccessorMethodName:
|
|
623
598
|
Exclude:
|
|
599
|
+
- 'lib/newrelic_security/agent/control/grpc_context.rb'
|
|
624
600
|
- 'lib/newrelic_security/agent/control/http_context.rb'
|
|
625
601
|
- 'test/helpers/agent_helper.rb'
|
|
626
602
|
- 'test/newrelic_security/instrumentation-security/rails/rails_test.rb'
|
|
@@ -632,34 +608,36 @@ Naming/ConstantName:
|
|
|
632
608
|
- 'lib/newrelic_security/constants.rb'
|
|
633
609
|
|
|
634
610
|
# Offense count: 1
|
|
635
|
-
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
636
611
|
# Configuration parameters: EnforcedStyleForLeadingUnderscores.
|
|
637
612
|
# SupportedStylesForLeadingUnderscores: disallowed, required, optional
|
|
638
613
|
Naming/MemoizedInstanceVariableName:
|
|
639
614
|
Exclude:
|
|
640
615
|
- 'lib/newrelic_security/websocket-client-simple/websocket-ruby/lib/websocket/frame/handler/handler03.rb'
|
|
641
616
|
|
|
642
|
-
# Offense count:
|
|
617
|
+
# Offense count: 16
|
|
643
618
|
# Configuration parameters: EnforcedStyle, AllowedPatterns.
|
|
644
619
|
# SupportedStyles: snake_case, camelCase
|
|
645
620
|
Naming/MethodName:
|
|
646
621
|
Exclude:
|
|
647
622
|
- 'lib/newrelic_security/agent/control/app_info.rb'
|
|
623
|
+
- 'lib/newrelic_security/agent/control/application_runtime_error.rb'
|
|
624
|
+
- 'lib/newrelic_security/agent/control/application_url_mappings.rb'
|
|
625
|
+
- 'lib/newrelic_security/agent/control/critical_message.rb'
|
|
648
626
|
- 'lib/newrelic_security/agent/control/event.rb'
|
|
649
627
|
- 'lib/newrelic_security/agent/control/event_processor.rb'
|
|
650
628
|
- 'lib/newrelic_security/agent/control/exit_event.rb'
|
|
651
|
-
- 'lib/newrelic_security/agent/control/fuzz_fail_event.rb'
|
|
652
629
|
- 'lib/newrelic_security/agent/control/health_check.rb'
|
|
653
630
|
- 'lib/newrelic_security/agent/control/iast_client.rb'
|
|
654
631
|
- 'lib/newrelic_security/agent/control/iast_data_transfer_request.rb'
|
|
655
632
|
- 'lib/newrelic_security/agent/utils/agent_utils.rb'
|
|
656
633
|
- 'test/newrelic_security/instrumentation-security/mongo/mongo_test.rb'
|
|
657
634
|
|
|
658
|
-
# Offense count:
|
|
635
|
+
# Offense count: 8
|
|
659
636
|
# Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
|
|
660
637
|
# AllowedNames: as, at, by, cc, db, id, if, in, io, ip, of, on, os, pp, to
|
|
661
638
|
Naming/MethodParameterName:
|
|
662
639
|
Exclude:
|
|
640
|
+
- 'lib/newrelic_security/parse-cron/cron_parser.rb'
|
|
663
641
|
- 'test/helpers/event_helper.rb'
|
|
664
642
|
|
|
665
643
|
# Offense count: 6
|
|
@@ -677,22 +655,24 @@ Naming/PredicateName:
|
|
|
677
655
|
- 'lib/newrelic_security/agent/utils/agent_utils.rb'
|
|
678
656
|
- 'lib/newrelic_security/newrelic-security-api/api.rb'
|
|
679
657
|
|
|
680
|
-
# Offense count:
|
|
658
|
+
# Offense count: 214
|
|
681
659
|
# This cop supports safe autocorrection (--autocorrect).
|
|
682
660
|
# Configuration parameters: PreferredName.
|
|
683
661
|
Naming/RescuedExceptionsVariableName:
|
|
684
662
|
Enabled: false
|
|
685
663
|
|
|
686
|
-
# Offense count:
|
|
664
|
+
# Offense count: 183
|
|
687
665
|
# Configuration parameters: EnforcedStyle, AllowedIdentifiers, AllowedPatterns.
|
|
688
666
|
# SupportedStyles: snake_case, camelCase
|
|
689
667
|
Naming/VariableName:
|
|
690
668
|
Exclude:
|
|
691
669
|
- 'lib/newrelic_security/agent/control/app_info.rb'
|
|
670
|
+
- 'lib/newrelic_security/agent/control/application_runtime_error.rb'
|
|
671
|
+
- 'lib/newrelic_security/agent/control/application_url_mappings.rb'
|
|
672
|
+
- 'lib/newrelic_security/agent/control/critical_message.rb'
|
|
692
673
|
- 'lib/newrelic_security/agent/control/event.rb'
|
|
693
674
|
- 'lib/newrelic_security/agent/control/event_processor.rb'
|
|
694
675
|
- 'lib/newrelic_security/agent/control/exit_event.rb'
|
|
695
|
-
- 'lib/newrelic_security/agent/control/fuzz_fail_event.rb'
|
|
696
676
|
- 'lib/newrelic_security/agent/control/health_check.rb'
|
|
697
677
|
- 'lib/newrelic_security/agent/control/iast_client.rb'
|
|
698
678
|
- 'lib/newrelic_security/agent/control/iast_data_transfer_request.rb'
|
|
@@ -701,13 +681,14 @@ Naming/VariableName:
|
|
|
701
681
|
- 'test/newrelic_security/instrumentation-security/rails/rails_test.rb'
|
|
702
682
|
- 'test/newrelic_security/instrumentation-security/sinatra/sinatra_test.rb'
|
|
703
683
|
|
|
704
|
-
# Offense count:
|
|
684
|
+
# Offense count: 2
|
|
705
685
|
# Configuration parameters: EnforcedStyle, CheckMethodNames, CheckSymbols, AllowedIdentifiers, AllowedPatterns.
|
|
706
686
|
# SupportedStyles: snake_case, normalcase, non_integer
|
|
707
687
|
# AllowedIdentifiers: capture3, iso8601, rfc1123_date, rfc822, rfc2822, rfc3339, x86_64
|
|
708
688
|
Naming/VariableNumber:
|
|
709
689
|
Exclude:
|
|
710
690
|
- 'lib/newrelic_security/agent/control/app_info.rb'
|
|
691
|
+
- 'test/newrelic_security/instrumentation-security/ethon/ethon_test.rb'
|
|
711
692
|
|
|
712
693
|
# Offense count: 1
|
|
713
694
|
# This cop supports safe autocorrection (--autocorrect).
|
|
@@ -734,7 +715,7 @@ Style/Alias:
|
|
|
734
715
|
Exclude:
|
|
735
716
|
- 'lib/newrelic_security/websocket-client-simple/event_emitter.rb'
|
|
736
717
|
|
|
737
|
-
# Offense count:
|
|
718
|
+
# Offense count: 25
|
|
738
719
|
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
739
720
|
# Configuration parameters: EnforcedStyle.
|
|
740
721
|
# SupportedStyles: always, conditionals
|
|
@@ -743,6 +724,7 @@ Style/AndOr:
|
|
|
743
724
|
- 'lib/newrelic_security/instrumentation-security/active_record/mysql2_adapter/instrumentation.rb'
|
|
744
725
|
- 'lib/newrelic_security/instrumentation-security/active_record/postgresql_adapter/instrumentation.rb'
|
|
745
726
|
- 'lib/newrelic_security/instrumentation-security/active_record/sqlite3_adapter/instrumentation.rb'
|
|
727
|
+
- 'lib/newrelic_security/parse-cron/cron_parser.rb'
|
|
746
728
|
- 'lib/newrelic_security/websocket-client-simple/client.rb'
|
|
747
729
|
|
|
748
730
|
# Offense count: 26
|
|
@@ -758,7 +740,6 @@ Style/BlockDelimiters:
|
|
|
758
740
|
- 'lib/newrelic_security/agent/control/collector.rb'
|
|
759
741
|
- 'lib/newrelic_security/agent/control/event_processor.rb'
|
|
760
742
|
- 'lib/newrelic_security/agent/control/event_subscriber.rb'
|
|
761
|
-
- 'lib/newrelic_security/agent/logging/status_logger.rb'
|
|
762
743
|
- 'lib/newrelic_security/agent/utils/agent_utils.rb'
|
|
763
744
|
- 'lib/newrelic_security/instrumentation-security/active_record/mysql2_adapter/instrumentation.rb'
|
|
764
745
|
- 'lib/newrelic_security/instrumentation-security/active_record/postgresql_adapter/instrumentation.rb'
|
|
@@ -774,30 +755,21 @@ Style/CaseEquality:
|
|
|
774
755
|
Exclude:
|
|
775
756
|
- 'lib/newrelic_security/newrelic-security-api/api.rb'
|
|
776
757
|
|
|
777
|
-
# Offense count:
|
|
758
|
+
# Offense count: 238
|
|
778
759
|
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
779
760
|
# Configuration parameters: EnforcedStyle.
|
|
780
761
|
# SupportedStyles: nested, compact
|
|
781
762
|
Style/ClassAndModuleChildren:
|
|
782
763
|
Enabled: false
|
|
783
764
|
|
|
784
|
-
# Offense count:
|
|
765
|
+
# Offense count: 10
|
|
785
766
|
Style/ClassVars:
|
|
786
767
|
Exclude:
|
|
768
|
+
- 'test/newrelic_security/instrumentation-security/active_record/mysql2_adapter/mysql2_adapter_test.rb'
|
|
787
769
|
- 'test/newrelic_security/instrumentation-security/active_record/postgresql_adapter/postgresql_adapter_test.rb'
|
|
788
|
-
- 'test/newrelic_security/instrumentation-security/active_record/sqlite3_adapter/sqlite3_adapter_test.rb'
|
|
789
|
-
- 'test/newrelic_security/instrumentation-security/curb/curb_test.rb'
|
|
790
|
-
- 'test/newrelic_security/instrumentation-security/dir/dir_test.rb'
|
|
791
|
-
- 'test/newrelic_security/instrumentation-security/file/file_test.rb'
|
|
792
|
-
- 'test/newrelic_security/instrumentation-security/httpclient/httpclient_test.rb'
|
|
793
|
-
- 'test/newrelic_security/instrumentation-security/io/io_test.rb'
|
|
794
|
-
- 'test/newrelic_security/instrumentation-security/kernel/kernel_test.rb'
|
|
795
770
|
- 'test/newrelic_security/instrumentation-security/mongo/mongo_test.rb'
|
|
796
771
|
- 'test/newrelic_security/instrumentation-security/mysql2/mysql2_test.rb'
|
|
797
|
-
- 'test/newrelic_security/instrumentation-security/net_http/net_http_test.rb'
|
|
798
772
|
- 'test/newrelic_security/instrumentation-security/pg/pg_test.rb'
|
|
799
|
-
- 'test/newrelic_security/instrumentation-security/pty/pty_test.rb'
|
|
800
|
-
- 'test/newrelic_security/instrumentation-security/sqlite3/sqlite3_test.rb'
|
|
801
773
|
|
|
802
774
|
# Offense count: 5
|
|
803
775
|
# This cop supports safe autocorrection (--autocorrect).
|
|
@@ -807,7 +779,6 @@ Style/ColonMethodCall:
|
|
|
807
779
|
- 'test/newrelic_security/instrumentation-security/pty/pty_test.rb'
|
|
808
780
|
|
|
809
781
|
# Offense count: 1
|
|
810
|
-
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
811
782
|
Style/CombinableLoops:
|
|
812
783
|
Exclude:
|
|
813
784
|
- 'lib/newrelic_security/websocket-client-simple/event_emitter.rb'
|
|
@@ -820,15 +791,14 @@ Style/CommandLiteral:
|
|
|
820
791
|
Exclude:
|
|
821
792
|
- 'test/newrelic_security/instrumentation-security/kernel/kernel_test.rb'
|
|
822
793
|
|
|
823
|
-
# Offense count:
|
|
794
|
+
# Offense count: 4
|
|
824
795
|
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
825
796
|
Style/CommentedKeyword:
|
|
826
797
|
Exclude:
|
|
827
798
|
- 'lib/newrelic_security/instrumentation-security/active_record/postgresql_adapter/chain.rb'
|
|
828
799
|
- 'lib/newrelic_security/instrumentation-security/active_record/postgresql_adapter/prepend.rb'
|
|
829
|
-
- 'test/newrelic_security/instrumentation-security/rails/rails_test.rb'
|
|
830
800
|
|
|
831
|
-
# Offense count:
|
|
801
|
+
# Offense count: 15
|
|
832
802
|
# This cop supports safe autocorrection (--autocorrect).
|
|
833
803
|
# Configuration parameters: EnforcedStyle, SingleLineConditionsOnly, IncludeTernaryExpressions.
|
|
834
804
|
# SupportedStyles: assign_to_condition, assign_inside_condition
|
|
@@ -837,34 +807,37 @@ Style/ConditionalAssignment:
|
|
|
837
807
|
- 'lib/newrelic_security/instrumentation-security/active_record/mysql2_adapter/instrumentation.rb'
|
|
838
808
|
- 'lib/newrelic_security/instrumentation-security/active_record/postgresql_adapter/instrumentation.rb'
|
|
839
809
|
- 'lib/newrelic_security/instrumentation-security/active_record/sqlite3_adapter/instrumentation.rb'
|
|
810
|
+
- 'test/newrelic_security/instrumentation-security/active_record/mysql2_adapter/mysql2_adapter_test.rb'
|
|
811
|
+
- 'test/newrelic_security/instrumentation-security/active_record/postgresql_adapter/postgresql_adapter_test.rb'
|
|
812
|
+
- 'test/newrelic_security/instrumentation-security/active_record/sqlite3_adapter/sqlite3_adapter_test.rb'
|
|
840
813
|
|
|
841
|
-
# Offense count:
|
|
814
|
+
# Offense count: 4
|
|
842
815
|
# This cop supports safe autocorrection (--autocorrect).
|
|
843
816
|
Style/DefWithParentheses:
|
|
844
817
|
Exclude:
|
|
845
818
|
- 'lib/newrelic_security/agent.rb'
|
|
846
819
|
- 'lib/newrelic_security/agent/control/websocket_client.rb'
|
|
847
|
-
- 'lib/newrelic_security/agent/logging/status_logger.rb'
|
|
848
820
|
- 'lib/newrelic_security/instrumentation-security/instrumentation_loader.rb'
|
|
849
821
|
- 'test/helpers/agent_helper.rb'
|
|
850
822
|
|
|
851
|
-
# Offense count:
|
|
823
|
+
# Offense count: 216
|
|
852
824
|
# Configuration parameters: AllowedConstants.
|
|
853
825
|
Style/Documentation:
|
|
854
826
|
Enabled: false
|
|
855
827
|
|
|
856
|
-
# Offense count:
|
|
828
|
+
# Offense count: 18
|
|
857
829
|
# This cop supports safe autocorrection (--autocorrect).
|
|
858
830
|
Style/EmptyLiteral:
|
|
859
831
|
Exclude:
|
|
860
832
|
- 'lib/newrelic_security/agent/configuration/manager.rb'
|
|
861
833
|
- 'lib/newrelic_security/agent/control/app_info.rb'
|
|
834
|
+
- 'lib/newrelic_security/agent/control/critical_message.rb'
|
|
862
835
|
- 'lib/newrelic_security/agent/control/event.rb'
|
|
863
836
|
- 'lib/newrelic_security/agent/control/health_check.rb'
|
|
864
837
|
- 'lib/newrelic_security/agent/control/http_context.rb'
|
|
838
|
+
- 'lib/newrelic_security/agent/control/iast_data_transfer_request.rb'
|
|
865
839
|
- 'lib/newrelic_security/agent/control/reflected_xss.rb'
|
|
866
840
|
- 'lib/newrelic_security/agent/control/websocket_client.rb'
|
|
867
|
-
- 'lib/newrelic_security/agent/logging/status_logger.rb'
|
|
868
841
|
- 'test/helpers/config_helper.rb'
|
|
869
842
|
|
|
870
843
|
# Offense count: 1
|
|
@@ -875,7 +848,7 @@ Style/EmptyMethod:
|
|
|
875
848
|
Exclude:
|
|
876
849
|
- 'lib/newrelic_security/agent/agent.rb'
|
|
877
850
|
|
|
878
|
-
# Offense count:
|
|
851
|
+
# Offense count: 6
|
|
879
852
|
# This cop supports safe autocorrection (--autocorrect).
|
|
880
853
|
Style/ExpandPathArguments:
|
|
881
854
|
Exclude:
|
|
@@ -890,13 +863,6 @@ Style/ExpandPathArguments:
|
|
|
890
863
|
Style/FetchEnvVar:
|
|
891
864
|
Exclude:
|
|
892
865
|
- 'test/helpers/config_helper.rb'
|
|
893
|
-
- 'test/helpers/instrument_helper.rb'
|
|
894
|
-
|
|
895
|
-
# Offense count: 1
|
|
896
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
897
|
-
Style/FileWrite:
|
|
898
|
-
Exclude:
|
|
899
|
-
- 'lib/newrelic_security/agent/logging/status_logger.rb'
|
|
900
866
|
|
|
901
867
|
# Offense count: 2
|
|
902
868
|
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
@@ -905,40 +871,41 @@ Style/FileWrite:
|
|
|
905
871
|
Style/For:
|
|
906
872
|
Exclude:
|
|
907
873
|
- 'lib/newrelic_security/agent/control/reflected_xss.rb'
|
|
908
|
-
- 'test/
|
|
874
|
+
- 'test/newrelic_security/instrumentation-security/active_record/mysql2_adapter/mysql2_adapter_test.rb'
|
|
909
875
|
|
|
910
|
-
# Offense count:
|
|
876
|
+
# Offense count: 170
|
|
911
877
|
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
912
878
|
# Configuration parameters: EnforcedStyle.
|
|
913
879
|
# SupportedStyles: always, always_true, never
|
|
914
880
|
Style/FrozenStringLiteralComment:
|
|
915
881
|
Enabled: false
|
|
916
882
|
|
|
917
|
-
# Offense count:
|
|
883
|
+
# Offense count: 8
|
|
918
884
|
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
919
885
|
Style/GlobalStdStream:
|
|
920
886
|
Exclude:
|
|
921
887
|
- 'lib/newrelic_security/agent/logging/init_logger.rb'
|
|
922
888
|
- 'lib/newrelic_security/agent/logging/logger.rb'
|
|
923
889
|
|
|
924
|
-
# Offense count:
|
|
890
|
+
# Offense count: 757
|
|
925
891
|
# Configuration parameters: AllowedVariables.
|
|
926
892
|
Style/GlobalVars:
|
|
927
893
|
Enabled: false
|
|
928
894
|
|
|
929
|
-
# Offense count:
|
|
895
|
+
# Offense count: 13
|
|
930
896
|
# This cop supports safe autocorrection (--autocorrect).
|
|
931
897
|
# Configuration parameters: MinBodyLength, AllowConsecutiveConditionals.
|
|
932
898
|
Style/GuardClause:
|
|
933
899
|
Exclude:
|
|
934
900
|
- 'lib/newrelic_security/agent/control/reflected_xss.rb'
|
|
935
901
|
- 'lib/newrelic_security/agent/utils/agent_utils.rb'
|
|
902
|
+
- 'test/newrelic_security/instrumentation-security/active_record/mysql2_adapter/mysql2_adapter_test.rb'
|
|
936
903
|
- 'test/newrelic_security/instrumentation-security/active_record/postgresql_adapter/postgresql_adapter_test.rb'
|
|
937
904
|
- 'test/newrelic_security/instrumentation-security/mongo/mongo_test.rb'
|
|
938
905
|
- 'test/newrelic_security/instrumentation-security/mysql2/mysql2_test.rb'
|
|
939
906
|
- 'test/newrelic_security/instrumentation-security/pg/pg_test.rb'
|
|
940
907
|
|
|
941
|
-
# Offense count:
|
|
908
|
+
# Offense count: 464
|
|
942
909
|
# This cop supports safe autocorrection (--autocorrect).
|
|
943
910
|
# Configuration parameters: EnforcedStyle, EnforcedShorthandSyntax, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols.
|
|
944
911
|
# SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys
|
|
@@ -961,14 +928,13 @@ Style/IfInsideElse:
|
|
|
961
928
|
- 'lib/newrelic_security/instrumentation-security/io/instrumentation.rb'
|
|
962
929
|
- 'lib/newrelic_security/instrumentation-security/kernel/instrumentation.rb'
|
|
963
930
|
|
|
964
|
-
# Offense count:
|
|
931
|
+
# Offense count: 16
|
|
965
932
|
# This cop supports safe autocorrection (--autocorrect).
|
|
966
933
|
Style/IfUnlessModifier:
|
|
967
934
|
Exclude:
|
|
968
935
|
- 'lib/newrelic_security/agent/configuration/manager.rb'
|
|
969
936
|
- 'lib/newrelic_security/agent/control/collector.rb'
|
|
970
937
|
- 'lib/newrelic_security/agent/control/reflected_xss.rb'
|
|
971
|
-
- 'lib/newrelic_security/agent/logging/status_logger.rb'
|
|
972
938
|
- 'lib/newrelic_security/instrumentation-security/instrumentation_utils.rb'
|
|
973
939
|
- 'lib/newrelic_security/websocket-client-simple/client.rb'
|
|
974
940
|
- 'lib/newrelic_security/websocket-client-simple/websocket-ruby/lib/websocket/frame/handler/handler75.rb'
|
|
@@ -987,15 +953,14 @@ Style/IfWithBooleanLiteralBranches:
|
|
|
987
953
|
Style/InfiniteLoop:
|
|
988
954
|
Exclude:
|
|
989
955
|
- 'lib/newrelic_security/agent/control/event_processor.rb'
|
|
990
|
-
- 'test/newrelic_security/instrumentation-security/pty/pty_test.rb'
|
|
991
956
|
|
|
992
|
-
# Offense count:
|
|
957
|
+
# Offense count: 168
|
|
993
958
|
# This cop supports safe autocorrection (--autocorrect).
|
|
994
959
|
# Configuration parameters: AllowedMethods, AllowedPatterns.
|
|
995
960
|
Style/MethodCallWithoutArgsParentheses:
|
|
996
961
|
Enabled: false
|
|
997
962
|
|
|
998
|
-
# Offense count:
|
|
963
|
+
# Offense count: 7
|
|
999
964
|
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
1000
965
|
# Configuration parameters: EnforcedStyle, Autocorrect.
|
|
1001
966
|
# SupportedStyles: module_function, extend_self, forbidden
|
|
@@ -1006,15 +971,16 @@ Style/ModuleFunction:
|
|
|
1006
971
|
- 'lib/newrelic_security/instrumentation-security/instrumentation_loader.rb'
|
|
1007
972
|
- 'lib/newrelic_security/instrumentation-security/instrumentation_utils.rb'
|
|
1008
973
|
- 'test/helpers/agent_helper.rb'
|
|
1009
|
-
- 'test/helpers/
|
|
974
|
+
- 'test/helpers/config_helper.rb'
|
|
975
|
+
- 'test/helpers/database_helper.rb'
|
|
1010
976
|
|
|
1011
|
-
# Offense count:
|
|
977
|
+
# Offense count: 6
|
|
1012
978
|
# This cop supports safe autocorrection (--autocorrect).
|
|
1013
979
|
Style/MultilineIfModifier:
|
|
1014
980
|
Exclude:
|
|
1015
|
-
- 'lib/newrelic_security/agent/logging/status_logger.rb'
|
|
1016
981
|
- 'lib/newrelic_security/agent/utils/agent_utils.rb'
|
|
1017
982
|
- 'lib/newrelic_security/instrumentation-security/instrumentation_utils.rb'
|
|
983
|
+
- 'lib/newrelic_security/instrumentation-security/kernel/prepend.rb'
|
|
1018
984
|
|
|
1019
985
|
# Offense count: 1
|
|
1020
986
|
# This cop supports safe autocorrection (--autocorrect).
|
|
@@ -1022,7 +988,7 @@ Style/MultilineWhenThen:
|
|
|
1022
988
|
Exclude:
|
|
1023
989
|
- 'lib/newrelic_security/websocket-client-simple/websocket-ruby/lib/websocket/frame/handler/handler75.rb'
|
|
1024
990
|
|
|
1025
|
-
# Offense count:
|
|
991
|
+
# Offense count: 27
|
|
1026
992
|
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
1027
993
|
# Configuration parameters: EnforcedStyle.
|
|
1028
994
|
# SupportedStyles: literals, strict
|
|
@@ -1030,13 +996,15 @@ Style/MutableConstant:
|
|
|
1030
996
|
Exclude:
|
|
1031
997
|
- 'lib/newrelic_security/agent/logging/init_logger.rb'
|
|
1032
998
|
- 'lib/newrelic_security/agent/logging/logger.rb'
|
|
1033
|
-
- 'lib/newrelic_security/agent/logging/status_logger.rb'
|
|
1034
999
|
- 'lib/newrelic_security/instrumentation-security/instrumentation_utils.rb'
|
|
1035
1000
|
- 'lib/newrelic_security/instrumentation-security/net_http/instrumentation.rb'
|
|
1001
|
+
- 'lib/newrelic_security/parse-cron/cron_parser.rb'
|
|
1036
1002
|
- 'lib/newrelic_security/version.rb'
|
|
1037
1003
|
- 'lib/newrelic_security/websocket-client-simple/websocket-ruby/lib/websocket/handshake/base.rb'
|
|
1038
1004
|
- 'lib/newrelic_security/websocket-client-simple/websocket-ruby/lib/websocket/handshake/client.rb'
|
|
1039
1005
|
- 'lib/newrelic_security/websocket-client-simple/websocket-ruby/lib/websocket/handshake/server.rb'
|
|
1006
|
+
- 'test/helpers/database_helper.rb'
|
|
1007
|
+
- 'test/newrelic_security/instrumentation-security/curb/curb_test.rb'
|
|
1040
1008
|
|
|
1041
1009
|
# Offense count: 4
|
|
1042
1010
|
# This cop supports safe autocorrection (--autocorrect).
|
|
@@ -1080,13 +1048,12 @@ Style/NilComparison:
|
|
|
1080
1048
|
- 'lib/newrelic_security/agent/control/reflected_xss.rb'
|
|
1081
1049
|
- 'lib/newrelic_security/instrumentation-security/instrumentation_utils.rb'
|
|
1082
1050
|
|
|
1083
|
-
# Offense count:
|
|
1051
|
+
# Offense count: 10
|
|
1084
1052
|
# This cop supports safe autocorrection (--autocorrect).
|
|
1085
1053
|
# Configuration parameters: IncludeSemanticChanges.
|
|
1086
1054
|
Style/NonNilCheck:
|
|
1087
1055
|
Exclude:
|
|
1088
1056
|
- 'lib/newrelic_security/agent/control/reflected_xss.rb'
|
|
1089
|
-
- 'lib/newrelic_security/instrumentation-security/net_http/instrumentation.rb'
|
|
1090
1057
|
|
|
1091
1058
|
# Offense count: 2
|
|
1092
1059
|
# This cop supports safe autocorrection (--autocorrect).
|
|
@@ -1097,16 +1064,17 @@ Style/NumericLiteralPrefix:
|
|
|
1097
1064
|
- 'lib/newrelic_security/agent/configuration/manager.rb'
|
|
1098
1065
|
- 'lib/newrelic_security/agent/utils/agent_utils.rb'
|
|
1099
1066
|
|
|
1100
|
-
# Offense count:
|
|
1067
|
+
# Offense count: 4
|
|
1101
1068
|
# This cop supports safe autocorrection (--autocorrect).
|
|
1102
1069
|
# Configuration parameters: MinDigits, Strict, AllowedNumbers, AllowedPatterns.
|
|
1103
1070
|
Style/NumericLiterals:
|
|
1104
1071
|
Exclude:
|
|
1105
1072
|
- 'lib/newrelic_security/agent/control/iast_client.rb'
|
|
1073
|
+
- 'test/newrelic_security/instrumentation-security/active_record/mysql2_adapter/db/schema.rb'
|
|
1106
1074
|
- 'test/newrelic_security/instrumentation-security/active_record/postgresql_adapter/db/schema.rb'
|
|
1107
1075
|
- 'test/newrelic_security/instrumentation-security/active_record/sqlite3_adapter/db/schema.rb'
|
|
1108
1076
|
|
|
1109
|
-
# Offense count:
|
|
1077
|
+
# Offense count: 8
|
|
1110
1078
|
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
1111
1079
|
# Configuration parameters: EnforcedStyle, AllowedMethods, AllowedPatterns.
|
|
1112
1080
|
# SupportedStyles: predicate, comparison
|
|
@@ -1114,18 +1082,21 @@ Style/NumericPredicate:
|
|
|
1114
1082
|
Exclude:
|
|
1115
1083
|
- 'spec/**/*'
|
|
1116
1084
|
- 'lib/newrelic_security/agent/configuration/manager.rb'
|
|
1117
|
-
- 'lib/newrelic_security/agent/control/
|
|
1085
|
+
- 'lib/newrelic_security/agent/control/http_context.rb'
|
|
1118
1086
|
- 'lib/newrelic_security/agent/control/iast_client.rb'
|
|
1119
1087
|
- 'lib/newrelic_security/agent/control/reflected_xss.rb'
|
|
1088
|
+
- 'lib/newrelic_security/agent/logging/init_logger.rb'
|
|
1089
|
+
- 'lib/newrelic_security/agent/logging/logger.rb'
|
|
1120
1090
|
- 'lib/newrelic_security/instrumentation-security/kernel/instrumentation.rb'
|
|
1121
1091
|
- 'lib/newrelic_security/instrumentation-security/sqlite3/instrumentation.rb'
|
|
1122
1092
|
|
|
1123
|
-
# Offense count:
|
|
1093
|
+
# Offense count: 3
|
|
1124
1094
|
# Configuration parameters: AllowedMethods.
|
|
1125
1095
|
# AllowedMethods: respond_to_missing?
|
|
1126
1096
|
Style/OptionalBooleanParameter:
|
|
1127
1097
|
Exclude:
|
|
1128
1098
|
- 'lib/newrelic_security/agent/control/websocket_client.rb'
|
|
1099
|
+
- 'lib/newrelic_security/parse-cron/cron_parser.rb'
|
|
1129
1100
|
- 'lib/newrelic_security/websocket-client-simple/client.rb'
|
|
1130
1101
|
|
|
1131
1102
|
# Offense count: 1
|
|
@@ -1154,7 +1125,7 @@ Style/PreferredHashMethods:
|
|
|
1154
1125
|
- 'lib/newrelic_security/instrumentation-security/io/instrumentation.rb'
|
|
1155
1126
|
- 'lib/newrelic_security/instrumentation-security/sqlite3/instrumentation.rb'
|
|
1156
1127
|
|
|
1157
|
-
# Offense count:
|
|
1128
|
+
# Offense count: 12
|
|
1158
1129
|
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
1159
1130
|
# Configuration parameters: Methods.
|
|
1160
1131
|
Style/RedundantArgument:
|
|
@@ -1162,11 +1133,11 @@ Style/RedundantArgument:
|
|
|
1162
1133
|
- 'test/newrelic_security/instrumentation-security/active_record/postgresql_adapter/postgresql_adapter_test.rb'
|
|
1163
1134
|
- 'test/newrelic_security/instrumentation-security/active_record/sqlite3_adapter/sqlite3_adapter_test.rb'
|
|
1164
1135
|
|
|
1165
|
-
# Offense count:
|
|
1136
|
+
# Offense count: 3
|
|
1166
1137
|
# This cop supports safe autocorrection (--autocorrect).
|
|
1167
1138
|
Style/RedundantBegin:
|
|
1168
1139
|
Exclude:
|
|
1169
|
-
- '
|
|
1140
|
+
- 'test/helpers/database_helper.rb'
|
|
1170
1141
|
|
|
1171
1142
|
# Offense count: 3
|
|
1172
1143
|
# This cop supports safe autocorrection (--autocorrect).
|
|
@@ -1181,7 +1152,7 @@ Style/RedundantCondition:
|
|
|
1181
1152
|
Exclude:
|
|
1182
1153
|
- 'lib/newrelic_security/agent/control/reflected_xss.rb'
|
|
1183
1154
|
|
|
1184
|
-
# Offense count:
|
|
1155
|
+
# Offense count: 89
|
|
1185
1156
|
# This cop supports safe autocorrection (--autocorrect).
|
|
1186
1157
|
Style/RedundantConstantBase:
|
|
1187
1158
|
Enabled: false
|
|
@@ -1232,12 +1203,13 @@ Style/RedundantReturn:
|
|
|
1232
1203
|
- 'lib/newrelic_security/instrumentation-security/instrumentation_utils.rb'
|
|
1233
1204
|
- 'lib/newrelic_security/websocket-client-simple/client.rb'
|
|
1234
1205
|
- 'test/helpers/agent_helper.rb'
|
|
1235
|
-
- 'test/helpers/event_helper.rb'
|
|
1236
1206
|
|
|
1237
|
-
# Offense count:
|
|
1207
|
+
# Offense count: 20
|
|
1238
1208
|
# This cop supports safe autocorrection (--autocorrect).
|
|
1239
1209
|
Style/RedundantSelf:
|
|
1240
1210
|
Exclude:
|
|
1211
|
+
- 'lib/newrelic_security/instrumentation-security/SecureRandom/instrumentation.rb'
|
|
1212
|
+
- 'lib/newrelic_security/instrumentation-security/active_record/sqlite3_adapter/chain.rb'
|
|
1241
1213
|
- 'lib/newrelic_security/instrumentation-security/curb/instrumentation.rb'
|
|
1242
1214
|
- 'lib/newrelic_security/instrumentation-security/excon/instrumentation.rb'
|
|
1243
1215
|
- 'lib/newrelic_security/instrumentation-security/mysql2/instrumentation.rb'
|
|
@@ -1252,42 +1224,38 @@ Style/RedundantStringEscape:
|
|
|
1252
1224
|
Exclude:
|
|
1253
1225
|
- 'test/newrelic_security/instrumentation-security/kernel/kernel_test.rb'
|
|
1254
1226
|
|
|
1255
|
-
# Offense count:
|
|
1227
|
+
# Offense count: 2
|
|
1256
1228
|
# This cop supports safe autocorrection (--autocorrect).
|
|
1257
1229
|
# Configuration parameters: EnforcedStyle, AllowInnerSlashes.
|
|
1258
1230
|
# SupportedStyles: slashes, percent_r, mixed
|
|
1259
1231
|
Style/RegexpLiteral:
|
|
1260
1232
|
Exclude:
|
|
1261
1233
|
- 'lib/newrelic_security/agent/control/reflected_xss.rb'
|
|
1234
|
+
- 'test/newrelic_security/instrumentation-security/padrino/padrino_test.rb'
|
|
1262
1235
|
|
|
1263
|
-
# Offense count:
|
|
1236
|
+
# Offense count: 195
|
|
1264
1237
|
# This cop supports safe autocorrection (--autocorrect).
|
|
1265
1238
|
# Configuration parameters: EnforcedStyle.
|
|
1266
1239
|
# SupportedStyles: implicit, explicit
|
|
1267
1240
|
Style/RescueStandardError:
|
|
1268
1241
|
Enabled: false
|
|
1269
1242
|
|
|
1270
|
-
# Offense count:
|
|
1243
|
+
# Offense count: 15
|
|
1271
1244
|
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
1272
1245
|
# Configuration parameters: ConvertCodeThatCanStartToReturnNil, AllowedMethods, MaxChainLength.
|
|
1273
1246
|
# AllowedMethods: present?, blank?, presence, try, try!
|
|
1274
1247
|
Style/SafeNavigation:
|
|
1275
1248
|
Exclude:
|
|
1249
|
+
- 'lib/newrelic_security/agent/control/collector.rb'
|
|
1250
|
+
- 'lib/newrelic_security/agent/control/control_command.rb'
|
|
1276
1251
|
- 'lib/newrelic_security/agent/control/reflected_xss.rb'
|
|
1277
1252
|
- 'lib/newrelic_security/agent/control/websocket_client.rb'
|
|
1278
|
-
- 'lib/newrelic_security/agent/logging/status_logger.rb'
|
|
1279
1253
|
- 'lib/newrelic_security/instrumentation-security/io/instrumentation.rb'
|
|
1280
1254
|
- 'lib/newrelic_security/instrumentation-security/mysql2/instrumentation.rb'
|
|
1281
1255
|
- 'lib/newrelic_security/instrumentation-security/pg/instrumentation.rb'
|
|
1282
1256
|
- 'lib/newrelic_security/instrumentation-security/sqlite3/instrumentation.rb'
|
|
1283
1257
|
- 'lib/newrelic_security/websocket-client-simple/client.rb'
|
|
1284
1258
|
|
|
1285
|
-
# Offense count: 2
|
|
1286
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
1287
|
-
Style/SelfAssignment:
|
|
1288
|
-
Exclude:
|
|
1289
|
-
- 'lib/newrelic_security/agent/utils/agent_utils.rb'
|
|
1290
|
-
|
|
1291
1259
|
# Offense count: 1
|
|
1292
1260
|
# This cop supports safe autocorrection (--autocorrect).
|
|
1293
1261
|
# Configuration parameters: AllowAsExpressionSeparator.
|
|
@@ -1311,14 +1279,14 @@ Style/SpecialGlobalVars:
|
|
|
1311
1279
|
- 'lib/newrelic_security/instrumentation-security/kernel/instrumentation.rb'
|
|
1312
1280
|
- 'test/test_helper.rb'
|
|
1313
1281
|
|
|
1314
|
-
# Offense count:
|
|
1282
|
+
# Offense count: 21
|
|
1315
1283
|
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
1316
1284
|
# Configuration parameters: Mode.
|
|
1317
1285
|
Style/StringConcatenation:
|
|
1318
1286
|
Exclude:
|
|
1319
|
-
- 'lib/newrelic_security/agent/logging/status_logger.rb'
|
|
1320
1287
|
- 'lib/newrelic_security/websocket-client-simple/websocket-ruby/lib/websocket/handshake/handler/client.rb'
|
|
1321
1288
|
- 'lib/newrelic_security/websocket-client-simple/websocket-ruby/lib/websocket/handshake/handler/client04.rb'
|
|
1289
|
+
- 'test/newrelic_security/instrumentation-security/active_record/mysql2_adapter/mysql2_adapter_test.rb'
|
|
1322
1290
|
- 'test/newrelic_security/instrumentation-security/active_record/postgresql_adapter/postgresql_adapter_test.rb'
|
|
1323
1291
|
- 'test/newrelic_security/instrumentation-security/active_record/sqlite3_adapter/sqlite3_adapter_test.rb'
|
|
1324
1292
|
- 'test/newrelic_security/instrumentation-security/dir/dir_test.rb'
|
|
@@ -1327,10 +1295,9 @@ Style/StringConcatenation:
|
|
|
1327
1295
|
- 'test/newrelic_security/instrumentation-security/kernel/kernel_test.rb'
|
|
1328
1296
|
- 'test/newrelic_security/instrumentation-security/mongo/mongo_test.rb'
|
|
1329
1297
|
- 'test/newrelic_security/instrumentation-security/nokogiri/nokogiri_test.rb'
|
|
1330
|
-
- 'test/newrelic_security/instrumentation-security/pty/pty_test.rb'
|
|
1331
1298
|
- 'test/newrelic_security/instrumentation-security/sqlite3/sqlite3_test.rb'
|
|
1332
1299
|
|
|
1333
|
-
# Offense count:
|
|
1300
|
+
# Offense count: 1245
|
|
1334
1301
|
# This cop supports safe autocorrection (--autocorrect).
|
|
1335
1302
|
# Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
|
|
1336
1303
|
# SupportedStyles: single_quotes, double_quotes
|
|
@@ -1345,7 +1312,7 @@ Style/StringLiteralsInInterpolation:
|
|
|
1345
1312
|
Exclude:
|
|
1346
1313
|
- 'lib/newrelic_security/agent/utils/agent_utils.rb'
|
|
1347
1314
|
|
|
1348
|
-
# Offense count:
|
|
1315
|
+
# Offense count: 3
|
|
1349
1316
|
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
1350
1317
|
# Configuration parameters: AllowMethodsWithArguments, AllowedMethods, AllowedPatterns, AllowComments.
|
|
1351
1318
|
# AllowedMethods: define_method
|
|
@@ -1353,7 +1320,6 @@ Style/SymbolProc:
|
|
|
1353
1320
|
Exclude:
|
|
1354
1321
|
- 'lib/newrelic_security/agent/configuration/manager.rb'
|
|
1355
1322
|
- 'lib/newrelic_security/agent/control/collector.rb'
|
|
1356
|
-
- 'lib/newrelic_security/instrumentation-security/net_http/instrumentation.rb'
|
|
1357
1323
|
|
|
1358
1324
|
# Offense count: 1
|
|
1359
1325
|
# This cop supports safe autocorrection (--autocorrect).
|
|
@@ -1383,14 +1349,14 @@ Style/UnpackFirst:
|
|
|
1383
1349
|
- 'lib/newrelic_security/websocket-client-simple/websocket-ruby/lib/websocket/frame/handler/handler03.rb'
|
|
1384
1350
|
- 'lib/newrelic_security/websocket-client-simple/websocket-ruby/lib/websocket/frame/handler/handler07.rb'
|
|
1385
1351
|
|
|
1386
|
-
# Offense count:
|
|
1352
|
+
# Offense count: 3
|
|
1387
1353
|
# This cop supports safe autocorrection (--autocorrect).
|
|
1388
1354
|
Style/WhileUntilDo:
|
|
1389
1355
|
Exclude:
|
|
1390
1356
|
- 'lib/newrelic_security/agent/control/event_processor.rb'
|
|
1391
1357
|
- 'lib/newrelic_security/websocket-client-simple/client.rb'
|
|
1392
1358
|
|
|
1393
|
-
# Offense count:
|
|
1359
|
+
# Offense count: 11
|
|
1394
1360
|
# This cop supports safe autocorrection (--autocorrect).
|
|
1395
1361
|
# Configuration parameters: WordRegex.
|
|
1396
1362
|
# SupportedStyles: percent, brackets
|
|
@@ -1398,17 +1364,17 @@ Style/WordArray:
|
|
|
1398
1364
|
EnforcedStyle: percent
|
|
1399
1365
|
MinSize: 5
|
|
1400
1366
|
|
|
1401
|
-
# Offense count:
|
|
1367
|
+
# Offense count: 3
|
|
1402
1368
|
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
1403
1369
|
Style/ZeroLengthPredicate:
|
|
1404
1370
|
Exclude:
|
|
1405
|
-
- 'lib/newrelic_security/agent/control/
|
|
1371
|
+
- 'lib/newrelic_security/agent/control/http_context.rb'
|
|
1406
1372
|
- 'lib/newrelic_security/instrumentation-security/sqlite3/instrumentation.rb'
|
|
1407
1373
|
- 'lib/newrelic_security/websocket-client-simple/websocket-ruby/lib/websocket/frame/handler/handler75.rb'
|
|
1408
1374
|
|
|
1409
|
-
# Offense count:
|
|
1375
|
+
# Offense count: 697
|
|
1410
1376
|
# This cop supports safe autocorrection (--autocorrect).
|
|
1411
1377
|
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns.
|
|
1412
1378
|
# URISchemes: http, https
|
|
1413
1379
|
Layout/LineLength:
|
|
1414
|
-
Max:
|
|
1380
|
+
Max: 330
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# New Relic Ruby Security Agent Release Notes
|
|
2
2
|
|
|
3
|
+
## v0.4.1
|
|
4
|
+
|
|
5
|
+
- Bugfix: Fix for potential SQL injection in the pg exec_prepared statement-name lookup, flagged by CodeQL as rb/shell-command-constructed-from-input [PR#167](https://github.com/newrelic/csec-ruby-agent/pull/167)
|
|
6
|
+
|
|
3
7
|
## v0.4.0
|
|
4
8
|
|
|
5
9
|
Version 0.4.0 introuduces Rack framework support, GraphQL support & CI/CD integration as part of security. Updated json_version: **1.2.9**
|
data/Gemfile_test
CHANGED
|
@@ -75,7 +75,7 @@ module NewRelic::Security
|
|
|
75
75
|
NewRelic::Security::Agent.logger.debug "OnEnter : #{self.class}.#{__method__}"
|
|
76
76
|
hash = {}
|
|
77
77
|
hash[:sql] = NewRelic::Security::Agent::Control::HTTPContext.get_context.cache[args[0].to_s] if NewRelic::Security::Agent::Control::HTTPContext.get_context
|
|
78
|
-
hash[:sql] = self.exec("select statement from pg_prepared_statements where name =
|
|
78
|
+
hash[:sql] = self.exec("select statement from pg_prepared_statements where name = #{escape_literal(args[0].to_s)}").getvalue(0,0) unless hash[:sql]
|
|
79
79
|
hash[:parameters] = args[1].map(&:to_s)
|
|
80
80
|
event = NewRelic::Security::Agent::Control::Collector.collect(SQL_DB_COMMAND, [hash], POSTGRES) unless NewRelic::Security::Instrumentation::InstrumentationUtils.sql_filter_events?(hash[:sql])
|
|
81
81
|
NewRelic::Security::Agent::Control::HTTPContext.get_context.cache.delete(args[0].to_s) if NewRelic::Security::Agent::Control::HTTPContext.get_context
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: newrelic_security
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.4.
|
|
4
|
+
version: 0.4.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Prateek Sen
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2026-08-04 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: newrelic_rpm
|