Skip to content

Commit 8173dc7

Browse files
committed
[CVE-2017-8418] Update ruby plugins for vulnerable rubocop dependency
Misc: - Had to drop ruby < 2.1 support to bring in new dep - changelog guidelines location Signed-off-by: Ben Abrams <[email protected]>
1 parent 9fe6c8d commit 8173dc7

6 files changed

+26
-16
lines changed

.github/PULL_REQUEST_TEMPLATE.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44

55
#### General
66

7-
- [ ] Update Changelog following the conventions laid out on [Keep A Changelog](http://keepachangelog.com/)
7+
- [ ] Update Changelog following the conventions laid out [here](https://github.com/sensu-plugins/community/blob/master/HOW_WE_CHANGELOG.md)
88

99
- [ ] Update README with any necessary configuration snippets
1010

1111
- [ ] Binstubs are created if needed
1212

1313
- [ ] RuboCop passes
1414

15-
- [ ] Existing tests pass
15+
- [ ] Existing tests pass
1616

1717
#### New Plugins
1818

@@ -25,4 +25,3 @@
2525
#### Purpose
2626

2727
#### Known Compatibility Issues
28-

.travis.yml

-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ cache:
66
install:
77
- bundle install
88
rvm:
9-
- 2.0
109
- 2.1
1110
- 2.2
1211
- 2.3.0
@@ -29,7 +28,6 @@ deploy:
2928
on:
3029
tags: true
3130
all_branches: true
32-
rvm: 2.0
3331
rvm: 2.1
3432
rvm: 2.2
3533
rvm: 2.3.0

CHANGELOG.md

+17-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,21 @@
1-
#Change Log
1+
# Change Log
22
This project adheres to [Semantic Versioning](http://semver.org/).
33

4-
This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachangelog.com/)
4+
This CHANGELOG follows the format laid out [here](https://github.com/sensu-plugins/community/blob/master/HOW_WE_CHANGELOG.md)
5+
6+
## [Unreleased]
7+
8+
### Security
9+
- updated rubocop dependency to `~> 0.51.0` per: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-8418. (@majormoses)
10+
11+
### Breaking Changes
12+
- removed < ruby 2.1 support which was pulled as part of security updates (@majormoses)
13+
14+
### Changed
15+
- appeased the cops (@majormoses)
516

6-
## Unreleased
717
### Added
8-
- Add testing for Ruby 2.4.1
18+
- Add testing for Ruby 2.4.1
19+
20+
[Unreleased]: https://github.com/sensu-plugins/sensu-plugins-bigpanda/compare/5e3b6c5bb931d7ced3fcad579589ab1f5c88c2c9...HEAD
21+
[0.1.0]: https://github.com/sensu-plugins/sensu-plugins-bigpanda/compare/5e3b6c5bb931d7ced3fcad579589ab1f5c88c2c9...0.1.0

Rakefile

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ require 'yard'
77
require 'yard/rake/yardoc_task'
88

99
YARD::Rake::YardocTask.new do |t|
10-
OTHER_PATHS = %w().freeze
10+
OTHER_PATHS = %w[].freeze
1111
t.files = ['lib/**/*.rb', 'bin/**/*.rb', OTHER_PATHS]
12-
t.options = %w(--markup-provider=redcarpet --markup=markdown --main=README.md --files CHANGELOG.md)
12+
t.options = %w[--markup-provider=redcarpet --markup=markdown --main=README.md --files CHANGELOG.md]
1313
end
1414

1515
RuboCop::RakeTask.new
@@ -35,4 +35,4 @@ task :check_binstubs do
3535
end
3636
end
3737

38-
task default: [:spec, :make_bin_executable, :yard, :rubocop, :check_binstubs]
38+
task default: %i[spec make_bin_executable yard rubocop check_binstubs]

bin/handler-bigpanda.rb

100644100755
File mode changed.

sensu-plugins-bigpanda.gemspec

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
44
require 'date'
55
require_relative 'lib/sensu-plugins-bigpanda'
66

7-
Gem::Specification.new do |s|
7+
Gem::Specification.new do |s| # rubocop:disable Metrics/BlockLength
88
s.authors = ['Sensu-Plugins and contributors']
99
s.date = Date.today.to_s
1010
s.description = 'This plugin provides a handler for sending Sensu
1111
event data to BigPanda.'
1212
s.email = '<[email protected]>'
1313
s.executables = Dir.glob('bin/**/*.rb').map { |file| File.basename(file) }
14-
s.files = Dir.glob('{bin,lib}/**/*') + %w(LICENSE README.md CHANGELOG.md)
14+
s.files = Dir.glob('{bin,lib}/**/*') + %w[LICENSE README.md CHANGELOG.md]
1515
s.homepage = 'https://github.com/sensu-plugins/sensu-plugins-bigpanda'
1616
s.license = 'MIT'
1717
s.metadata = { 'maintainer' => 'sensu-plugin',
@@ -23,7 +23,7 @@ Gem::Specification.new do |s|
2323
s.platform = Gem::Platform::RUBY
2424
s.post_install_message = 'You can use the embedded Ruby by setting EMBEDDED_RUBY=true in /etc/default/sensu'
2525
s.require_paths = ['lib']
26-
s.required_ruby_version = '>= 2.0.0'
26+
s.required_ruby_version = '>= 2.1.0'
2727
s.summary = 'Sensu plugin handler for sending Sensu event data to BigPanda'
2828
s.test_files = s.files.grep(%r{^(test|spec|features)/})
2929
s.version = SensuPluginsBigPanda::Version::VER_STRING
@@ -37,6 +37,6 @@ Gem::Specification.new do |s|
3737
s.add_development_dependency 'rake', '~> 10.0'
3838
s.add_development_dependency 'redcarpet', '~> 3.2'
3939
s.add_development_dependency 'rspec', '~> 3.1'
40-
s.add_development_dependency 'rubocop', '~> 0.40.0'
40+
s.add_development_dependency 'rubocop', '~> 0.51.0'
4141
s.add_development_dependency 'yard', '~> 0.8'
4242
end

0 commit comments

Comments
 (0)