Skip to content

Commit

Permalink
[CVE-2017-8418] Update ruby plugins for vulnerable rubocop dependency
Browse files Browse the repository at this point in the history
Misc:
- appease the cops
- changelog guidelines location

Breaking Change:
- removed ruby 2.0.x support

Signed-off-by: Ben Abrams <[email protected]>
  • Loading branch information
majormoses committed Dec 28, 2017
1 parent 8910b36 commit b9214d1
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#### General

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

- [ ] Update README with any necessary configuration snippets

Expand Down
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
# Change Log
This project adheres to [Semantic Versioning](http://semver.org/).

This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachangelog.com/)
This CHANGELOG follows the format laid out [here](https://github.com/sensu-plugins/community/blob/master/HOW_WE_CHANGELOG.md)

## [Unreleased]

### Security
- updated rubocop dependency to `~> 0.51.0` per: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-8418. (@majormoses)

### Changed
- update changelog location guidelines (@majormoses)

## [1.0.0] - 2017-06-28
### Added
- Support for Ruby 2.3 and 2.4 (@eheydrick)
Expand Down
6 changes: 3 additions & 3 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ require 'yard'
require 'yard/rake/yardoc_task'

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

RuboCop::RakeTask.new
Expand All @@ -35,4 +35,4 @@ task :check_binstubs do
end
end

task default: [:spec, :make_bin_executable, :yard, :rubocop, :check_binstubs]
task default: %i[spec make_bin_executable yard rubocop check_binstubs]
4 changes: 2 additions & 2 deletions bin/check-bluepill-procs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class CheckBluepill < Sensu::Plugin::Check::CLI
description: 'exec bluepill with sudo (needs passwordless)'

def merge_output(orig, add)
orig.keys.each { |k| orig[k].push(*add[k]) }
orig.each_key { |k| orig[k].push(*add[k]) }
orig
end

Expand Down Expand Up @@ -90,7 +90,7 @@ def bluepill_application_status(name)
end
end
end
out[:err] << name if processes_found == 0
out[:err] << name if processes_found.zero?
puts "***** DEBUG: bluepill #{name} status parsed ******\n#{out.inspect}" if config[:debug]
out
end
Expand Down
10 changes: 5 additions & 5 deletions sensu-plugins-bluepill.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'date'
require_relative 'lib/sensu-plugins-bluepill'

Gem::Specification.new do |s|
Gem::Specification.new do |s| # rubocop:disable Metrics/BlockLength)
s.authors = ['Sensu-Plugins and contributors']
s.date = Date.today.to_s
s.description = 'Bluepill process supervisor plugins'
s.email = '<[email protected]>'
s.executables = Dir.glob('bin/**/*').map { |file| File.basename(file) }
s.files = Dir.glob('{bin,lib}/**/*') + %w(LICENSE README.md CHANGELOG.md)
s.files = Dir.glob('{bin,lib}/**/*') + %w[LICENSE README.md CHANGELOG.md]
s.homepage = 'https://github.com/sensu-plugins/sensu-plugins-bluepill'
s.license = 'MIT'
s.metadata = { 'maintainer' => 'sensu-plugin',
Expand All @@ -22,7 +22,7 @@ Gem::Specification.new do |s|
s.platform = Gem::Platform::RUBY
s.post_install_message = 'You can use the embedded Ruby by setting EMBEDDED_RUBY=true in /etc/default/sensu'
s.require_paths = ['lib']
s.required_ruby_version = '>= 2.0.0'
s.required_ruby_version = '>= 2.1.0'
s.summary = 'Bluepill process supervisor plugins'
s.test_files = s.files.grep(%r{^(test|spec|features)/})
s.version = SensuPluginsBluepill::Version::VER_STRING
Expand All @@ -34,9 +34,9 @@ Gem::Specification.new do |s|
s.add_development_dependency 'codeclimate-test-reporter', '~> 0.4'
s.add_development_dependency 'github-markup', '~> 1.3'
s.add_development_dependency 'pry', '~> 0.10'
s.add_development_dependency 'rubocop', '~> 0.40.0'
s.add_development_dependency 'rspec', '~> 3.1'
s.add_development_dependency 'rake', '~> 10.0'
s.add_development_dependency 'redcarpet', '~> 3.2'
s.add_development_dependency 'rspec', '~> 3.1'
s.add_development_dependency 'rubocop', '~> 0.51.0'
s.add_development_dependency 'yard', '~> 0.8'
end

0 comments on commit b9214d1

Please sign in to comment.