chelsea 0.0.28 → 0.0.29

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1d6bcb375015c64ae7e452f93e38b10cfabb4ecbc9425fad0121e926a0148efa
4
- data.tar.gz: f1a171d3a72a0bf910ac4e22258cee6a0d6c3e8181307856a34a5b22ca0435c7
3
+ metadata.gz: 6d0d6459a288c51263c75bc0d0d1c114dbbe957b4ea5ab8cd3cda28da1963085
4
+ data.tar.gz: f9fd826b3d99f646d4f15f163bb4c532219889a6c753a61fa6d78398f36d57e7
5
5
  SHA512:
6
- metadata.gz: decb1e4e8a54798161b2e888e1694d9558ba0bbacd6708c6cf32d4b71b32cb05520f017733a18e90dab99c0e2e2be500d3c8b8701b1ff464041ad63ab89ffa74
7
- data.tar.gz: 94f91e9b3f248d7a3c494fdba567f832edf38b2e91e75f791ac1d9dace17b285e89d09c43bae25d6faacd0b2a76e5a4bb211acb3153dfc57ea4b581243f5d8d1
6
+ metadata.gz: bc23b614556a27acbbef2cd46da6433418b3db05e31ca23f8a0c7324c9a0bc5ba8c42983a53e04eb177a9ee4134b13fe9707c187e6894364462cdd52ded65339
7
+ data.tar.gz: 4adfafe26cc352759066b6b1dc8b758118dbcdf6cd5e8b555ea67a9ab23b5b40c8a2c7864dd03f1077ad8356e8442d9e2a3d4e0b9da4175fdc4bc3313dff3428
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- chelsea (0.0.27)
4
+ chelsea (0.0.28)
5
5
  bundler (>= 1.2.0, < 3)
6
6
  ox (~> 2.13.2)
7
7
  pastel (~> 0.7.2)
@@ -23,18 +23,18 @@ GEM
23
23
  diff-lcs (1.3)
24
24
  domain_name (0.5.20190701)
25
25
  unf (>= 0.0.5, < 1.0.0)
26
- equatable (0.6.1)
26
+ equatable (0.7.0)
27
27
  hashdiff (1.0.1)
28
28
  http-cookie (1.0.3)
29
29
  domain_name (~> 0.5)
30
30
  mime-types (3.3.1)
31
31
  mime-types-data (~> 3.2015)
32
- mime-types-data (3.2020.0512)
33
- necromancer (0.6.0)
32
+ mime-types-data (3.2021.0225)
33
+ necromancer (0.7.0)
34
34
  netrc (0.11.0)
35
35
  ox (2.13.4)
36
36
  parallel (1.20.1)
37
- parser (3.0.0.0)
37
+ parser (3.0.1.0)
38
38
  ast (~> 2.4.1)
39
39
  pastel (0.7.4)
40
40
  equatable (~> 0.6)
@@ -42,12 +42,12 @@ GEM
42
42
  public_suffix (4.0.3)
43
43
  rainbow (3.0.0)
44
44
  rake (12.3.3)
45
- regexp_parser (2.0.3)
45
+ regexp_parser (2.1.1)
46
46
  rest-client (2.0.2)
47
47
  http-cookie (>= 1.0.2, < 2.0)
48
48
  mime-types (>= 1.16, < 4.0)
49
49
  netrc (~> 0.8)
50
- rexml (3.2.4)
50
+ rexml (3.2.5)
51
51
  rspec (3.9.0)
52
52
  rspec-core (~> 3.9.0)
53
53
  rspec-expectations (~> 3.9.0)
@@ -63,7 +63,7 @@ GEM
63
63
  rspec-support (3.9.2)
64
64
  rspec_junit_formatter (0.4.1)
65
65
  rspec-core (>= 2, < 4, != 2.12.0)
66
- rubocop (1.9.0)
66
+ rubocop (1.12.1)
67
67
  parallel (~> 1.10)
68
68
  parser (>= 3.0.0.0)
69
69
  rainbow (>= 2.2.2, < 4.0)
@@ -82,7 +82,7 @@ GEM
82
82
  unicode-display_width (~> 1.5)
83
83
  unicode_utils (~> 1.4)
84
84
  strings-ansi (0.2.0)
85
- tty-color (0.5.2)
85
+ tty-color (0.6.0)
86
86
  tty-cursor (0.7.1)
