libddwaf 1.25.1.0.1-arm64-darwin → 1.25.1.1.0-arm64-darwin
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/CHANGELOG.md +6 -0
- data/lib/datadog/appsec/waf/context.rb +3 -3
- data/lib/datadog/appsec/waf/converter.rb +2 -2
- data/lib/datadog/appsec/waf/handle_builder.rb +1 -1
- data/lib/datadog/appsec/waf/version.rb +1 -1
- data/sig/datadog/appsec/waf/context.rbs +4 -4
- data/sig/datadog/appsec/waf/converter.rbs +1 -1
- data/sig/datadog/appsec/waf/errors.rbs +2 -2
- data/sig/datadog/appsec/waf/handle_builder.rbs +1 -1
- data/sig/datadog/appsec/waf/result.rbs +10 -13
- data/sig/datadog/appsec/waf.rbs +38 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c2f86f8104fb75e40fe1257dbc7bb880d3169b0657b974f543bffa34695187ba
|
4
|
+
data.tar.gz: 9c641a479725a12f8f45e7fb9e93640747eb2094a3d438c508157f2e9d811e6b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 55e303fc93d4834b7cf67ba6ee131b5044d6164eea418d28164517b41dd45454c7cf6f44b88c6845bdcbb7792fc804d77e1b6905b03d2d63a221b8043a4e4166
|
7
|
+
data.tar.gz: afab34467bb649dc1d190b3a43bd856e6647d26f38719eb63d630d44f7eb70a398ce573a6ae86d677418ecd97192052e67fb99ac99ad4935dd8aa73b001080d8
|
data/CHANGELOG.md
CHANGED
@@ -7,9 +7,9 @@ module Datadog
|
|
7
7
|
# See https://github.com/DataDog/libddwaf/blob/10e3a1dfc7bc9bb8ab11a09a9f8b6b339eaf3271/BINDING_IMPL_NOTES.md?plain=1#L125-L158
|
8
8
|
class Context
|
9
9
|
EMPTY_RESULT = {
|
10
|
-
"events" => [], #:
|
11
|
-
"actions" => {}, #:
|
12
|
-
"attributes" => {}, #:
|
10
|
+
"events" => [], #: WAF::events
|
11
|
+
"actions" => {}, #: WAF::actions
|
12
|
+
"attributes" => {}, #: WAF::attributes
|
13
13
|
"duration" => 0,
|
14
14
|
"timeout" => false,
|
15
15
|
"keep" => false
|
@@ -164,13 +164,13 @@ module Datadog
|
|
164
164
|
when :ddwaf_obj_float
|
165
165
|
obj[:valueUnion][:f64]
|
166
166
|
when :ddwaf_obj_array
|
167
|
-
(0...obj[:nbEntries]).each.with_object([]) do |i, a| #$ ::Array[WAF::
|
167
|
+
(0...obj[:nbEntries]).each.with_object([]) do |i, a| #$ ::Array[WAF::opaque]
|
168
168
|
ptr = obj[:valueUnion][:array] + i * LibDDWAF::Object.size
|
169
169
|
e = Converter.object_to_ruby(LibDDWAF::Object.new(ptr))
|
170
170
|
a << e
|
171
171
|
end
|
172
172
|
when :ddwaf_obj_map
|
173
|
-
(0...obj[:nbEntries]).each.with_object({}) do |i, h| #$ ::Hash[::String, WAF::
|
173
|
+
(0...obj[:nbEntries]).each.with_object({}) do |i, h| #$ ::Hash[::String, WAF::opaque]
|
174
174
|
ptr = obj[:valueUnion][:array] + i * Datadog::AppSec::WAF::LibDDWAF::Object.size
|
175
175
|
o = Datadog::AppSec::WAF::LibDDWAF::Object.new(ptr)
|
176
176
|
l = o[:parameterNameLength]
|
@@ -58,7 +58,7 @@ module Datadog
|
|
58
58
|
def add_or_update_config(config, path:)
|
59
59
|
ensure_pointer_presence!
|
60
60
|
|
61
|
-
config_obj = Converter.ruby_to_object(config)
|
61
|
+
config_obj = Converter.ruby_to_object(config, coerce: false)
|
62
62
|
diagnostics_obj = LibDDWAF::Object.new
|
63
63
|
|
64
64
|
LibDDWAF.ddwaf_builder_add_or_update_config(@builder_ptr, path, path.length, config_obj, diagnostics_obj)
|
@@ -5,7 +5,7 @@ module Datadog
|
|
5
5
|
BASE_STRING = "1.25.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
|
8
|
+
STRING = "#{BASE_STRING}.1.0"
|
9
9
|
MINIMUM_RUBY_VERSION = "2.5"
|
10
10
|
end
|
11
11
|
end
|
@@ -4,12 +4,12 @@ module Datadog
|
|
4
4
|
class Context
|
5
5
|
@context_ptr: ::FFI::Pointer
|
6
6
|
|
7
|
-
@retained: Array[
|
7
|
+
@retained: Array[untyped]
|
8
8
|
|
9
9
|
EMPTY_RESULT: {
|
10
|
-
"events" =>
|
11
|
-
"actions" =>
|
12
|
-
"attributes" =>
|
10
|
+
"events" => WAF::events,
|
11
|
+
"actions" => WAF::actions,
|
12
|
+
"attributes" => WAF::attributes,
|
13
13
|
"duration" => ::Integer,
|
14
14
|
"timeout" => bool,
|
15
15
|
"keep" => bool
|
@@ -11,9 +11,9 @@ module Datadog
|
|
11
11
|
end
|
12
12
|
|
13
13
|
class LibDDWAFError < Error
|
14
|
-
attr_reader diagnostics: WAF::
|
14
|
+
attr_reader diagnostics: WAF::opaque
|
15
15
|
|
16
|
-
def initialize: (::String msg, ?diagnostics: WAF::
|
16
|
+
def initialize: (::String msg, ?diagnostics: WAF::opaque?) -> void
|
17
17
|
end
|
18
18
|
end
|
19
19
|
end
|
@@ -10,7 +10,7 @@ module Datadog
|
|
10
10
|
|
11
11
|
def build_handle: () -> Handle
|
12
12
|
|
13
|
-
def add_or_update_config: (WAF::input config, path: ::String) -> WAF::
|
13
|
+
def add_or_update_config: (WAF::input config, path: ::String) -> WAF::opaque
|
14
14
|
|
15
15
|
def remove_config_at_path: (::String path) -> bool
|
16
16
|
|
@@ -2,16 +2,13 @@ module Datadog
|
|
2
2
|
module AppSec
|
3
3
|
module WAF
|
4
4
|
class Result
|
5
|
-
type list = ::Array[WAF::output]
|
6
|
-
type map = ::Hash[::String, WAF::output]
|
7
|
-
|
8
5
|
@status: ::Symbol
|
9
6
|
|
10
|
-
@events:
|
7
|
+
@events: WAF::events
|
11
8
|
|
12
|
-
@actions:
|
9
|
+
@actions: WAF::actions
|
13
10
|
|
14
|
-
@attributes:
|
11
|
+
@attributes: WAF::attributes
|
15
12
|
|
16
13
|
@duration: ::Integer
|
17
14
|
|
@@ -23,19 +20,19 @@ module Datadog
|
|
23
20
|
|
24
21
|
attr_reader status: ::Symbol
|
25
22
|
|
26
|
-
attr_reader events:
|
23
|
+
attr_reader events: WAF::events
|
27
24
|
|
28
|
-
attr_reader actions:
|
25
|
+
attr_reader actions: WAF::actions
|
29
26
|
|
30
|
-
attr_reader attributes:
|
27
|
+
attr_reader attributes: WAF::attributes
|
31
28
|
|
32
29
|
attr_reader duration: ::Integer
|
33
30
|
|
34
31
|
def initialize: (
|
35
32
|
status: ::Symbol,
|
36
|
-
events:
|
37
|
-
actions:
|
38
|
-
attributes:
|
33
|
+
events: WAF::events,
|
34
|
+
actions: WAF::actions,
|
35
|
+
attributes: WAF::attributes,
|
39
36
|
duration: ::Integer,
|
40
37
|
timeout: bool,
|
41
38
|
keep: bool
|
@@ -49,7 +46,7 @@ module Datadog
|
|
49
46
|
|
50
47
|
def input_truncated?: () -> bool
|
51
48
|
|
52
|
-
def to_h: () -> ::Hash[::Symbol, (::Symbol | WAF::
|
49
|
+
def to_h: () -> ::Hash[::Symbol, (::Symbol | WAF::opaque)]
|
53
50
|
end
|
54
51
|
end
|
55
52
|
end
|
data/sig/datadog/appsec/waf.rbs
CHANGED
@@ -2,8 +2,45 @@ module Datadog
|
|
2
2
|
module AppSec
|
3
3
|
module WAF
|
4
4
|
type input = nil | bool | ::String | ::Symbol | ::Integer | ::Float | ::Array[input] | ::Hash[input, input]
|
5
|
-
type output = nil | bool | ::String | ::Integer | ::Float | ::Array[output] | ::Hash[::String, output]
|
6
5
|
type known_addresses = ::Array[::String]
|
6
|
+
type result = {
|
7
|
+
"keep" => bool,
|
8
|
+
"events" => events,
|
9
|
+
"actions" => actions,
|
10
|
+
"attributes" => attributes,
|
11
|
+
"timeout" => bool,
|
12
|
+
# NOTE: Schema defines it as a `number`, but we alway get it as `Integer`
|
13
|
+
# That will be fixed in the libddwaf specs
|
14
|
+
"duration" => ::Integer
|
15
|
+
}
|
16
|
+
type events = ::Array[event]
|
17
|
+
type event = {"rule" => rule, "rule_matches" => ::Array[rule_match]}
|
18
|
+
type rule = {
|
19
|
+
"id" => ::String,
|
20
|
+
"name" => ::String,
|
21
|
+
"tags" => {
|
22
|
+
"type" => ::String,
|
23
|
+
# optional key
|
24
|
+
"category" => ::String?
|
25
|
+
},
|
26
|
+
# optional key
|
27
|
+
"on_match" => ::Array[::String]?
|
28
|
+
}
|
29
|
+
type rule_match = {
|
30
|
+
"operator" => ::String,
|
31
|
+
"operator_value" => ::String,
|
32
|
+
"parameters" => ::Array[rule_match_parameter]
|
33
|
+
}
|
34
|
+
type rule_match_parameter = {
|
35
|
+
"address" => ::String,
|
36
|
+
"key_path" => ::Array[::String | ::Integer],
|
37
|
+
"value" => ::String,
|
38
|
+
"highlight" => ::Array[::String]
|
39
|
+
}
|
40
|
+
type actions = ::Hash[::String, action]
|
41
|
+
type action = ::Hash[::String, ::String]
|
42
|
+
type attributes = ::Hash[::String, opaque]
|
43
|
+
type opaque = nil | bool | ::String | ::Integer | ::Float | ::Array[opaque] | ::Hash[::String, opaque]
|
7
44
|
|
8
45
|
self.@logger: ::Logger
|
9
46
|
|
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.25.1.0
|
4
|
+
version: 1.25.1.1.0
|
5
5
|
platform: arm64-darwin
|
6
6
|
authors:
|
7
7
|
- Datadog, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-09-
|
11
|
+
date: 2025-09-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ffi
|