libddwaf 1.22.0.0.4 → 1.24.1.0.0
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 +4 -4
- data/.github/ISSUE_TEMPLATE/bug.md +32 -0
- data/.github/PULL_REQUEST_TEMPLATE.md +17 -0
- data/.github/actions/docker-build-ruby/Dockerfile +5 -0
- data/.github/actions/docker-build-ruby/Dockerfile.alpine +7 -0
- data/.github/actions/docker-build-ruby/Dockerfile.jruby +6 -0
- data/.github/actions/docker-build-ruby/action.yml +46 -0
- data/.github/workflows/lint.yml +34 -0
- data/.github/workflows/package.yml +130 -0
- data/.github/workflows/test-for-memory-leaks.yml +15 -0
- data/.github/workflows/test.yml +123 -0
- data/.gitignore +10 -0
- data/.steepignore +4 -0
- data/CHANGELOG.md +21 -2
- data/CONTRIBUTING.md +84 -0
- data/Dockerfile +11 -0
- data/Steepfile +21 -0
- data/lib/datadog/appsec/waf/context.rb +24 -38
- data/lib/datadog/appsec/waf/converter.rb +62 -69
- data/lib/datadog/appsec/waf/errors.rb +19 -0
- data/lib/datadog/appsec/waf/handle.rb +30 -77
- data/lib/datadog/appsec/waf/handle_builder.rb +91 -0
- data/lib/datadog/appsec/waf/lib_ddwaf.rb +94 -97
- data/lib/datadog/appsec/waf/version.rb +3 -3
- data/lib/datadog/appsec/waf.rb +9 -7
- data/lib/libddwaf.rb +1 -1
- data/libddwaf.gemspec +8 -13
- data/shell.nix +35 -0
- data/sig/datadog/appsec/waf/context.rbs +5 -15
- data/sig/datadog/appsec/waf/errors.rbs +20 -0
- data/sig/datadog/appsec/waf/handle.rbs +6 -27
- data/sig/datadog/appsec/waf/handle_builder.rbs +23 -0
- data/sig/datadog/appsec/waf/lib_ddwaf.rbs +19 -17
- metadata +23 -10
- data/vendor/libddwaf/libddwaf-1.22.0-darwin-arm64/lib/libddwaf.dylib +0 -0
- data/vendor/libddwaf/libddwaf-1.22.0-darwin-x86_64/lib/libddwaf.dylib +0 -0
- data/vendor/libddwaf/libddwaf-1.22.0-linux-aarch64/lib/libddwaf.so +0 -0
- data/vendor/libddwaf/libddwaf-1.22.0-linux-x86_64/lib/libddwaf.so +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 10d8d57e5c46bce6df51fd1b551831c8d4421144837498ce916c093c0b255b8e
|
4
|
+
data.tar.gz: d8fd00d07b23de9ff1af3be34b0344f0a1404db5da66e219e312a75d8d191942
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 20d4c8ae3986514d5bf69d830a75468973e3688e971fe03068cd3451d58ddb0bf3a9e0ad86303b04c7e42cbef85dc9bf1e61e23e3db77a57374d30422c54b9c2
|
7
|
+
data.tar.gz: bd3c2665b3b5ab606ad59dc48e4eac7cd8f5568c38141d3cee0cddcbb2ba5681186174bbe1804657c47441a204297a1313a86fb3cf25274e398b857732382c77
|
@@ -0,0 +1,32 @@
|
|
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
|
+
|
@@ -0,0 +1,17 @@
|
|
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
|
+
|
@@ -0,0 +1,46 @@
|
|
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"
|
@@ -0,0 +1,34 @@
|
|
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
|
@@ -0,0 +1,130 @@
|
|
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'
|
@@ -0,0 +1,15 @@
|
|
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
|
@@ -0,0 +1,123 @@
|
|
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
ADDED
data/.steepignore
ADDED
@@ -0,0 +1,4 @@
|
|
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/CHANGELOG.md
CHANGED
@@ -1,3 +1,24 @@
|
|
1
|
+
# Unreleased v1.23.0.0.0
|
2
|
+
|
3
|
+
## Added
|
4
|
+
|
5
|
+
- Add `HandleBuilder` class for managing libddwaf configuration and building WAF handles
|
6
|
+
- Add Error classes:
|
7
|
+
- `LibDDWAFError` for libddwaf errors
|
8
|
+
- `ConversionError` for conversion errors
|
9
|
+
- `InstanceFinalizedError` that is raised when attempting to run methods on finalized instances
|
10
|
+
|
11
|
+
## Changed
|
12
|
+
|
13
|
+
- Change `Handle` instantiation - now it should be done using `HandleBuilder#build_handle` method
|
14
|
+
- Change `Context` instantiation - now is should be done using `Handle#build_context` method
|
15
|
+
- Change configuration of Limits and obfuscation - it is now done when initializing `HandleBuilder`
|
16
|
+
- Change `Context#run` to return a `Result` object instead of an tuple with code and result
|
17
|
+
|
18
|
+
## Removed
|
19
|
+
|
20
|
+
- Remove `WAF::Handle#merge` method - the configuration is now handled by `HandleBuilder`
|
21
|
+
|
1
22
|
# 2025-02-20 v.1.18.0.0.1
|
2
23
|
|
3
24
|
- Fixed memory-leak in `Datadog::AppSec::WAF::Context#run` when non-empty ephemeral data passed
|
@@ -12,7 +33,6 @@
|
|
12
33
|
- Update to libddwaf 1.14.0
|
13
34
|
- Add support for `Float` and `Nil` scalar values when converting from ruby to WAF Object and vice versa.
|
14
35
|
|
15
|
-
|
16
36
|
# 2023-08-29 v.1.11.0.0.0
|
17
37
|
|
18
38
|
- Update to libddwaf 1.11.0
|
@@ -21,7 +41,6 @@
|
|
21
41
|
- Changed `Datadog::AppSec::WAF::Result#data` to `Datadog::AppSec::WAF::Result#events`. (Breaking change)
|
22
42
|
The schema of the events variable can be found [here](https://github.com/DataDog/libddwaf/blob/master/schema/events.json)
|
23
43
|
|
24
|
-
|
25
44
|
# 2023-08-28 v.1.10.0.0.0
|
26
45
|
|
27
46
|
- Update to libddwaf 1.10.0
|
data/CONTRIBUTING.md
ADDED
@@ -0,0 +1,84 @@
|
|
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
ADDED
data/Steepfile
ADDED
@@ -0,0 +1,21 @@
|
|
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
|