ruby_audit 2.3.1 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f279cf36dd7235aecac769d5179ac4dd4bd827aeb63091f656a8b28a840856e8
4
- data.tar.gz: f9e74e7dc700d31d521df493659379baf922957c9727f79efb57f9166d95cf64
3
+ metadata.gz: 8f71226a262a50a961bdccdf3f2fda2a87a4eb693111f62a947740a110e7140e
4
+ data.tar.gz: 3f1162a9fb55f4d9c4dbb285071c4e7abeef818eea62b89abba8d1271a208bda
5
5
  SHA512:
6
- metadata.gz: d0e764605a9362ba2af5e0ae830625a3496091c00d436fd655c9f582f410a00f5ecf5787bf51c2feb7c460d88bb26564d62baeaaa1c0126936c2c48c6c79828b
7
- data.tar.gz: b0192910cf78633adb5b82a8b5cb9e43b725d3d829c240b6507e583e387f19fd1eb0bd64d317a72fcc571ec9bc1983eb5f37ec85b151c052ba6e6fa781610f37
6
+ metadata.gz: 425adb8be5ac2ed6652bfb48537e8276a07b6bf9f77824956b222648ece30c1d426e02793a81697c407f4cbad86cbd46fe8362b1b97a3013e1e321083ca4f688
7
+ data.tar.gz: 1a241cde3f5a558c8a8d04fc5d46d8a523c2db2f6baf3c318092bd64265c412a54a5c7330b1c2f97dc616aee1c6f0efb76febfbcd911d5ea9c3be33f19a389c2
@@ -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, 4.0]
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/.gitignore CHANGED
@@ -7,3 +7,4 @@
7
7
  /pkg/
8
8
  /spec/reports/
9
9
  /tmp/
