-
Notifications
You must be signed in to change notification settings - Fork 438
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
appsec: upgrade libddwaf v1.20.1 & ruleset v1.13.2 #2952
Conversation
if len(cookies) == 0 { | ||
cookies = nil | ||
return b | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This means WithCookies(notNil)
followed by WithCookies(nil)
will leave the old cookies value around...
That feels like a pretty theoretical issue... but I guess if this is the intended behavior it should probably be documented at least?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually this is the behavior for a lot of other optional addresses managed by the address builder. I had to temporarily change it otherwise fingerprints would not generate when there was no cookies in the request but the original goal is still the same: if the map is empty then there nothing for the WAF to run on, so we don't keep nil values. We could also try to delete the previous key in this case but this looks a bit overengineered considering the builder is a short-lived value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't mind adding docs on the WafAddressesBuilder type tho
8102acb
to
b448bf6
Compare
BenchmarksBenchmark execution time: 2024-10-30 09:58:29 Comparing candidate commit b448bf6 in PR branch Found 0 performance improvements and 3 performance regressions! Performance is the same for 56 metrics, 0 unstable metrics. scenario:BenchmarkOTelApiWithCustomTags/datadog_otel_api-24
scenario:BenchmarkOTelApiWithCustomTags/otel_api-24
scenario:BenchmarkStartSpanConcurrent-24
|
Signed-off-by: Eliott Bouhana <[email protected]>
b448bf6
to
272f0f6
Compare
What does this PR do?
This PR does multiple things following the upgrade to the latest release of libddwaf https://github.com/DataDog/libddwaf/releases/tag/1.20.1
Motivation
Reviewer's Checklist
Unsure? Have a question? Request a review!