ruby_audit 2.3.1 → 3.0.0

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: f279cf36dd7235aecac769d5179ac4dd4bd827aeb63091f656a8b28a840856e8
4
- data.tar.gz: f9e74e7dc700d31d521df493659379baf922957c9727f79efb57f9166d95cf64
3
+ metadata.gz: 3c7d4dd1d68e8876981650f3fa3aac753b1ba2c3751da011c1ac3958c7e0bd7d
4
+ data.tar.gz: 964d04790d84d33c9d58ff074ddb259b67b2a95de951b72768a57a571949ab13
5
5
  SHA512:
6
- metadata.gz: d0e764605a9362ba2af5e0ae830625a3496091c00d436fd655c9f582f410a00f5ecf5787bf51c2feb7c460d88bb26564d62baeaaa1c0126936c2c48c6c79828b
7
- data.tar.gz: b0192910cf78633adb5b82a8b5cb9e43b725d3d829c240b6507e583e387f19fd1eb0bd64d317a72fcc571ec9bc1983eb5f37ec85b151c052ba6e6fa781610f37
6
+ metadata.gz: 4201365adab2c239a9d213d938405882a49913f578f89192b280135fc5ea0db9196e9b7b9d1eda0c8f96588a6af753042655fbf8ad117d9a91bd1beaf61b5ef7
7
+ data.tar.gz: 64e180ec574c6f3a9306df3588c926871e736d5279bf1a17fa7eb220d5ebfc92d60f26093dabedb6230a43e27f7da0e290e9889277d4da62e007d90005162750
@@ -12,7 +12,7 @@ jobs:
12
12
  test:
13
13
  strategy:
14
14
  matrix:
15
- ruby_version: [2.5, 2.6, 2.7, '3.0', 3.1, 3.2, 3.3]
15
+ ruby_version: [3.1, 3.2, 3.3, 3.4]
16
16
  runs-on: ubuntu-latest
17
17
  steps:
18
18
  - uses: actions/checkout@v2
@@ -21,8 +21,6 @@ jobs:
21
21
  with:
22
22
  ruby-version: ${{ matrix.ruby_version }}
23
23
  bundler-cache: true
24
- - name: Install dependencies
25
- run: bundle install --jobs=3 --retry=3
26
24
  - name: Initialize submodule
27
25
  run: git submodule update --init
28
26
  - name: Run tests
data/.rubocop.yml CHANGED
@@ -1,8 +1,11 @@
1
1
  AllCops:
2
- TargetRubyVersion: 2.5
2
+ TargetRubyVersion: 3.1
3
3
  NewCops: enable
4
4
  SuggestExtensions: false
5
5
 
6
+ Gemspec/DevelopmentDependencies:
7
+ EnforcedStyle: gemspec
8
+
6
9
  Layout/LineLength:
7
10
  Exclude:
8
11
  - 'ruby_audit.gemspec'
@@ -11,7 +14,7 @@ Metrics/MethodLength:
11
14
  Max: 15
12
15
 
13
16
  Metrics/BlockLength:
14
- IgnoredMethods:
17
+ AllowedMethods:
15
18
  - describe
16
19
 
