Skip to content

Commit

Permalink
Merge pull request #2320 from DataDog/forwardport/update-libddwaf
Browse files Browse the repository at this point in the history
Forwardport "Update to libddwaf 1.5.1"
  • Loading branch information
lloeki authored Oct 19, 2022
2 parents 56d764a + 4f19ab1 commit 60f71fc
Show file tree
Hide file tree
Showing 280 changed files with 3,948 additions and 1,385 deletions.
10 changes: 10 additions & 0 deletions Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ if ruby_version?('2.1')
gem 'mysql2', '0.3.21'
gem 'pg', '>= 0.18.4', '< 1.0'
gem 'rack', '1.4.7'
gem 'rack-contrib'
gem 'rack-cache', '1.7.1'
gem 'rack-test', '0.7.0'
gem 'rake', '< 12.3'
Expand Down Expand Up @@ -288,6 +289,7 @@ elsif ruby_version?('2.2')
gem 'qless'
gem 'racecar', '>= 0.3.5'
gem 'rack', '< 2.1.0' # Locked due to grape incompatibility: https://github.com/ruby-grape/grape/issues/1980
gem 'rack-contrib'
gem 'rack-test'
gem 'rake', '>= 12.3'
gem 'redis', '< 4.0'
Expand Down Expand Up @@ -472,6 +474,7 @@ elsif ruby_version?('2.3')
gem 'qless'
gem 'racecar', '>= 0.3.5'
gem 'rack', '< 2.1.0' # Locked due to grape incompatibility: https://github.com/ruby-grape/grape/issues/1980
gem 'rack-contrib'
gem 'rack-test'
gem 'rake', '>= 12.3'
gem 'redis', '< 4.0'
Expand Down Expand Up @@ -590,6 +593,7 @@ elsif ruby_version?('2.4')
gem 'qless'
gem 'racecar', '>= 0.3.5'
gem 'rack'
gem 'rack-contrib'
gem 'rack-test'
gem 'rake', '>= 12.3'
gem 'redis', '< 4.0'
Expand Down Expand Up @@ -838,6 +842,7 @@ elsif ruby_version?('2.5')
gem 'qless', (RUBY_PLATFORM == 'java' ? '0.10.0' : '>= 0') # Newer releases require `rusage`, which is not available for JRuby
gem 'racecar', '>= 0.3.5'
gem 'rack'
gem 'rack-contrib'
gem 'rack-test'
gem 'rake', '>= 12.3'
gem 'redis', '< 4.0'
Expand Down Expand Up @@ -1062,6 +1067,7 @@ elsif ruby_version?('2.6')
gem 'qless', (RUBY_PLATFORM == 'java' ? '0.10.0' : '>= 0') # Newer releases require `rusage`, which is not available for JRuby
gem 'racecar', '>= 0.3.5'
gem 'rack'
gem 'rack-contrib'
gem 'rack-test'
gem 'rake', '>= 12.3'
gem 'redis', '< 4.0'
Expand Down Expand Up @@ -1266,6 +1272,7 @@ elsif ruby_version?('2.7')
gem 'qless'
gem 'racecar', '>= 0.3.5'
gem 'rack'
gem 'rack-contrib'
gem 'rack-test'
gem 'rake', '>= 12.3'
gem 'redis', '< 4.0'
Expand Down Expand Up @@ -1381,6 +1388,7 @@ elsif ruby_version?('3.0') || ruby_version?('3.1')
gem 'qless'
# gem 'racecar', '>= 0.3.5' # Pending release of our fix: https://github.com/appsignal/rdkafka-ruby/pull/144
gem 'rack'
gem 'rack-contrib'
gem 'rack-test'
gem 'rake', '>= 12.3'
gem 'redis', '< 4.0'
Expand Down Expand Up @@ -1496,6 +1504,7 @@ elsif ruby_version?('3.2')
gem 'qless'
# gem 'racecar', '>= 0.3.5' # Pending release of our fix: https://github.com/appsignal/rdkafka-ruby/pull/144
gem 'rack'
gem 'rack-contrib'
gem 'rack-test'
gem 'rake', '>= 12.3'
gem 'redis', '< 4.0'
Expand All @@ -1514,6 +1523,7 @@ elsif ruby_version?('3.2')
gem 'typhoeus'
gem 'que', '>= 1.0.0'
gem 'net-smtp'
gem 'nokogiri', platform: :ruby # TODO: binary gem has max ruby version constraint excluding previews, switch to using minimum version constraint once a non-3.2-excluding binary gem is released
end

appraise 'contrib-old' do
Expand Down
26 changes: 25 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ namespace :spec do
end

namespace :appsec do
task all: [:main]
task all: [:main, :rack, :rails, :sinatra]

# Datadog AppSec main specs
RSpec::Core::RakeTask.new(:main) do |t, args|
Expand All @@ -177,6 +177,18 @@ namespace :spec do
' spec/datadog/appsec/**/{auto_instrument,autoload}_spec.rb'
t.rspec_opts = args.to_a.join(' ')
end

# Datadog AppSec integrations
[
:rack,
:sinatra,
:rails,
].each do |contrib|
RSpec::Core::RakeTask.new(contrib) do |t, args|
t.pattern = "spec/datadog/appsec/contrib/#{contrib}/**/*_spec.rb"
t.rspec_opts = args.to_a.join(' ')
end
end
end

