Closed cataphract closed 1 week ago
Attention: Patch coverage is 82.60870%
with 4 lines
in your changes missing coverage. Please review.
Project coverage is 72.41%. Comparing base (
7b487bd
) to head (74be367
).
Files with missing lines | Patch % | Lines |
---|---|---|
appsec/src/extension/helper_process.c | 60.00% | 3 Missing and 1 partial :warning: |
:exclamation: There is a different number of reports uploaded between BASE (7b487bd) and HEAD (74be367). Click for more details.
HEAD has 1 upload less than BASE
| Flag | BASE (7b487bd) | HEAD (74be367) | |------|------|------| |tracer-php|12|11|
Note that the default value for datadog.appsec.enabled in ext/configuration.h (true) is different from that in datadog.appsec.disabled (false). This is intentional.
As long as this works properly ... Both extensions will write to the same ini_entry in PHP... I think it would be better to keep them in sync and do the name_index < 0 check in the tracer too. Or is there any reason we cannot do this?
I'm confused, dd_appsec_maybe_enable_helper still will have the sidecar sideload the appsec helper (if the sidecar is launched at all) - when the tracer is launched with the sidecar, there's no check in dd_appsec_maybe_enable_helper for appsec disabled?
Benchmark execution time: 2024-11-11 12:24:19
Comparing candidate commit 74be367f87d16c4a0fe4fa6da17dff9bc9db6a7b in PR branch no-helper-with-appsec-disabled
with baseline commit 7b487bd16a9a6bf71b38ade558867025c9aebd9f in branch master
.
Found 0 performance improvements and 0 performance regressions! Performance is the same for 12 metrics, 0 unstable metrics.
Benchmark execution time: 2024-11-11 12:16:52
Comparing candidate commit 74be367f87d16c4a0fe4fa6da17dff9bc9db6a7b in PR branch no-helper-with-appsec-disabled
with baseline commit 7b487bd16a9a6bf71b38ade558867025c9aebd9f in branch master
.
Found 0 performance improvements and 1 performance regressions! Performance is the same for 177 metrics, 0 unstable metrics.
execution_time
[+4.284µs; +8.136µs] or [+2.599%; +4.936%]
Description
Also make datadog.appsec.enabled a system config.
Note that the default value for datadog.appsec.enabled in ext/configuration.h (true) is different from that in datadog.appsec.disabled (false). This is intentional. appsec chooses between three states: explicitly enabled, explicitly disabled and controlled by remote config. Though a questionable decision, the config setting is still a boolean, and the third state is detected by a hack that determines whether the value was explicitly set. Because on the ddtrace side we want to suppress the helper only if explicitly disabled, we can set the default value to true, and disable the helper when the value is false (if the value is not the default true, then it was explicitly set to false).Reviewer checklist