libddwaf 1.24.1.0.1 → 1.24.1.0.2

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: 3fa5ca42541e2da2891fc5f35c5cb335b24509bb74ad85cdf0327bdf812fe63d
4
- data.tar.gz: 202564cefa5cce60dfdf408d9b096c6f79b930913dce4a644add8a06fb567741
3
+ metadata.gz: 48b913f16be4d4a2c3eb1dbf2872916810ec04172270a64e92634f3daa460db4
4
+ data.tar.gz: b6938b78cb0158c3295942e745f691578504a86a877b3b7f105a88e7288f17e2
5
5
  SHA512:
6
- metadata.gz: cd8d227ff6b379a1873324f4e8b356dcf8a3812f7cd281f48fc05525a0906693a61f294c79fe65d4da29885a00b6cb10477dc82247a397e28872e7b384269e5b
7
- data.tar.gz: f3cdc00560dbb27968ac4803f2189b9e27f68b7931a17231381653d3bb1f483a4bf52d6f9f52c543c416292149decc4fb20427cdd1814fa35568044ccbc11b69
6
+ metadata.gz: f9f9fb8e8e95f62505b2dd3f8d6cca18bc763c89bfeb9a6241c1b1a1740402fd09a5365910484f4dcefd0cd01aa5cf7e269b7f09a2cbdf0ede778ec2180701cd
7
+ data.tar.gz: e3173b7df4ea4a31c59285be6f7447c0cff39fc182f23106436c2d53660832f1f376ba7912e378311ec1be02b30bb4a0eef307f59dd9e128c2dcc79eb80945e2
@@ -45,7 +45,6 @@ module Datadog
45
45
  return [] if count == 0 # list is null
46
46
 
47
47
  list.get_array_of_string(0, count[:value])
48
- # TODO: garbage collect the count?
49
48
  end
50
49
 
51
50
  private
@@ -37,15 +37,6 @@ module Datadog
37
37
  Gem::Platform.local.os
38
38
  end
39
39
 
40
- def self.local_version
41
- return nil unless local_os == "linux"
42
-
43
- # Old rubygems don't handle non-gnu linux correctly
44
- return ::Regexp.last_match(1) if RUBY_PLATFORM =~ /linux-(.+)$/
45
-
46
- "gnu"
47
- end
48
-
49
40
  def self.local_cpu
50
41
  if RUBY_ENGINE == "jruby"
51
42
  os_arch = java.lang.System.get_property("os.arch")
@@ -66,33 +57,6 @@ module Datadog
66
57
  __dir__ || raise("__dir__ is nil: eval?")
67
58
  end
68
59
 
69
- def self.vendor_dir
70
- File.join(source_dir, "../../../../vendor")
71
- end
72
-
73
- def self.libddwaf_vendor_dir
74
- File.join(vendor_dir, "libddwaf")
75
- end
76
-
77
- def self.shared_lib_triplet(version: local_version)
78
- version ? "#{local_os}-#{version}-#{local_cpu}" : "#{local_os}-#{local_cpu}"
79
- end
80
-
81
- def self.libddwaf_dir
82
- default = File.join(libddwaf_vendor_dir,
83
- "libddwaf-#{Datadog::AppSec::WAF::VERSION::BASE_STRING}-#{shared_lib_triplet}")
84
- candidates = [
85
- default
86
- ]
87
-
88
- if local_os == "linux"
89
- candidates << File.join(libddwaf_vendor_dir,
90
- "libddwaf-#{Datadog::AppSec::WAF::VERSION::BASE_STRING}-#{shared_lib_triplet(version: nil)}")
91
- end
92
-
93
- candidates.find { |d| Dir.exist?(d) } || default
94
- end
95
-
96
60
  def self.shared_lib_extname
97
61
  if Gem::Platform.local.os == "darwin"
98
62
  ".dylib"
@@ -104,6 +68,9 @@ module Datadog
104
68
  end
105
69
 
106
70
  def self.shared_lib_path