10
+ ruby_audit-*.gem
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
+ 4.0.0
data/CHANGELOG.md CHANGED
@@ -5,110 +5,132 @@ This project adheres to [Semantic Versioning](http://semver.org/).
5
5
 
6
6
  ## [Unreleased]
7
7
 
8
+ ## [3.1.0] - 2026-01-07
9
+
10
+ ### Added
11
+
12
+ - Support for Ruby 3.4
13
+ - Support for Ruby 4.0
14
+
15
+ ## [3.0.0] - 2025-01-09
16
+
17
+ ### Changed
18
+
19
+ - Bumped Rubocop dependency to 1.64.0
20
+ - Require MFA for rubygems operations
21
+
22
+ ### Removed
23
+
24
+ - Removed support for Ruby 2.5 through 3.0
25
+ - Removed Timecop dependency
26
+
8
27
  ## [2.3.1] - 2024-05-17
9
28
 
10
29
  ### Removed
11
30
 
12
- * [#34](https://github.com/civisanalytics/ruby_audit/pull/34)
13
- Removed check for stale database that no longer does anything
31
+ - [#34](https://github.com/civisanalytics/ruby_audit/pull/34)
32
+ Removed check for stale database that no longer does anything
14
33
 
15
34
  ### Fixed
16
35
 
17
- * [#35](https://github.com/civisanalytics/ruby_audit/pull/35)
18
- Look for rubygems advisories in the correct directory of the ruby-advisory-db
36
+ - [#35](https://github.com/civisanalytics/ruby_audit/pull/35)
37
+ Look for rubygems advisories in the correct directory of the ruby-advisory-db
19
38
 
20
39
  ## [2.3.0] - 2024-01-10
21
40
 
22
41
  ### Added
23
42
 
24
- * Support for Ruby 3.3
43
+ - Support for Ruby 3.3
25
44
 
26
45
  ## [2.2.0] - 2023-01-05
27
46
 
28
47
  ### Added
29
48
 
30
- * Support for Ruby 3.2
49
+ - Support for Ruby 3.2
31
50
 
32
51
  ## [2.1.0] - 2022-02-23
33
52
 
34
53
  ### Added
35
54
 
36
- * Support for ruby 3.1
37
- * Require bundler-audit >= 0.9
55
+ - Support for ruby 3.1
56
+ - Require bundler-audit >= 0.9
38
57
 
39
58
  ## [2.0.0] - 2021-03-22
40
59
 
41
60
  ### Added
42
61
 
43
- * Require bundler-audit 0.8
44
- * Added Ruby 3.0 to the Travis matrix
62
+ - Require bundler-audit 0.8
63
+ - Added Ruby 3.0 to the Travis matrix
45
64
 
46
65
  ### Removed
47
66
 
48
- * Removed support for bundler-audit 0.7
67
+ - Removed support for bundler-audit 0.7
49
68
 
50
69
  ## [1.3.0] - 2020-07-01
51
70
 
52
71
  ### Added
53
72
 
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
73
+ - Added Ruby 2.5, 2.6, and 2.7 to the Travis matrix
74
+ - Added the ability to ignore an advisory by its GHSA identifier
56
75
 
57
76
  ### Changed
58
77
 
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
78
+ - Bumped the bundler-audit version to 0.7
79
+ - Bumped the Ruby version for development to 2.7.1
80
+ - Bumped the Pry version for development to 0.13
81
+ - Bumped the Rake version for development to 13
82
+ - Bumped the Rspec version for development to 3.9
83
+ - Bumped the RuboCop version for development to 0.86
84
+ - Bumped the Timecop verison for development to 0.9
85
+ - RuboCop fixes
67
86
 
68
87
  ### Removed
69
88
 
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
89
+ - Removed Ruby 2.1 through 2.4 from the Travis matrix
90
+ - Removed the explicit Bundler dependency for development, since it is now included with RubyGems
72
91
 
73
92
  ## [1.2.0] - 2017-09-21
74
93
 
75
94
  ### Added
76
95
 
77
- * Added 2.4 to the Travis matrix ([@errm])
96
+ - Added 2.4 to the Travis matrix ([@errm])
78
97
 
79
98
  ### Changed
80
99
 
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])
100
+ - Bumped the bundler-audit version to 0.6 ([@errm])
101
+ - Bumped the RuboCop version for development to 0.50 ([@errm])
102
+ - Bumped the Ruby version for development to 2.4.2 ([@errm])
84
103
 
85
104
  ## [1.1.0] - 2016-09-15
86
105
 
87
106
  ### Added
88
107
 
89
- * Added a matrix build of 2.1, 2.2, and 2.3 to Travis
108
+ - Added a matrix build of 2.1, 2.2, and 2.3 to Travis
90
109
 
91
110
  ### Changed
92
111
 
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
112
+ - Added a [Code of Conduct](CODE_OF_CONDUCT.md)
113
+ - Bumped the bundler-audit version to 0.5
114
+ - Bumped the RSpec version for development to 3.5
115
+ - Bumped the Rake version for development to 11.2
116
+ - Bumped the RuboCop version for development to 0.42
117
+ - Bumped the Ruby version for development to 2.3.1
99
118
 
100
119
  ## [1.0.1] - 2016-02-03
101
120
 
102
121
  ### Fixed
103
122
 
104
- * [#1](https://github.com/civisanalytics/ruby_audit/pull/1)
123
+ - [#1](https://github.com/civisanalytics/ruby_audit/pull/1)
105
124
  removing unreliable last-update check
106
125
 
107
126
  ## 1.0.0 (2016-02-03)
108
127
 
109
- * Initial Release
128
+ - Initial Release
110
129
 
111
- [Unreleased]: https://github.com/civisanalytics/ruby_audit/compare/v2.3.0...HEAD
130
+ [Unreleased]: https://github.com/civisanalytics/ruby_audit/compare/v3.1.0...HEAD
131
+ [3.1.0]: https://github.com/civisanalytics/ruby_audit/compare/v3.0.0...v3.1.0
132
+ [3.0.0]: https://github.com/civisanalytics/ruby_audit/compare/v2.3.1...v3.0.0
133
+ [2.3.1]: https://github.com/civisanalytics/ruby_audit/compare/v2.3.0...v2.3.1
112
134
  [2.3.0]: https://github.com/civisanalytics/ruby_audit/compare/v2.2.0...v2.3.0
113
135
  [2.2.0]: https://github.com/civisanalytics/ruby_audit/compare/v2.1.0...v2.2.0
114
136
  [2.1.0]: https://github.com/civisanalytics/ruby_audit/compare/v2.0.0...v2.1.0
@@ -118,5 +140,4 @@ Look for rubygems advisories in the correct directory of the ruby-advisory-db
118
140
  [1.1.0]: https://github.com/civisanalytics/ruby_audit/compare/v1.0.1...v1.1.0
119
141
  [1.0.1]: https://github.com/civisanalytics/ruby_audit/compare/v1.0.0...v1.0.1
120
142
  [1.0.0]: https://github.com/civisanalytics/ruby_audit/commit/7535b70412641c888c80d99514b27ba254fb8316
121
-
122
143
  [@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.1.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', '< 4.1']
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,16 @@
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.1.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:
10
+ autorequire:
11
11
  bindir: exe
12
12
  cert_chain: []
13
- date: 2024-05-23 00:00:00.000000000 Z
13
+ date: 2026-01-07 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bundler-audit
@@ -26,76 +26,6 @@ dependencies:
26
26
  - - "~>"
27
27
  - !ruby/object:Gem::Version
28
28
  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
29
  description: RubyAudit checks your current version of Ruby and RubyGems against known
100
30
  security vulnerabilities (CVEs), alerting you if you are using an insecure version.
101
31
  It complements bundler-audit, providing complete coverage for your Ruby stack.
@@ -131,8 +61,9 @@ files:
131
61
  homepage: https://github.com/civisanalytics/ruby_audit
132
62
  licenses:
133
63
  - GPL-3.0-or-later
134
- metadata: {}
135
- post_install_message:
64
+ metadata:
65
+ rubygems_mfa_required: 'true'
66
+ post_install_message:
136
67
  rdoc_options: []
137
68
  require_paths:
138
69
  - lib
@@ -140,18 +71,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
140
71
  requirements:
141
72
  - - ">="
142
73
  - !ruby/object:Gem::Version
143
- version: '2.5'
74
+ version: '3.1'
144
75
  - - "<"
145
76
  - !ruby/object:Gem::Version
146
- version: '3.4'
77
+ version: '4.1'
147
78
  required_rubygems_version: !ruby/object:Gem::Requirement
148
79
  requirements:
149
80
  - - ">="
150
81
  - !ruby/object:Gem::Version
151
82
  version: '0'
152
83
  requirements: []
153
- rubygems_version: 3.4.10
154
- signing_key:
84
+ rubygems_version: 3.0.3.1
85
+ signing_key:
155
86
  specification_version: 4
156
87
  summary: Checks Ruby and RubyGems against known vulnerabilities.
157
88
  test_files: []