Conversation
Since addresses' values are not coerced in the bindings the values are passed as is except for status code which the waf requires to be a string.
BenchmarksBenchmark execution time: 2023-11-22 08:45:09 Comparing candidate commit 7e67975 in PR branch Found 1 performance improvements and 0 performance regressions! Performance is the same for 520 metrics, 11 unstable metrics. scenario:plugin-graphql-with-depth-off-18
|
The address is held in the context so there is no need to pass it twice. Because of this there is no need to save the sample decision in the context.
Overall package sizeSelf size: 5.58 MB Dependency sizes
🤖 This report was automatically generated by heaviest-objects-in-the-universe |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #3685 +/- ##
==========================================
- Coverage 85.25% 85.14% -0.11%
==========================================
Files 230 228 -2
Lines 9482 9345 -137
Branches 33 33
==========================================
- Hits 8084 7957 -127
+ Misses 1398 1388 -10 ☔ View full report in Codecov by Sentry. |
uurien
left a comment
There was a problem hiding this comment.
Can we create an extra test in index.express.plugin.spec.js doing a real call?
| derivatives.forEach((address) => { | ||
| for (const [key, value] of Object.entries(address)) { | ||
| if (key.includes('_dd.appsec.s.req')) { | ||
| const gzippedValue = zlib.gzipSync(JSON.stringify(value)) |
There was a problem hiding this comment.
Is there a way for us to not do this synchronously ? zlib will use a different thread and here the whole process will wait for that operation :/
771a71f to
218cee0
Compare
simon-id
left a comment
There was a problem hiding this comment.
Maybe also add a statistical test that make sure the sampling is working as intended ?
0a33761 to
b0a755f
Compare
b0a755f to
f198e84
Compare
* Remove requiredAddresses from WAF context. * Improve configuration tests.
* Config variables. * Add support for schema reporting. * Add support for schema extraction on request addresses. * Pass response's status code as string. --------- Co-authored-by: Ugaitz Urien <ugaitz.urien@datadoghq.com> Co-authored-by: simon-id <simon.id@datadoghq.com>
* Config variables. * Add support for schema reporting. * Add support for schema extraction on request addresses. * Pass response's status code as string. --------- Co-authored-by: Ugaitz Urien <ugaitz.urien@datadoghq.com> Co-authored-by: simon-id <simon.id@datadoghq.com>
* Config variables. * Add support for schema reporting. * Add support for schema extraction on request addresses. * Pass response's status code as string. --------- Co-authored-by: Ugaitz Urien <ugaitz.urien@datadoghq.com> Co-authored-by: simon-id <simon.id@datadoghq.com>
* Config variables. * Add support for schema reporting. * Add support for schema extraction on request addresses. * Pass response's status code as string. --------- Co-authored-by: Ugaitz Urien <ugaitz.urien@datadoghq.com> Co-authored-by: simon-id <simon.id@datadoghq.com>
* Config variables. * Add support for schema reporting. * Add support for schema extraction on request addresses. * Pass response's status code as string. --------- Co-authored-by: Ugaitz Urien <ugaitz.urien@datadoghq.com> Co-authored-by: simon-id <simon.id@datadoghq.com>
* Config variables. * Add support for schema reporting. * Add support for schema extraction on request addresses. * Pass response's status code as string. --------- Co-authored-by: Ugaitz Urien <ugaitz.urien@datadoghq.com> Co-authored-by: simon-id <simon.id@datadoghq.com>
* Config variables. * Add support for schema reporting. * Add support for schema extraction on request addresses. * Pass response's status code as string. --------- Co-authored-by: Ugaitz Urien <ugaitz.urien@datadoghq.com> Co-authored-by: simon-id <simon.id@datadoghq.com>
* Config variables. * Add support for schema reporting. * Add support for schema extraction on request addresses. * Pass response's status code as string. --------- Co-authored-by: Ugaitz Urien <ugaitz.urien@datadoghq.com> Co-authored-by: simon-id <simon.id@datadoghq.com>
What does this PR do?
This PR add support for schema extraction when calling the waf. It does so by passing a new key inside
waf.context.processoraddress.