task appsec: [:'appsec:all']
Expand Down Expand Up @@ -356,6 +368,18 @@ task :ci do
declare '❌ 2.1 / ❌ 2.2 / ❌ 2.3 / ✅ 2.4 / ✅ 2.5 / ✅ 2.6 / ✅ 2.7 / ✅ 3.0 / ✅ 3.1 / ✅ 3.2 / ✅ jruby' => 'bundle exec appraisal cucumber3 rake spec:cucumber'
declare '❌ 2.1 / ❌ 2.2 / ❌ 2.3 / ✅ 2.4 / ✅ 2.5 / ✅ 2.6 / ✅ 2.7 / ✅ 3.0 / ✅ 3.1 / ✅ 3.2 / ✅ jruby' => 'bundle exec appraisal cucumber4 rake spec:cucumber'
declare '❌ 2.1 / ❌ 2.2 / ❌ 2.3 / ❌ 2.4 / ✅ 2.5 / ✅ 2.6 / ✅ 2.7 / ✅ 3.0 / ✅ 3.1 / ✅ 3.2 / ✅ jruby' => 'bundle exec appraisal cucumber5 rake spec:cucumber'

# AppSec contrib specs
declare '✅ 2.1 / ✅ 2.2 / ✅ 2.3 / ✅ 2.4 / ✅ 2.5 / ✅ 2.6 / ✅ 2.7 / ✅ 3.0 / ✅ 3.1 / ✅ 3.2 / ✅ jruby' => 'bundle exec appraisal contrib rake spec:appsec:rack'
declare '✅ 2.1 / ✅ 2.2 / ✅ 2.3 / ✅ 2.4 / ✅ 2.5 / ✅ 2.6 / ✅ 2.7 / ✅ 3.0 / ✅ 3.1 / ✅ 3.2 / ✅ jruby' => 'bundle exec appraisal contrib rake spec:appsec:sinatra'
declare '✅ 2.1 / ✅ 2.2 / ✅ 2.3 / ❌ 2.4 / ❌ 2.5 / ❌ 2.6 / ❌ 2.7 / ❌ 3.0 / ❌ 3.1 / ❌ 3.2 / ✅ jruby' => 'bundle exec appraisal rails4-mysql2 rake spec:rails'

# AppSec Rails specs
declare '✅ 2.1 / ✅ 2.2 / ✅ 2.3 / ❌ 2.4 / ❌ 2.5 / ❌ 2.6 / ❌ 2.7 / ❌ 3.0 / ❌ 3.1 / ❌ 3.2 / ✅ jruby' => 'bundle exec appraisal rails32-mysql2 rake spec:rails'
declare '✅ 2.1 / ✅ 2.2 / ✅ 2.3 / ❌ 2.4 / ❌ 2.5 / ❌ 2.6 / ❌ 2.7 / ❌ 3.0 / ❌ 3.1 / ❌ 3.2 / ✅ jruby' => 'bundle exec appraisal rails4-mysql2 rake spec:appsec:rails'
declare '❌ 2.1 / ✅ 2.2 / ✅ 2.3 / ✅ 2.4 / ✅ 2.5 / ✅ 2.6 / ✅ 2.7 / ❌ 3.0 / ❌ 3.1 / ❌ 3.2 / ✅ jruby' => 'bundle exec appraisal rails5-mysql2 rake spec:appsec:rails'
declare '❌ 2.1 / ❌ 2.2 / ❌ 2.3 / ❌ 2.4 / ✅ 2.5 / ✅ 2.6 / ✅ 2.7 / ❌ 3.0 / ❌ 3.1 / ❌ 3.2 / ✅ jruby' => 'bundle exec appraisal rails6-mysql2 rake spec:appsec:rails'
declare '❌ 2.1 / ❌ 2.2 / ❌ 2.3 / ❌ 2.4 / ✅ 2.5 / ✅ 2.6 / ✅ 2.7 / ✅ 3.0 / ✅ 3.1 / ❌ 3.2 / ✅ jruby' => 'bundle exec appraisal rails61-mysql2 rake spec:appsec:rails'
end

namespace :coverage do
Expand Down
2 changes: 1 addition & 1 deletion ddtrace.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Gem::Specification.new do |spec|
spec.add_dependency 'debase-ruby_core_source', '>= 0.10.16', '<= 0.10.17'

# Used by appsec
spec.add_dependency 'libddwaf', '~> 1.3.0.2.0'
spec.add_dependency 'libddwaf', '~> 1.5.1.0.0'

# Used by profiling (and possibly others in the future)
spec.add_dependency 'libdatadog', '~> 0.9.0.1.0'
Expand Down
9 changes: 6 additions & 3 deletions gemfiles/jruby_9.2.18.0_contrib.gemfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions gemfiles/jruby_9.2.18.0_contrib_old.gemfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions gemfiles/jruby_9.2.18.0_core_old.gemfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions gemfiles/jruby_9.2.18.0_cucumber3.gemfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions gemfiles/jruby_9.2.18.0_cucumber4.gemfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions gemfiles/jruby_9.2.18.0_cucumber5.gemfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions gemfiles/jruby_9.2.18.0_rails5_mysql2.gemfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions gemfiles/jruby_9.2.18.0_rails5_postgres.gemfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions gemfiles/jruby_9.2.18.0_rails5_postgres_redis.gemfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions gemfiles/jruby_9.2.18.0_rails5_postgres_sidekiq.gemfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 60f71fc

Please sign in to comment.