71
+ variant = "#{Datadog::AppSec::WAF::VERSION::BASE_STRING}-#{local_os}-#{local_cpu}"
72
+ libddwaf_dir = File.join(source_dir, "../../../../vendor/libddwaf/libddwaf-#{variant}")
73
+
107
74
  File.join(libddwaf_dir, "lib", "libddwaf#{shared_lib_extname}")
108
75
  end
109
76
 
@@ -5,7 +5,7 @@ module Datadog
5
5
  BASE_STRING = "1.24.1"
6
6
  # NOTE: Every change to the `BASE_STRING` should be accompanied
7
7
  # by a reset of the patch version in the `STRING` below.
8
- STRING = "#{BASE_STRING}.0.1"
8
+ STRING = "#{BASE_STRING}.0.2"
9
9
  MINIMUM_RUBY_VERSION = "2.5"
10
10
  end
11
11
  end
data/libddwaf.gemspec CHANGED
@@ -24,14 +24,19 @@ Gem::Specification.new do |spec|
24
24
  raise "RubyGems 2.0 or newer is required to protect against public gem pushes."
25
25
  end
26
26
 
27
- spec.files =
28
- `git ls-files -z`
29
- .split("\x0")
30
- .reject { |f| f.match(%r{^(spec|[.]circleci)/}) }
31
- .reject do |f|
32
- [".dockerignore", ".env", ".rspec", ".rubocop.yml", ".rubocop_todo.yml",
33
- ".simplecov", "Gemfile", "Rakefile", "docker-compose.yml"].include?(f)
34
- end
27
+ libddwaf_version = Datadog::AppSec::WAF::VERSION::BASE_STRING
28
+
29
+ spec.files = ["libddwaf.gemspec"]
30
+ spec.files.concat(Dir.glob("lib/**/*.rb"))
31
+ spec.files.concat(Dir.glob("{vendor/rbs,sig}/**/*.rbs"))
32
+ spec.files.concat(Dir.glob("{README,CHANGELOG,LICENSE,NOTICE}*"))
33
+ spec.files.concat(%W[
34
+ vendor/libddwaf/libddwaf-#{libddwaf_version}-darwin-arm64/lib/libddwaf.dylib
35
+ vendor/libddwaf/libddwaf-#{libddwaf_version}-darwin-x86_64/lib/libddwaf.dylib
36
+ vendor/libddwaf/libddwaf-#{libddwaf_version}-linux-aarch64/lib/libddwaf.so
37
+ vendor/libddwaf/libddwaf-#{libddwaf_version}-linux-x86_64/lib/libddwaf.so
38
+ ])
39
+
35
40
  spec.require_paths = ["lib"]
36
41
 
37
42
  spec.add_dependency "ffi", "~> 1.0"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: libddwaf
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.24.1.0.1
4
+ version: 1.24.1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Datadog, Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-07-21 00:00:00.000000000 Z
11
+ date: 2025-07-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ffi
@@ -33,28 +33,13 @@ executables: []
33
33
  extensions: []
34
34
  extra_rdoc_files: []
35
35
  files:
36
- - ".github/ISSUE_TEMPLATE/bug.md"
37
- - ".github/PULL_REQUEST_TEMPLATE.md"
38
- - ".github/actions/docker-build-ruby/Dockerfile"
39
- - ".github/actions/docker-build-ruby/Dockerfile.alpine"
40
- - ".github/actions/docker-build-ruby/Dockerfile.jruby"
41
- - ".github/actions/docker-build-ruby/action.yml"
42
- - ".github/workflows/lint.yml"
43
- - ".github/workflows/package.yml"
44
- - ".github/workflows/test-for-memory-leaks.yml"
45
- - ".github/workflows/test.yml"
46
- - ".gitignore"
47
- - ".steepignore"
48
36
  - CHANGELOG.md
49
- - CONTRIBUTING.md
50
- - Dockerfile
51
37
  - LICENSE
52
38
  - LICENSE-3rdparty.csv
53
39
  - LICENSE.Apache
54
40
  - LICENSE.BSD3
55
41
  - NOTICE
56
42
  - README.md
57
- - Steepfile
58
43
  - lib/datadog/appsec/waf.rb
