libddwaf 1.2.1.0.0.beta1-aarch64-linux → 1.3.0.0.0-aarch64-linux
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 +2 -2
- data/lib/datadog/appsec/waf.rb +19 -6
- data/vendor/libddwaf/{libddwaf-1.2.1-linux-aarch64 → libddwaf-1.3.0-linux-aarch64}/include/ddwaf.h +18 -6
- data/vendor/libddwaf/{libddwaf-1.2.1-linux-aarch64 → libddwaf-1.3.0-linux-aarch64}/lib/libddwaf.so +0 -0
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d36ab16a6085f508f571b49bda3ad382c88acf63db4c0ed56bf0d7b6495c2df4
|
4
|
+
data.tar.gz: 7c97139eef2c5ee0463792f1a5380834e765375224236c47aaa21dd5a6cb168d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4ed077f60be0bb2a21b2596c4d09a03af8266a0c842c3e4bcd1f3828c5f7e869fc1986420aca092e3f0c391679d0342375fb36dbf40940d39076fbd2664cd113
|
7
|
+
data.tar.gz: fd41d908ef210f06014eb467664a0d681abc4be4a959630924bfed75a23253a7704ba7b59d22b29c33c91a8508b54e74774048de5929ab8abade64fc625d2342
|
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
|
|
data/vendor/libddwaf/{libddwaf-1.2.1-linux-aarch64 → libddwaf-1.3.0-linux-aarch64}/include/ddwaf.h
RENAMED
@@ -17,8 +17,8 @@ extern "C"
|
|
17
17
|
#include <stddef.h>
|
18
18
|
|
19
19
|
#define DDWAF_MAX_STRING_LENGTH 4096
|
20
|
-
#define
|
21
|
-
#define
|
20
|
+
#define DDWAF_MAX_CONTAINER_DEPTH 20
|
21
|
+
#define DDWAF_MAX_CONTAINER_SIZE 256
|
22
22
|
#define DDWAF_RUN_TIMEOUT 5000
|
23
23
|
|
24
24
|
/**
|
@@ -114,10 +114,22 @@ struct _ddwaf_object
|
|
114
114
|
**/
|
115
115
|
struct _ddwaf_config
|
116
116
|
{
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
117
|
+
struct {
|
118
|
+
/** Maximum size of ddwaf::object containers. */
|
119
|
+
uint32_t max_container_size;
|
120
|
+
/** Maximum depth of ddwaf::object containers. */
|
121
|
+
uint32_t max_container_depth;
|
122
|
+
/** Maximum length of ddwaf::object strings. */
|
123
|
+
uint32_t max_string_length;
|
124
|
+
} limits;
|
125
|
+
|
126
|
+
/** Obfuscator regexes - the strings are owned by the caller */
|
127
|
+
struct {
|
128
|
+
/** Regular expression for key-based obfuscation */
|
129
|
+
const char *key_regex;
|
130
|
+
/** Regular expression for value-based obfuscation */
|
131
|
+
const char *value_regex;
|
132
|
+
} obfuscator;
|
121
133
|
};
|
122
134
|
|
123
135
|
/**
|
data/vendor/libddwaf/{libddwaf-1.2.1-linux-aarch64 → libddwaf-1.3.0-linux-aarch64}/lib/libddwaf.so
RENAMED
Binary file
|
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
|
5
5
|
platform: aarch64-linux
|
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-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ffi
|
@@ -41,8 +41,8 @@ files:
|
|
41
41
|
- lib/datadog/appsec/waf.rb
|
42
42
|
- lib/datadog/appsec/waf/version.rb
|
43
43
|
- lib/libddwaf.rb
|
44
|
-
- vendor/libddwaf/libddwaf-1.
|
45
|
-
- vendor/libddwaf/libddwaf-1.
|
44
|
+
- vendor/libddwaf/libddwaf-1.3.0-linux-aarch64/include/ddwaf.h
|
45
|
+
- vendor/libddwaf/libddwaf-1.3.0-linux-aarch64/lib/libddwaf.so
|
46
46
|
homepage: https://github.com/DataDog/libddwaf
|
47
47
|
licenses:
|
48
48
|
- BSD-3-Clause
|