Skip to content

Commit

Permalink
Fix rexml CVE (#201)
Browse files Browse the repository at this point in the history
- Update to pdk 3.4.0.2
- Fix os family fact
  • Loading branch information
deric authored Jan 22, 2025
1 parent fafd804 commit ff2c976
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
8 changes: 5 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,12 @@ group :development do
gem "racc", '~> 1.4.0', require: false if Gem::Requirement.create(['>= 2.7.0', '< 3.0.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
gem "deep_merge", '~> 1.2.2', require: false
gem "voxpupuli-puppet-lint-plugins", '~> 5.0', require: false
gem "facterdb", '~> 2.1', require: false
gem "facterdb", '~> 2.1', require: false if Gem::Requirement.create(['< 3.0.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
gem "facterdb", '~> 3.0', require: false if Gem::Requirement.create(['>= 3.0.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
gem "metadata-json-lint", '~> 4.0', require: false
gem "rspec-puppet-facts", '~> 4.0', require: false
gem "json-schema", '< 5.1.1', require: false
gem "rspec-puppet-facts", '~> 4.0', require: false if Gem::Requirement.create(['< 3.0.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
gem "rspec-puppet-facts", '~> 5.0', require: false if Gem::Requirement.create(['>= 3.0.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
gem "dependency_checker", '~> 1.0.0', require: false
gem "parallel_tests", '= 3.12.1', require: false
gem "pry", '~> 0.10', require: false
Expand All @@ -34,7 +37,6 @@ group :development do
gem "rubocop-performance", '= 1.16.0', require: false
gem "rubocop-rspec", '= 2.19.0', require: false
gem "rb-readline", '= 0.5.5', require: false, platforms: [:mswin, :mingw, :x64_mingw]
gem "rexml", '>= 3.0.0', '< 3.2.7', require: false
gem "github_changelog_generator", '~> 1.15', require: false if Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.3.0')
gem "overcommit", require: false
end
Expand Down
4 changes: 2 additions & 2 deletions metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,6 @@
],
"description": "ZooKeeper is a centralized service for maintaining configuration information, naming, providing distributed synchronization, and providing group services.",
"pdk-version": "3.4.0",
"template-url": "https://github.com/puppetlabs/pdk-templates#3.4.0",
"template-ref": "tags/3.4.0-0-gd3cc13f"
"template-url": "https://github.com/puppetlabs/pdk-templates#3.4.0.2",
"template-ref": "tags/3.4.0.2-0-gd5f5ac1"
}
5 changes: 3 additions & 2 deletions spec/spec_helper_local.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def get_os_info(facts)
zookeeper_shell: nil,
}

case facts[:osfamily]
case facts[:os]['family']
when 'Debian'
info[:service_name] = 'zookeeper'
info[:environment_file] = '/etc/zookeeper/conf/environment'
Expand All @@ -33,6 +33,8 @@ def get_os_info(facts)
info[:should_install_zookeeperd] = false
info[:zookeeper_shell] = '/bin/false'
info[:init_provider] = 'systemd'
else
raise "Unsupported OS: #{facts[:os]['family']}"
end

case info[:init_provider]
Expand All @@ -49,6 +51,5 @@ def get_os_info(facts)
else
"#{info[:init_dir]}/#{info[:service_name]}"
end

info
end

0 comments on commit ff2c976

Please sign in to comment.