59
44
  - lib/datadog/appsec/waf/context.rb
60
45
  - lib/datadog/appsec/waf/converter.rb
@@ -66,7 +51,6 @@ files:
66
51
  - lib/datadog/appsec/waf/version.rb
67
52
  - lib/libddwaf.rb
68
53
  - libddwaf.gemspec
69
- - shell.nix
70
54
  - sig/datadog/appsec/waf.rbs
71
55
  - sig/datadog/appsec/waf/context.rbs
72
56
  - sig/datadog/appsec/waf/converter.rbs
@@ -77,6 +61,10 @@ files:
77
61
  - sig/datadog/appsec/waf/result.rbs
78
62
  - sig/datadog/appsec/waf/version.rbs
79
63
  - sig/libddwaf.rbs
64
+ - vendor/libddwaf/libddwaf-1.24.1-darwin-arm64/lib/libddwaf.dylib
65
+ - vendor/libddwaf/libddwaf-1.24.1-darwin-x86_64/lib/libddwaf.dylib
66
+ - vendor/libddwaf/libddwaf-1.24.1-linux-aarch64/lib/libddwaf.so
67
+ - vendor/libddwaf/libddwaf-1.24.1-linux-x86_64/lib/libddwaf.so
80
68
  - vendor/rbs/gem/0/gem.rbs
81
69
  - vendor/rbs/jruby/0/jruby.rbs
82
70
  homepage: https://github.com/DataDog/libddwaf-rb
