libddwaf 1.2.1.0.0.beta1 → 1.3.0.0.0.beta1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/datadog/appsec/waf/version.rb +1 -1
- data/lib/datadog/appsec/waf.rb +19 -6
- 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: 16ccaee2b6e8daaf1f8e9a36735efcbae676e9187b9f05b4e5fe71caebb56e14
|
4
|
+
data.tar.gz: 65b0daae53f934308f54f8d5eb68a9364b41a79d663e861ab3f467717468df6c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0b88329d06a6418bd932019f3d68a8802728f240733f7961e38b9c28282eebc93d83c9dd6d8d2fbd626fbfbec0b2c20886b9985621c33031dac8fd104ef48814
|
7
|
+
data.tar.gz: 46315d9182a5ed04064e9599a6df3fc2cbfbdc2a5a0f2a47df55a5c734b3ed2ad9cbaa033916615539d7d6fcc70ba40048e2d972e86a7ea6774bbc79d24653aa
|
data/lib/datadog/appsec/waf.rb
CHANGED
@@ -151,8 +151,19 @@ module Datadog
|
|
151
151
|
typedef Object.by_ref, :ddwaf_rule
|
152
152
|
|
153
153
|
class Config < ::FFI::Struct
|
154
|
-
|
155
|
-
|
154
|
+
class Limits < ::FFI::Struct
|
155
|
+
layout :max_container_size, :uint32,
|
156
|
+
:max_container_depth, :uint32,
|
157
|
+
:max_string_length, :uint32
|
158
|
+
end
|
159
|
+
|
160
|
+
class Obfuscator < ::FFI::Struct
|
161
|
+
layout :key_regex, :string,
|
162
|
+
:value_regex, :string
|
163
|
+
end
|
164
|
+
|
165
|
+
layout :limits, Limits,
|
166
|
+
:obfuscator, Obfuscator
|
156
167
|
end
|
157
168
|
|
158
169
|
typedef Config.by_ref, :ddwaf_config
|
@@ -339,8 +350,9 @@ module Datadog
|
|
339
350
|
class Handle
|
340
351
|
attr_reader :handle_obj
|
341
352
|
|
342
|
-
|
343
|
-
|
353
|
+
DEFAULT_MAX_CONTAINER_SIZE = 0
|
354
|
+
DEFAULT_MAX_CONTAINER_DEPTH = 0
|
355
|
+
DEFAULT_MAX_STRING_LENGTH = 0
|
344
356
|
|
345
357
|
def initialize(rule, config = {})
|
346
358
|
rule_obj = Datadog::AppSec::WAF.ruby_to_object(rule)
|
@@ -353,8 +365,9 @@ module Datadog
|
|
353
365
|
fail LibDDWAF::Error, 'Could not create config struct'
|
354
366
|
end
|
355
367
|
|
356
|
-
config_obj[:
|
357
|
-
config_obj[:
|
368
|
+
config_obj[:limits][:max_container_size] = config[:max_container_size] || DEFAULT_MAX_CONTAINER_SIZE
|
369
|
+
config_obj[:limits][:max_container_depth] = config[:max_container_depth] || DEFAULT_MAX_CONTAINER_DEPTH
|
370
|
+
config_obj[:limits][:max_string_length] = config[:max_string_length] || DEFAULT_MAX_STRING_LENGTH
|
358
371
|
|
359
372
|
ruleset_info = LibDDWAF::RuleSetInfoNone
|
360
373
|
|
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.
|
4
|
+
version: 1.3.0.0.0.beta1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Datadog, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-04-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ffi
|