17
20
  Style/Documentation:
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 3.3.0
1
+ 3.4.1
data/CHANGELOG.md CHANGED
@@ -5,110 +5,123 @@ This project adheres to [Semantic Versioning](http://semver.org/).
5
5
 
6
6
  ## [Unreleased]
7
7
 
8
+ ## 3.0.0 - 2025-01-09
9
+
10
+ ### Changed
11
+
12
+ - Bumped Rubocop dependency to 1.64.0
13
+ - Require MFA for rubygems operations
14
+
15
+ ### Removed
16
+
17
+ - Removed support for Ruby 2.5 through 3.0
18
+ - Removed Timecop dependency
19
+
8
20
  ## [2.3.1] - 2024-05-17
9
21
 
10
22
  ### Removed
11
23
 
12
- * [#34](https://github.com/civisanalytics/ruby_audit/pull/34)
13
- Removed check for stale database that no longer does anything
24
+ - [#34](https://github.com/civisanalytics/ruby_audit/pull/34)
25
+ Removed check for stale database that no longer does anything
14
26
 
15
27
  ### Fixed
16
28
 
17
- * [#35](https://github.com/civisanalytics/ruby_audit/pull/35)
18
- Look for rubygems advisories in the correct directory of the ruby-advisory-db
29
+ - [#35](https://github.com/civisanalytics/ruby_audit/pull/35)
30
+ Look for rubygems advisories in the correct directory of the ruby-advisory-db
19
31
 
20
32
  ## [2.3.0] - 2024-01-10
21
33
 
22
34
  ### Added
23
35
 
24
- * Support for Ruby 3.3
36
+ - Support for Ruby 3.3
25
37
 
26
38
  ## [2.2.0] - 2023-01-05
27
39
 
28
40
  ### Added
29
41
 
30
- * Support for Ruby 3.2
42
+ - Support for Ruby 3.2
31
43
 
32
44
  ## [2.1.0] - 2022-02-23
33
45
 
34
46
  ### Added
35
47
 
36
- * Support for ruby 3.1
37
- * Require bundler-audit >= 0.9
48
+ - Support for ruby 3.1
49
+ - Require bundler-audit >= 0.9
38
50
 
39
51
  ## [2.0.0] - 2021-03-22
40
52
 
41
53
  ### Added
42
54
 
43
- * Require bundler-audit 0.8
44
- * Added Ruby 3.0 to the Travis matrix
55
+ - Require bundler-audit 0.8
56
+ - Added Ruby 3.0 to the Travis matrix
45
57
 
46
58
  ### Removed
47
59
 
48
- * Removed support for bundler-audit 0.7
60
+ - Removed support for bundler-audit 0.7
49
61
 
50
62
  ## [1.3.0] - 2020-07-01
51
63
 
52
64
  ### Added
53
65
 
54
- * Added Ruby 2.5, 2.6, and 2.7 to the Travis matrix
55
- * Added the ability to ignore an advisory by its GHSA identifier
66
+ - Added Ruby 2.5, 2.6, and 2.7 to the Travis matrix
67
+ - Added the ability to ignore an advisory by its GHSA identifier
56
68
 
57
69
  ### Changed
58
70
 
59
- * Bumped the bundler-audit version to 0.7
60
- * Bumped the Ruby version for development to 2.7.1
61
- * Bumped the Pry version for development to 0.13
62
- * Bumped the Rake version for development to 13
63
- * Bumped the Rspec version for development to 3.9
64
- * Bumped the RuboCop version for development to 0.86
65
- * Bumped the Timecop verison for development to 0.9
66
- * RuboCop fixes
71
+ - Bumped the bundler-audit version to 0.7
72
+ - Bumped the Ruby version for development to 2.7.1
73
+ - Bumped the Pry version for development to 0.13
74
+ - Bumped the Rake version for development to 13
75
+ - Bumped the Rspec version for development to 3.9
76
+ - Bumped the RuboCop version for development to 0.86
77
+ - Bumped the Timecop verison for development to 0.9
78
+ - RuboCop fixes
67
79
 
68
80
  ### Removed
69
81
 
70
- * Removed Ruby 2.1 through 2.4 from the Travis matrix
71
- * Removed the explicit Bundler dependency for development, since it is now included with RubyGems
82
+ - Removed Ruby 2.1 through 2.4 from the Travis matrix
83
+ - Removed the explicit Bundler dependency for development, since it is now included with RubyGems
72
84
 
73
85
  ## [1.2.0] - 2017-09-21
74
86
 
75
87
  ### Added
76
88
 
77
- * Added 2.4 to the Travis matrix ([@errm])
89
+ - Added 2.4 to the Travis matrix ([@errm])
78
90
 
79
91
  ### Changed
80
92
 
81
- * Bumped the bundler-audit version to 0.6 ([@errm])
82
- * Bumped the RuboCop version for development to 0.50 ([@errm])
83
- * Bumped the Ruby version for development to 2.4.2 ([@errm])
93
+ - Bumped the bundler-audit version to 0.6 ([@errm])
94
+ - Bumped the RuboCop version for development to 0.50 ([@errm])
95
+ - Bumped the Ruby version for development to 2.4.2 ([@errm])
84
96
 
85
97
  ## [1.1.0] - 2016-09-15
86
98
 
87
99
  ### Added
88
100
 
89
- * Added a matrix build of 2.1, 2.2, and 2.3 to Travis
101
+ - Added a matrix build of 2.1, 2.2, and 2.3 to Travis
90
102
 
91
103
  ### Changed
92
104
 
93
- * Added a [Code of Conduct](CODE_OF_CONDUCT.md)
94
- * Bumped the bundler-audit version to 0.5
95
- * Bumped the RSpec version for development to 3.5
96
- * Bumped the Rake version for development to 11.2
97
- * Bumped the RuboCop version for development to 0.42
98
- * Bumped the Ruby version for development to 2.3.1
105
+ - Added a [Code of Conduct](CODE_OF_CONDUCT.md)
106
+ - Bumped the bundler-audit version to 0.5
107
+ - Bumped the RSpec version for development to 3.5
108
+ - Bumped the Rake version for development to 11.2
109
+ - Bumped the RuboCop version for development to 0.42
110
+ - Bumped the Ruby version for development to 2.3.1
99
111
 
100
112
  ## [1.0.1] - 2016-02-03
101
113
 
102
114
  ### Fixed
103
115
 
104
- * [#1](https://github.com/civisanalytics/ruby_audit/pull/1)
116
+ - [#1](https://github.com/civisanalytics/ruby_audit/pull/1)
105
117
  removing unreliable last-update check
106
118
 
107
119
  ## 1.0.0 (2016-02-03)
108
120
 
109
- * Initial Release
121
+ - Initial Release
110
122
 
111
- [Unreleased]: https://github.com/civisanalytics/ruby_audit/compare/v2.3.0...HEAD
123
+ [Unreleased]: https://github.com/civisanalytics/ruby_audit/compare/v2.3.1...HEAD
124
+ [2.3.1]: https://github.com/civisanalytics/ruby_audit/compare/v2.3.0...v2.3.1
112
125
  [2.3.0]: https://github.com/civisanalytics/ruby_audit/compare/v2.2.0...v2.3.0
113
126
  [2.2.0]: https://github.com/civisanalytics/ruby_audit/compare/v2.1.0...v2.2.0
114
127
  [2.1.0]: https://github.com/civisanalytics/ruby_audit/compare/v2.0.0...v2.1.0
@@ -118,5 +131,4 @@ Look for rubygems advisories in the correct directory of the ruby-advisory-db
118
131
  [1.1.0]: https://github.com/civisanalytics/ruby_audit/compare/v1.0.1...v1.1.0
119
132
  [1.0.1]: https://github.com/civisanalytics/ruby_audit/compare/v1.0.0...v1.0.1
120
133
  [1.0.0]: https://github.com/civisanalytics/ruby_audit/commit/7535b70412641c888c80d99514b27ba254fb8316
121
-
122
134
  [@errm]: https://github.com/errm
data/Gemfile CHANGED
@@ -2,3 +2,10 @@ source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in ruby_audit.gemspec
4
4
  gemspec
5
+
6
+ gem 'base64', '~> 0.2.0'
7
+ gem 'ostruct', '~> 0.6.1'
8
+ gem 'pry', '~> 0.14.1'
9
+ gem 'rake', '~> 13.0'
10
+ gem 'rspec', '~> 3.9'
11
+ gem 'rubocop', '~> 1.69.2'
data/README.md CHANGED
@@ -57,7 +57,7 @@ $ ruby-audit check -n
57
57
 
58
58
  After checking out the repo, run `bin/setup` to install dependencies.
59
59
  You'll also want to run `git submodule update --init` to populate the ruby-advisory-db
60
- submodule in `/vendor` that is used for testing. Then, run `rake spec` to run the tests.
60
+ submodule in `/vendor` that is used for testing. Then, run `rake` to run linting and tests.
61
61
  You can also run `bin/console` for an interactive prompt that will allow you to experiment.
62
62
 
63
63
  The database in `/vendor/ruby-advisory-db` is only used as a fixture for unit tests.
@@ -10,12 +10,12 @@ module RubyAudit
10
10
  end
11
11
  end
12
12
 
13
- def check_ruby(ruby, &block)
14
- check(ruby, 'rubies', &block)
13
+ def check_ruby(ruby, &)
14
+ check(ruby, 'rubies', &)
15
15
  end
16
16
 
17
- def check_rubygems(rubygems, &block)
18
- check(rubygems, 'gems', &block)
17
+ def check_rubygems(rubygems, &)
18
+ check(rubygems, 'gems', &)
19
19
  end
20
20
 
21
21
  def check(object, type = 'gems')
@@ -28,12 +28,12 @@ module RubyAudit
28
28
 
29
29
  protected
30
30
 
31
- def each_advisory_path(&block)
32
- Dir.glob(File.join(@path, '{gems,rubies}', '*', '*.yml'), &block)
31
+ def each_advisory_path(&)
32
+ Dir.glob(File.join(@path, '{gems,rubies}', '*', '*.yml'), &)
33
33
  end
34
34
 
35
- def each_advisory_path_for(name, type = 'gems', &block)
36
- Dir.glob(File.join(@path, type, name, '*.yml'), &block)
35
+ def each_advisory_path_for(name, type = 'gems', &)
36
+ Dir.glob(File.join(@path, type, name, '*.yml'), &)
37
37
  end
38
38
  end
39
39
  end
@@ -25,19 +25,19 @@ module RubyAudit
25
25
  self
26
26
  end
27
27
 
28
- def scan_ruby(options = {}, &block)
28
+ def scan_ruby(options = {}, &)
29
29
  version = if RUBY_PATCHLEVEL < 0
30
30
  ruby_version
31
31
  else
32
32
  "#{RUBY_VERSION}.#{RUBY_PATCHLEVEL}"
33
33
  end
34
34
  specs = [Version.new(RUBY_ENGINE, version)]
35
- scan_inner(specs, 'ruby', options, &block)
35
+ scan_inner(specs, 'ruby', options, &)
36
36
  end
37
37
 
38
- def scan_rubygems(options = {}, &block)
38
+ def scan_rubygems(options = {}, &)
39
39
  specs = [Version.new('rubygems-update', rubygems_version)]
40
- scan_inner(specs, 'rubygems', options, &block)
40
+ scan_inner(specs, 'rubygems', options, &)
41
41
  end
42
42
 
43
43
  private
@@ -61,7 +61,7 @@ module RubyAudit
61
61
  ignore += options[:ignore] if options[:ignore]
62
62
 
63
63
  specs.each do |spec|
64
- @database.send("check_#{type}".to_sym, spec) do |advisory|
64
+ @database.send(:"check_#{type}", spec) do |advisory|
65
65
  unless ignore.intersect?(advisory.identifiers.to_set)
66
66
  yield Bundler::Audit::Results::UnpatchedGem.new(spec, advisory)
67
67
  end
@@ -1,3 +1,3 @@
1
1
  module RubyAudit
2
- VERSION = '2.3.1'.freeze
2
+ VERSION = '3.0.0'.freeze
3
3
  end
data/ruby_audit.gemspec CHANGED
@@ -7,6 +7,7 @@ Gem::Specification.new do |spec|
7
7
  spec.version = RubyAudit::VERSION
8
8
  spec.authors = ['Jeff Cousens, Mike Saelim', 'John Zhang', 'Cristina Muñoz']
9
9
  spec.email = ['opensource@civisanalytics.com']
10
+ spec.metadata['rubygems_mfa_required'] = 'true'
10
11
 
11
12
  spec.summary = 'Checks Ruby and RubyGems against known vulnerabilities.'
12
13
  spec.description = 'RubyAudit checks your current version of Ruby and ' \
@@ -17,16 +18,11 @@ Gem::Specification.new do |spec|
17
18
  spec.homepage = 'https://github.com/civisanalytics/ruby_audit'
18
19
  spec.license = 'GPL-3.0-or-later'
19
20
 
20
- spec.required_ruby_version = ['>= 2.5', '< 3.4']
21
+ spec.required_ruby_version = ['>= 3.1', '< 3.5']
21
22
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
22
23
  spec.bindir = 'exe'
23
24
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
24
25
  spec.require_paths = ['lib']
25
26
 
26
27
  spec.add_dependency 'bundler-audit', '~> 0.9.0'
27
- spec.add_development_dependency 'pry', '~> 0.14.1'
28
- spec.add_development_dependency 'rake', '~> 13.0'
29
- spec.add_development_dependency 'rspec', '~> 3.9'
30
- spec.add_development_dependency 'rubocop', '~> 1.9.1'
31
- spec.add_development_dependency 'timecop', '~> 0.9.1'
32
28
  end
metadata CHANGED
@@ -1,16 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby_audit
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.1
4
+ version: 3.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeff Cousens, Mike Saelim
8
8
  - John Zhang
9
9
  - Cristina Muñoz
10
- autorequire:
11
10
  bindir: exe
12
11
  cert_chain: []
13
- date: 2024-05-23 00:00:00.000000000 Z
12
+ date: 2025-01-09 00:00:00.000000000 Z
14
13
  dependencies:
15
14
  - !ruby/object:Gem::Dependency
16
15
  name: bundler-audit
@@ -26,76 +25,6 @@ dependencies:
26
25
  - - "~>"
27
26
  - !ruby/object:Gem::Version
28
27
  version: 0.9.0
29
- - !ruby/object:Gem::Dependency
30
- name: pry
31
- requirement: !ruby/object:Gem::Requirement
32
- requirements:
33
- - - "~>"
34
- - !ruby/object:Gem::Version
35
- version: 0.14.1
36
- type: :development
37
- prerelease: false
38
- version_requirements: !ruby/object:Gem::Requirement
39
- requirements:
40
- - - "~>"
41
- - !ruby/object:Gem::Version
42
- version: 0.14.1
43
- - !ruby/object:Gem::Dependency
44
- name: rake
45
- requirement: !ruby/object:Gem::Requirement
46
- requirements:
47
- - - "~>"
48
- - !ruby/object:Gem::Version
49
- version: '13.0'
50
- type: :development
51
- prerelease: false
52
- version_requirements: !ruby/object:Gem::Requirement
53
- requirements:
54
- - - "~>"
55
- - !ruby/object:Gem::Version
56
- version: '13.0'
57
- - !ruby/object:Gem::Dependency
58
- name: rspec
59
- requirement: !ruby/object:Gem::Requirement
60
- requirements:
61
- - - "~>"
62
- - !ruby/object:Gem::Version
63
- version: '3.9'
64
- type: :development
65
- prerelease: false
66
- version_requirements: !ruby/object:Gem::Requirement
67
- requirements:
68
- - - "~>"
69
- - !ruby/object:Gem::Version
70
- version: '3.9'
71
- - !ruby/object:Gem::Dependency
72
- name: rubocop
73
- requirement: !ruby/object:Gem::Requirement
74
- requirements:
75
- - - "~>"
76
- - !ruby/object:Gem::Version
77
- version: 1.9.1
78
- type: :development
79
- prerelease: false
80
- version_requirements: !ruby/object:Gem::Requirement
81
- requirements:
82
- - - "~>"
83
- - !ruby/object:Gem::Version
84
- version: 1.9.1
85
- - !ruby/object:Gem::Dependency
86
- name: timecop
87
- requirement: !ruby/object:Gem::Requirement
88
- requirements:
89
- - - "~>"
90
- - !ruby/object:Gem::Version
91
- version: 0.9.1
92
- type: :development
93
- prerelease: false
94
- version_requirements: !ruby/object:Gem::Requirement
95
- requirements:
96
- - - "~>"
97
- - !ruby/object:Gem::Version
98
- version: 0.9.1
99
28
  description: RubyAudit checks your current version of Ruby and RubyGems against known
100
29
  security vulnerabilities (CVEs), alerting you if you are using an insecure version.
101
30
  It complements bundler-audit, providing complete coverage for your Ruby stack.
@@ -131,8 +60,8 @@ files:
131
60
  homepage: https://github.com/civisanalytics/ruby_audit
132
61
  licenses:
133
62
  - GPL-3.0-or-later
134
- metadata: {}
135
- post_install_message:
63
+ metadata:
64
+ rubygems_mfa_required: 'true'
136
65
  rdoc_options: []
137
66
  require_paths:
138
67
  - lib
@@ -140,18 +69,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
140
69
  requirements:
141
70
  - - ">="
142
71
  - !ruby/object:Gem::Version
143
- version: '2.5'
72
+ version: '3.1'
144
73
  - - "<"
145
74
  - !ruby/object:Gem::Version
146
- version: '3.4'
75
+ version: '3.5'
147
76
  required_rubygems_version: !ruby/object:Gem::Requirement
148
77
  requirements:
149
78
  - - ">="
150
79
  - !ruby/object:Gem::Version
151
80
  version: '0'
152
81
  requirements: []
153
- rubygems_version: 3.4.10
154
- signing_key:
82
+ rubygems_version: 3.6.2
155
83
  specification_version: 4
156
84
  summary: Checks Ruby and RubyGems against known vulnerabilities.
157
85
  test_files: []