@@ -1,32 +0,0 @@
1
- ---
2
- name: Bug report
3
- about: File a bug report
4
- title: ''
5
- labels: bug
6
- assignees: ''
7
-
8
- ---
9
-
10
- **Current behaviour**
11
- <!-- What is be happening. -->
12
-
13
- **Expected behaviour**
14
- <!-- What should be happening. -->
15
-
16
- **Steps to reproduce**
17
- <!--
18
- How can we reproduce this issue in order to diagnose it?
19
- Code snippets, log messages, screenshots and sample apps are encouraged!
20
- -->
21
-
22
- **How does `libddwaf` help you?**
23
- <!-- Optionally, tell us why and how you're using ddtrace, and what your overall experience with it is! -->
24
-
25
- **Environment**
26
-
27
- * **libddwaf version:**
28
- * **libddwaf gem platform:**
29
- * **Ruby version:**
30
- * **Ruby platform:**
31
- * **Operating system:**
32
-
@@ -1,17 +0,0 @@
1
- **What does this PR do?**
2
- <!-- A brief description of the change being made with this pull request. -->
3
-
4
- **Motivation**
5
- <!-- What inspired you to submit this pull request? -->
6
-
7
- **Additional Notes**
8
- <!-- Anything else we should know when reviewing? -->
9
-
10
- **How to test the change?**
11
- <!--
12
- Describe here how the change can be validated.
13
- You are strongly encouraged to provide automated tests for this PR.
14
- If this change cannot be feasibly tested, please explain why,
15
- unless the change does not modify code (e.g. only modifies docs, comments).
16
- -->
17
-
@@ -1,5 +0,0 @@
1
- ARG RUBY_VERSION
2
-
3
- FROM ruby:${RUBY_VERSION:-2.5}
4
-
5
- RUN gem update --system 3.3.27
@@ -1,7 +0,0 @@
1
- ARG RUBY_VERSION
2
-
3
- FROM ruby:${RUBY_VERSION:-2.5}-alpine
4
-
5
- RUN apk add --no-cache build-base git
6
-
7
- RUN gem update --system 3.3.27
@@ -1,6 +0,0 @@
1
- ARG RUBY_VERSION
2
-
3
- FROM jruby:${RUBY_VERSION:-9.2}
4
-
5
- RUN apt-get update
6
- RUN apt-get install -y build-essential git
@@ -1,46 +0,0 @@
1
- name: Build docker image
2
- description:
3
- This action builds the image for the specified ruby version and libc.
4
-
5
- inputs:
6
- ruby-version:
7
- description: Ruby version
8
- required: true
9
-
10
- libc:
11
- description: Which libc is used
12
- required: true
13
-
14
- jruby:
15
- description: Whether to use JRuby
16
- required: false
17
- default: "false"
18
-
19
- outputs:
20
- run-cmd:
21
- description: Command to run the container
22
- value: ${{ steps.set-run-cmd.outputs.run-cmd }}
23
-
24
- runs:
25
- using: "composite"
26
- steps:
27
- - name: Set up Docker Buildx
28
- uses: docker/setup-buildx-action@v3
29
-
30
- - name: Build image
31
- uses: docker/build-push-action@v6
32
- with:
33
- file: .github/actions/docker-build-ruby/Dockerfile${{ inputs.libc == 'musl' && '.alpine' || '' }}${{ inputs.jruby == 'true' && '.jruby' || '' }}
34
- build-args: |
35
- "RUBY_VERSION=${{ inputs.ruby-version }}"
36
- push: false
37
- load: true
38
- tags: libddwaf-rb-test:latest
39
- cache-from: type=gha
40
- cache-to: type=gha,mode=max
41
-
42
- - name: Set run-cmd output
43
- id: set-run-cmd
44
- shell: bash
45
- run: |
46
- echo "run-cmd=docker run -v gems:/usr/local/bundle -v ${{ github.workspace }}:/libddwaf-rb -w /libddwaf-rb libddwaf-rb-test:latest" >> "$GITHUB_OUTPUT"
@@ -1,34 +0,0 @@
1
- name: Lint
2
- on:
3
- - push
4
-
5
- jobs:
6
- style-check:
7
- name: Style check
8
- runs-on: ubuntu-24.04
9
- container:
10
- image: ruby:3.3
11
- steps:
12
- - name: Checkout
13
- uses: actions/checkout@v2
14
-
15
- - name: Bundle
16
- run: bundle install
17
-
18
- - name: Run standardrb
19
- run: standardrb
20
-
21
- type-check:
22
- name: Type check
23
- runs-on: ubuntu-24.04
24
- container:
25
- image: ruby:3.3
26
- steps:
27
- - name: Checkout
28
- uses: actions/checkout@v2
29
-
30
- - name: Bundle
31
- run: bundle install
32
-
33
- - name: Run Steep
34
- run: bundle exec rake steep:check
@@ -1,130 +0,0 @@
1
- name: Package
2
- on:
3
- - push
4
-
5
- jobs:
6
- test-rake-build:
7
- strategy:
8
- fail-fast: false
9
- matrix:
10
- os: [ubuntu-24.04, ubuntu-24.04-arm]
11
- ruby: ["3.3"]
12
- libc: [gnu]
13
- include:
14
- - os: ubuntu-24.04
15
- platform: x86_64-linux
16
- - os: ubuntu-24.04-arm
17
- platform: aarch64-linux
18
-
19
- name: Test build without fetching libddwaf (Ruby ${{ matrix.ruby }}, ${{ matrix.os }}, ${{ matrix.libc }})
20
- runs-on: ${{ matrix.os }}
21
-
22
- steps:
23
- - name: Checkout
24
- uses: actions/checkout@v4
25
-
26
- - name: Build docker image
27
- id: build-image
28
- uses: ./.github/actions/docker-build-ruby
29
- with:
30
- ruby-version: ${{ matrix.ruby }}
31
- libc: ${{ matrix.libc }}
32
-
33
- - name: Bundle install
34
- run: ${{ steps.build-image.outputs.run-cmd }} bundle install
35
-
36
- - name: Build gem
37
- run: ${{ steps.build-image.outputs.run-cmd }} bundle exec rake build
38
-
39
- - name: List artifact files
40
- run: find .
41
- working-directory: pkg
42
-
43
- - name: Install gem
44
- run: ${{ steps.build-image.outputs.run-cmd }} gem install --verbose pkg/*.gem
45
-
46
- - name: Run smoke test
47
- run: ${{ steps.build-image.outputs.run-cmd }} ruby -e 'begin require "libddwaf"; rescue LoadError => e; puts e.message; else fail "loaded when it should not"; end'
48
-
49
- test-rake-binary:
50
- strategy:
51
- fail-fast: false
52
- matrix:
53
- os: [ubuntu-24.04, ubuntu-24.04-arm]
54
- ruby: ["3.3", "9.4"]
55
- libc: [gnu, musl]
56
- include:
57
- - os: ubuntu-24.04
58
- platform: x86_64-linux:llvm
59
- - os: ubuntu-24.04-arm
60
- platform: aarch64-linux:llvm
61
- - ruby: 3.3
62
- jruby: false
63
- - ruby: 9.4
64
- jruby: true
65
- exclude:
66
- - ruby: 9.4
67
- libc: musl
68
-
69
- name: Test gem build (${{ matrix.jruby == true && 'Jruby' || 'Ruby'}} ${{ matrix.ruby }}, ${{ matrix.os }}, ${{ matrix.libc }})
70
- runs-on: ${{ matrix.os }}
71
-
72
- steps:
73
- - name: Checkout
74
- uses: actions/checkout@v4
75
-
76
- - name: Build docker image
77
- id: build-image
78
- uses: ./.github/actions/docker-build-ruby
79
- with:
80
- ruby-version: ${{ matrix.ruby }}
81
- libc: ${{ matrix.libc }}
82
- jruby: ${{ matrix.jruby }}
83
-
84
- - name: Bundle install
85
- run: ${{ steps.build-image.outputs.run-cmd }} bundle install
86
-
87
- - name: Build binary gem
88
- run: ${{ steps.build-image.outputs.run-cmd }} bundle exec rake binary[${{ matrix.platform }}]
89
-
90
- - name: List artifact files
91
- run: find .
92
- working-directory: pkg
93
-
94
- - name: Install gem
95
- run: ${{ steps.build-image.outputs.run-cmd }} gem install --verbose pkg/*.gem
96
-
97
- - name: Run smoke test
98
- run: ${{ steps.build-image.outputs.run-cmd }} ruby -r 'libddwaf' -e 'p Datadog::AppSec::WAF::LibDDWAF.ddwaf_get_version'
99
-
100
- test-rake-binary-on-darwin:
101
- strategy:
102
- fail-fast: false
103
- matrix:
104
- os: [macos-15, macos-15-large]
105
- include:
106
- - os: macos-15
107
- platform: arm64-darwin
108
- - os: macos-15-large
109
- platform: x86_64-darwin
110
-
111
- name: Test gem build (${{ matrix.os }})
112
- runs-on: ${{ matrix.os }}
113
- env:
114
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
115
-
116
- steps:
117
- - name: Checkout
118
- uses: actions/checkout@v4
119
-
120
- - name: Bundle
121
- run: bundle install
122
-
123
- - name: Build binary gem
124
- run: bundle exec rake binary[${{ matrix.platform }}]
125
-
126
- - name: Install gem
127
- run: gem install --verbose pkg/*.gem
128
-
129
- - name: Run smoke test
130
- run: ruby -r 'libddwaf' -e 'p Datadog::AppSec::WAF::LibDDWAF.ddwaf_get_version'
@@ -1,15 +0,0 @@
1
- name: Test for memory leaks
2
- on: [push]
3
- jobs:
4
- test-memcheck:
5
- runs-on: ubuntu-24.04
6
- steps:
7
- - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
8
- - uses: ruby/setup-ruby@f41e084df884422b269f4c01c3748a9df4431a75 # v1.236.0
9
- with:
10
- ruby-version: "3.4"
11
- bundler-cache: true # runs 'bundle install' and caches installed gems automatically
12
- bundler: latest
13
- cache-version: v1 # bump this to invalidate cache
14
- - run: sudo apt-get update && (sudo apt-get install -y valgrind || sleep 5 && sudo apt-get install -y valgrind --no-install-recommends --no-install-suggests) && valgrind --version
15
- - run: bundle exec rake binary spec:memory_leaks:all
@@ -1,123 +0,0 @@
1
- name: Test
2
- on:
3
- - push
4
-
5
- jobs:
6
- test-cruby-linux:
7
- strategy:
8
- fail-fast: false
9
- matrix:
10
- os: [ubuntu-24.04, ubuntu-24.04-arm]
11
- ruby: ["2.5", "2.6", "2.7", "3.0", "3.1", "3.2", "3.3", "3.4"]
12
- libc: [gnu, musl]
13
- include:
14
- - os: ubuntu-24.04
15
- platform: x86_64-linux
16
- - os: ubuntu-24.04-arm
17
- platform: aarch64-linux
18
-
19
- name: Test (Ruby ${{ matrix.ruby }}, ${{ matrix.os }}, ${{ matrix.libc }})
20
- runs-on: ${{ matrix.os }}
21
-
22
- steps:
23
- - name: Checkout
24
- uses: actions/checkout@v4
25
-
26
- - name: Build docker image
27
- id: build-image
28
- uses: ./.github/actions/docker-build-ruby
29
- with:
30
- ruby-version: ${{ matrix.ruby }}
31
- libc: ${{ matrix.libc }}
32
-
33
- - name: Bundle install
34
- run: ${{ steps.build-image.outputs.run-cmd }} bundle install
35
-
36
- - name: Fetch binary library
37
- run: ${{ steps.build-image.outputs.run-cmd }} bundle exec rake fetch[${{ matrix.platform }}]
38
-
39
- - name: Extract binary library
40
- run: ${{ steps.build-image.outputs.run-cmd }} bundle exec rake extract[${{ matrix.platform }}]
41
-
42
- - name: Run specs
43
- run: ${{ steps.build-image.outputs.run-cmd }} bundle exec rake spec
44
-
45
- - name: Run stress tests
46
- run: ${{ steps.build-image.outputs.run-cmd }} bundle exec rake spec:stress_tests
47
-
48
- test-jruby-linux:
49
- strategy:
50
- fail-fast: false
51
- matrix:
52
- os: [ubuntu-24.04, ubuntu-24.04-arm]
53
- jruby: ["9.3", "9.4"]
54
- include:
55
- - os: ubuntu-24.04
56
- platform: x86_64-linux
57
- - os: ubuntu-24.04-arm
58
- platform: aarch64-linux
59
-
60
- name: Test (Jruby ${{ matrix.jruby }}, ${{ matrix.os }})
61
- runs-on: ${{ matrix.os }}
62
-
63
- steps:
64
- - name: Checkout
65
- uses: actions/checkout@v4
66
-
67
- - name: Build docker image
68
- id: build-image
69
- uses: ./.github/actions/docker-build-ruby
70
- with:
71
- ruby-version: ${{ matrix.jruby }}
72
- jruby: true
73
- libc: gnu
74
-
75
- - name: Bundle install
76
- run: ${{ steps.build-image.outputs.run-cmd }} bundle install
77
-
78
- - name: Fetch binary library
79
- run: ${{ steps.build-image.outputs.run-cmd }} bundle exec rake fetch[${{ matrix.platform }}]
80
-
81
- - name: Extract binary library
82
- run: ${{ steps.build-image.outputs.run-cmd }} bundle exec rake extract[${{ matrix.platform }}]
83
-
84
- - name: Run specs
85
- run: ${{ steps.build-image.outputs.run-cmd }} bundle exec rake spec
86
-
87
- - name: Run stress tests
88
- run: ${{ steps.build-image.outputs.run-cmd }} bundle exec rake spec:stress_tests
89
-
90
- test-darwin:
91
- strategy:
92
- fail-fast: false
93
- matrix:
94
- os: [macos-15, macos-15-large]
95
- include:
96
- - os: macos-15
97
- platform: arm64-darwin
98
- - os: macos-15-large
99
- platform: x86_64-darwin
100
-
101
- name: Test (${{ matrix.os }})
102
- runs-on: ${{ matrix.os }}
103
- env:
104
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
105
-
106
- steps:
107
- - name: Checkout
108
- uses: actions/checkout@v4
109
-
110
- - name: Bundle
111
- run: bundle install
112
-
113
- - name: Fetch binary library
114
- run: bundle exec rake fetch[${{ matrix.platform }}]
115
-
116
- - name: Extract binary library
117
- run: bundle exec rake extract[${{ matrix.platform }}]
118
-
119
- - name: Run specs
120
- run: bundle exec rake spec
121
-
122
- - name: Run stress tests
123
- run: bundle exec rake spec:stress_tests
data/.gitignore DELETED
@@ -1,10 +0,0 @@
1
- /.envrc
2
- /vendor/bundle
3
- /vendor/libddwaf
4
- /pkg
5
- /tmp
6
- *.gem
7
- *.vim
8
- .ruby-version
9
- .github-token
10
- Gemfile.lock
data/.steepignore DELETED
@@ -1,4 +0,0 @@
1
- ffi/library.rbs:36:45 "Type `::FFI::DataConverter` is generic but used as a non generic type"
2
- ffi/struct.rbs:5:15 "Type application of `::FFI::Type::Mapped` doesn't satisfy the constraints"
3
- ffi/struct.rbs:23:29 "Type application of `::FFI::Type::Mapped` doesn't satisfy the constraints"
4
- ffi/auto_pointer.rbs:15:65 "Type application of `::FFI::AutoPointer::Releaser::_Proc` doesn't satisfy the constraints"
data/CONTRIBUTING.md DELETED
@@ -1,84 +0,0 @@
1
- # Contributing
2
-
3
- Community contributions to the Datadog bindings to libddwaf for Ruby are welcome! See below for some basic guidelines.
4
-
5
- ## Want to request a new feature?
6
-
7
- Many great ideas for new features come from the community, and we'd be happy to consider yours!
8
-
9
- To share your request, you can [open a Github issue](https://github.com/DataDog/libddwaf-rb/issues/new) with the details about what you'd like to see. At a minimum, please provide:
10
-
11
- - The goal of the new feature
12
- - A description of how it might be used or behave
13
- - Links to any important resources (e.g. Github repos, websites, screenshots, specifications, diagrams)
14
-
15
- Additionally, if you can, include:
16
-
17
- - A description of how it could be accomplished
18
- - Code snippets that might demonstrate its use or implementation
19
- - Screenshots or mockups that visually demonstrate the feature
20
- - Links to similar features that would serve as a good comparison
21
- - (Any other details that would be useful for implementing this feature!)
22
-
23
- Feature requests will be reviewed and discussed.
24
-
25
- ## Found a bug?
26
-
27
- For any urgent matters (such as outages) or issues concerning the Datadog service or UI, contact our support team via https://docs.datadoghq.com/help/ for direct, faster assistance.
28
-
29
- You may submit bug reports concerning the Datadog bindings to libddwaf for Ruby by [opening a Github issue](https://github.com/DataDog/libddwaf-rb/issues/new). At a minimum, please provide:
30
-
31
- - A description of the problem
32
- - Steps to reproduce
33
- - Expected behavior
34
- - Actual behavior
35
- - Errors (with stack traces) or warnings received
36
- - Any details you can share about your configuration including:
37
- - Ruby version & platform
38
- - `libddwaf` version
39
- - Versions of any other relevant gems (or a `Gemfile.lock` if available)
40
-
41
- If at all possible, also provide:
42
-
43
- - Logs from the application or other diagnostics
44
- - Screenshots, links, or other visual aids that are publicly accessible
45
- - Code sample or test that reproduces the problem
46
- - An explanation of what causes the bug and/or how it can be fixed
47
-
48
- Reports that include rich detail are better, and ones with code that reproduce the bug are best. Bug requests will be triaged and reviewed by our collaborators.
49
-
50
- ## Have a patch?
51
-
52
- We welcome code contributions to the library, which you can [submit as a pull request](https://github.com/DataDog/libddwaf-rb/pull/new/master). To create a pull request:
53
-
54
- 1. **Fork the repository** from https://github.com/DataDog/libddwaf-rb
55
- 2. **Make any changes** for your patch.
56
- 3. **Write tests** that demonstrate how the feature works or how the bug is fixed.
57
- 4. **Update any documentation** especially for new features.
58
- 5. **Submit the pull request** from your fork back to the latest revision of the `master` branch on https://github.com/DataDog/libddwaf-rb.
59
-
60
- The pull request will be run through our CI pipeline, and a project member will review the changes with you. At a minimum, to be accepted and merged, pull requests must:
61
-
62
- - Have a stated goal and detailed description of the changes made
63
- - Include thorough test coverage and documentation, where applicable
64
- - Pass all tests and code quality checks (linting/coverage) on CI
65
- - Receive at least one approval from a project member with push permissions
66
-
67
- We also recommend that you share in your description:
68
-
69
- - Any motivations or intent for the contribution
70
- - Links to any issues/pull requests it might be related to
71
- - Links to any webpages or other external resources that might be related to the change
72
- - Screenshots, code samples, or other visual aids that demonstrate the changes or how they are implemented
73
- - Benchmarks if the feature is anticipated to have performance implications
74
- - Any limitations, constraints or risks that are important to consider
75
-
76
- Pull requests will be reviewed by our collaborators.
77
-
78
- For more information on common topics such as debugging locally, or how to write new integrations, check out [our development guide](https://github.com/DataDog/libddwaf-rb/blob/master/README.md#development). If at any point you have a question or need assistance with your pull request, feel free to mention a project member! We're always happy to help contributors with their pull requests.
79
-
80
- ## Final word
81
-
82
- Many thanks to all of our contributors, and looking forward to seeing you on Github! :tada:
83
-
84
- - Datadog Ruby Team
data/Dockerfile DELETED
@@ -1,11 +0,0 @@
1
- FROM ruby:3.4
2
-
3
- RUN apt-get update && apt-get install -y valgrind --no-install-recommends --no-install-suggests
4
-
5
- ADD . /libddwaf-rb
6
-
7
- WORKDIR /libddwaf-rb
8
-
9
- RUN bundle install
10
-
11
- CMD /bin/bash
data/Steepfile DELETED
@@ -1,21 +0,0 @@
1
- # D = Steep::Diagnostic
2
-
3
- target :lib do
4
- signature "sig"
5
-
6
- check "lib"
7
- library "logger"
8
- library "monitor" # needed by logger
9
- library "json"
10
-
11
- repo_path "vendor/rbs"
12
- library "ffi"
13
- library "jruby"
14
- library "gem"
15
-
16
- # configure_code_diagnostics(D::Ruby.strict) # `strict` diagnostics setting
17
- # configure_code_diagnostics(D::Ruby.lenient) # `lenient` diagnostics setting
18
- # configure_code_diagnostics do |hash| # You can setup everything yourself
19
- # hash[D::Ruby::NoMethod] = :information
20
- # end
21
- end
data/shell.nix DELETED
@@ -1,35 +0,0 @@
1
- {
2
- # use the environment channel
3
- pkgs ? import <nixpkgs> {},
4
-
5
- # use a pinned package state
6
- pinned ? import(fetchTarball("https://github.com/NixOS/nixpkgs/archive/14d9b465c71.tar.gz")) {},
7
- }:
8
- let
9
- # specify ruby version to use
10
- ruby = pinned.ruby_3_1;
11
-
12
- # control llvm/clang version (e.g for packages built form source)
13
- llvm = pinned.llvmPackages_12;
14
- in llvm.stdenv.mkDerivation {
15
- # unique project name for this environment derivation
16
- name = "libddwaf-rb.devshell";
17
-
18
- buildInputs = [
19
- ruby
20
- ];
21
-
22
- shellHook = ''
23
- # get major.minor.0 ruby version
24
- export RUBY_VERSION="$(ruby -e 'puts RUBY_VERSION.gsub(/\d+$/, "0")')"
25
-
26
- # make gem install work in-project, compatibly with bundler
27
- export GEM_HOME="$(pwd)/vendor/bundle/ruby/$RUBY_VERSION"
28
-
29
- # make bundle work in-project
30
- export BUNDLE_PATH="$(pwd)/vendor/bundle"
31
-
32
- # enable calling gem scripts without bundle exec
33
- export PATH="$GEM_HOME/bin:$PATH"
34
- '';
35
- }