87
87
  tty-font (0.5.0)
88
88
  tty-screen (0.8.1)
data/README.md CHANGED
@@ -179,6 +179,261 @@ To avoid performing a release after a commit to the `master` branch, be sure you
179
179
 
180
180
  One of the awesome developers at Sonatype was thinking of names, and came upon the [Chelsea filter](https://en.wikipedia.org/wiki/Chelsea_filter). A Chelsea filter is used to separate gemstones, helping gemologists distinguish between real emeralds, and just regular green glass. We felt this tool helps you do something very similar, looking at your RubyGems, and seeing which are pristine, and which are less than ok at the moment.
181
181
 
182
+ ## How to Fix Vulnerabilities
183
+
184
+ So you've found a vulnerability. Now what? The best case is to upgrade the vulnerable component to a newer/non-vulnerable
185
+ version. However, it is likely the vulnerable component is not a direct dependency, but instead is a transitive dependency
186
+ (a dependency of a dependency, of a dependency, wash-rinse-repeat). In such a case, the first step is to figure out which
187
+ direct dependency (and sub-dependencies) depend on the vulnerable component.
188
+
189
+ The `gem dependency` command will show a dependency tree for all gems from the current Gemfile with their dependencies.
190
+ The `bundle outdated` command will show a list of all gems which have newer versions.
191
+
192
+ As an example, suppose we've learned that component `rexml`, version 3.2.4 is vulnerable (CVE-2021-28965).
193
+ Use the following command to determine which components depend on `rexml`.
194
+ ```shell
195
+ $ gem dependency -R rexml
196
+ Gem rexml-3.1.9
197
+ bundler (>= 0, development)
198
+ rake (>= 0, development)
199
+ Used by
200
+ rubocop-1.9.0 (rexml (>= 0))
201
+
202
+ Gem rexml-3.2.4
203
+ bundler (>= 0, development)
204
+ rake (>= 0, development)
205
+ Used by
206
+ rubocop-1.9.0 (rexml (>= 0))
207
+ ```
208
+
209
+ There are a number of approaches to resolving the vulnerability, but no matter which approach you choose, you should
210
+ probably make sure all the tests are passing before making any dependency changes.
211
+ ```shell
212
+ bundle exec rspec
213
+ ...
214
+ Finished in 0.1411 seconds (files took 0.67222 seconds to load)
215
+ 22 examples, 0 failures
216
+ ```
217
+
218
+ One approach is to upgrade everything to the latest version available. This solution might make people nervous about
219
+ introducing breaking changes. (You have unit tested everything right? ;) )
220
+ <details>
221
+ <summary>Click to expand output of command:
222
+
223
+ ```shell
224
+ $ bundle update
225
+ ```
226
+ </summary>
227
+
228
+ ```shell
229
+ $ bundle update
230
+ Fetching gem metadata from https://rubygems.org/.........
231
+ Fetching gem metadata from https://rubygems.org/.
232
+ Resolving dependencies...
233
+ Using rake 12.3.3
234
+ Using public_suffix 4.0.6 (was 4.0.3)
235
+ Using addressable 2.7.0
236
+ Using ast 2.4.2
237
+ Using bundler 2.1.4
238
+ Using byebug 11.1.3 (was 11.1.2)
239
+ Using ox 2.13.4
240
+ Using equatable 0.7.0 (was 0.6.1)
241
+ Using tty-color 0.6.0 (was 0.5.2)
242
+ Using pastel 0.7.4
243
+ Using unf_ext 0.0.7.7
244
+ Using unf 0.1.4
245
+ Using domain_name 0.5.20190701
246
+ Using http-cookie 1.0.3
247
+ Using mime-types-data 3.2021.0225 (was 3.2020.0512)
248
+ Using mime-types 3.3.1
249
+ Using netrc 0.11.0
250
+ Using rest-client 2.0.2
251
+ Using slop 4.8.2
252
+ Using tty-font 0.5.0
253
+ Using tty-cursor 0.7.1
254
+ Using tty-spinner 0.9.3
255
+ Using necromancer 0.7.0 (was 0.6.0)
256
+ Using strings-ansi 0.2.0
257
+ Using unicode-display_width 1.7.0
258
+ Using unicode_utils 1.4.0
259
+ Using strings 0.1.8
260
+ Using tty-screen 0.8.1
261
+ Using tty-table 0.11.0
262
+ Using chelsea 0.0.28 (was 0.0.27) from source at `.`
263
+ Using rexml 3.2.5 (was 3.2.4)
264
+ Using crack 0.4.5 (was 0.4.3)
265
+ Using diff-lcs 1.4.4 (was 1.3)
266
+ Using hashdiff 1.0.1
267
+ Using parallel 1.20.1
268
+ Using parser 3.0.1.0 (was 3.0.0.0)
269
+ Using rainbow 3.0.0
270
+ Using regexp_parser 2.1.1 (was 2.0.3)
271
+ Using rspec-support 3.10.2 (was 3.9.2)
272
+ Using rspec-core 3.10.1 (was 3.9.1)
273
+ Using rspec-expectations 3.10.1 (was 3.9.1)
274
+ Using rspec-mocks 3.10.2 (was 3.9.1)
275
+ Using rspec 3.10.0 (was 3.9.0)
276
+ Using rspec_junit_formatter 0.4.1
277
+ Using rubocop-ast 1.4.1
278
+ Using ruby-progressbar 1.11.0
279
+ Using rubocop 1.12.1 (was 1.9.0)
280
+ Using webmock 3.8.3
281
+ Bundle updated!
282
+ Gems in the group production were not updated.
283
+ ```
284
+ </details>
285
+
286
+ Perhaps a more palatable approach would be to upgrade to a newer version of the "Used by" component, meaning you upgrade
287
+ the direct dependency (`rubocop`) to a version that does not depend on a vulnerable version of the transitive dependency
288
+ (`rexml`). This approach will make fewer changes overall.
289
+
290
+ In our example, there is a newer version of the direct dependency available:
291
+ ```shell
292
+ $ bundle outdated | grep rubocop
293
+ * rubocop (newest 1.12.1, installed 1.9.0) in group "default"
294
+ ```
295
+ Now we can update the `rubocop` component as follows:
296
+ <details>
297
+ <summary>Click to expand output of command:
298
+
299
+ ```shell
300
+ $ bundle update rubocop
301
+ ```
302
+ </summary>
303
+
304
+ ```shell
305
+ $ bundle update rubocop
306
+ Fetching gem metadata from https://rubygems.org/.........
307
+ Fetching gem metadata from https://rubygems.org/.
308
+ Resolving dependencies...
309
+ Using rake 12.3.3
310
+ Fetching public_suffix 4.0.3
311
+ Installing public_suffix 4.0.3
312
+ Using addressable 2.7.0
313
+ Using ast 2.4.2
314
+ Using bundler 2.1.4
315
+ Fetching byebug 11.1.2
316
+ Installing byebug 11.1.2 with native extensions
317
+ Using ox 2.13.4
318
+ Using equatable 0.6.1
319
+ Using tty-color 0.5.2
320
+ Using pastel 0.7.4
321
+ Using unf_ext 0.0.7.7
322
+ Using unf 0.1.4
323
+ Using domain_name 0.5.20190701
324
+ Using http-cookie 1.0.3
325
+ Using mime-types-data 3.2020.0512
326
+ Using mime-types 3.3.1
327
+ Using netrc 0.11.0
328
+ Using rest-client 2.0.2
329
+ Using slop 4.8.2
330
+ Using tty-font 0.5.0
331
+ Using tty-cursor 0.7.1
332
+ Using tty-spinner 0.9.3
333
+ Using necromancer 0.6.0
334
+ Using strings-ansi 0.2.0
335
+ Using unicode-display_width 1.7.0
336
+ Using unicode_utils 1.4.0
337
+ Using strings 0.1.8
338
+ Using tty-screen 0.8.1
339
+ Using tty-table 0.11.0
340
+ Using chelsea 0.0.28 from source at `.`
341
+ Using safe_yaml 1.0.5
342
+ Fetching crack 0.4.3
343
+ Installing crack 0.4.3
344
+ Fetching diff-lcs 1.3
345
+ ```
346
+ </details>
347
+
348
+ Yet another alternative approach is to upgrade the transitive dependency (`rexml` in our example).
349
+
350
+ Use the command below to determine if there is a newer version of the vulnerable component.
351
+ ```shell
352
+ $ bundle outdated | grep rexml
353
+ * rexml (newest 3.2.5, installed 3.2.4)
354
+ ```
355
+ Now we can update the `rexml` component as follows:
356
+ <details>
357
+ <summary>Click to expand output of command:
358
+
359
+ ```shell
360
+ $ bundle update rexml
361
+ ```
362
+ </summary>
363
+
364
+ ```shell
365
+ $ bundle update rexml
366
+ Fetching gem metadata from https://rubygems.org/.........
367
+ Fetching gem metadata from https://rubygems.org/.
368
+ Resolving dependencies...
369
+ Using rake 12.3.3
370
+ Using public_suffix 4.0.3
371
+ Using addressable 2.7.0
372
+ Using ast 2.4.2
373
+ Using bundler 2.1.4
374
+ Using byebug 11.1.2
375
+ Using ox 2.13.4
376
+ Using equatable 0.7.0 (was 0.6.1)
377
+ Using tty-color 0.6.0 (was 0.5.2)
378
+ Using pastel 0.7.4
379
+ Using unf_ext 0.0.7.7
380
+ Using unf 0.1.4
381
+ Using domain_name 0.5.20190701
382
+ Using http-cookie 1.0.3
383
+ Using mime-types-data 3.2021.0225 (was 3.2020.0512)
384
+ Using mime-types 3.3.1
385
+ Using netrc 0.11.0
386
+ Using rest-client 2.0.2
387
+ Using slop 4.8.2
388
+ Using tty-font 0.5.0
389
+ Using tty-cursor 0.7.1
390
+ Using tty-spinner 0.9.3
391
+ Using necromancer 0.7.0 (was 0.6.0)
392
+ Using strings-ansi 0.2.0
393
+ Using unicode-display_width 1.7.0
394
+ Using unicode_utils 1.4.0
395
+ Using strings 0.1.8
396
+ Using tty-screen 0.8.1
397
+ Using tty-table 0.11.0
398
+ Using chelsea 0.0.28 (was 0.0.27) from source at `.`
399
+ Using safe_yaml 1.0.5
400
+ Using crack 0.4.3
401
+ Using diff-lcs 1.3
402
+ Using hashdiff 1.0.1
403
+ Using parallel 1.20.1
404
+ Using parser 3.0.0.0
405
+ Using rainbow 3.0.0
406
+ Using regexp_parser 2.0.3
407
+ Using rexml 3.2.5 (was 3.2.4)
408
+ Using rspec-support 3.9.2
409
+ Using rspec-core 3.9.1
410
+ Using rspec-expectations 3.9.1
411
+ Using rspec-mocks 3.9.1
412
+ Using rspec 3.9.0
413
+ Using rspec_junit_formatter 0.4.1
414
+ Using rubocop-ast 1.4.1
415
+ Using ruby-progressbar 1.11.0
416
+ Using rubocop 1.9.0
417
+ Using webmock 3.8.3
418
+ Bundle updated!
419
+ Gems in the group production were not updated.
420
+ ```
421
+ </details>
422
+
423
+ Regardless of which approach you choose, you should verify the tests pass after you upgrade dependencies.
424
+ ```shell
425
+ bundle exec rspec
426
+ ...
427
+ Finished in 0.12826 seconds (files took 0.5069 seconds to load)
428
+ 22 examples, 0 failures
429
+ ```
430
+ Full disclosure, it turns out that after upgrading `rubocop` (via: `bundle update rubocop`),
431
+ a `# rubocop:disable Layout/LineLength` was no longer needed.
432
+ Happily, the CI test suite failed and pointed quickly to the fix (just needed to remove `# rubocop`
433
+ disable/enable comments).
434
+
435
+ Victory! Commit the changes, and we're done. (see [PR: #44](https://github.com/sonatype-nexus-community/chelsea/pull/44))
436
+
182
437
  ## Contributing
183
438
 
184
439
  We care a lot about making the world a safer place, and that's why we created `chelsea`. If you as well want to speed up the pace of software development by working on this project, jump on in! Before you start work, create a new issue, or comment on an existing issue, to let others know you are!
@@ -17,5 +17,5 @@
17
17
  #
18
18
 
19
19
  module Chelsea
20
- VERSION = '0.0.28'
20
+ VERSION = '0.0.29'
21
21
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chelsea
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.28
4
+ version: 0.0.29
5
5
  platform: ruby
6
6
  authors:
7
7
  - Allister Beharry
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-01-29 00:00:00.000000000 Z
11
+ date: 2021-04-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler