Bump libsqreen (libddwaf-java) to 17.5.0 for libddwaf 2.0.1 - #12118
Bump libsqreen (libddwaf-java) to 17.5.0 for libddwaf 2.0.1#12118jandro996 wants to merge 2 commits into
Conversation
- Fix a stale WAFModuleSpecification assertion: Waf.ResultWithData.events now correctly reflects the "events" array (libddwaf-java#206), so attributes-only rules_compat matches no longer call reportEvents([]). - Fix key_path numeric array indices being serialized as "0.0" instead of "0" via a custom Moshi Double adapter in AppSecEventWrapper, since libddwaf 2.x emits array indices as JSON numbers instead of strings.
|
@codex review |
|
Codex Review: Didn't find any major issues. You're on a roll. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
🎯 Code Coverage (details) 🔗 Commit SHA: 4585573 | Docs | Datadog PR Page | Give us feedback! |
🟢 Java Benchmark SLOs — All performance SLOs passed
PR vs. master results
Commit: Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion. |
There was a problem hiding this comment.
More details
The AppSec event serializer now keeps integral WAF key-path indices as JSON integers while preserving fractional values, and the DTO constructor changes remain compatible with Moshi's field-based deserialization path. No diff-only behavioral regression was identified; execution could not start because the sandbox could not fetch Gradle 9.6.1.
🤖 Datadog Autotest · Commit 4585573 · What is Autotest? · @DataDog review to ask questions · Any feedback? Reach out in #autotest
What Does This Do
io.sqreen:libsqreen(libddwaf-java binding) from17.4.0to17.5.0, which wraps the nativelibddwafbump from1.30.0to2.0.1.WAFModuleSpecification.groovy(rc-000-001/rc-000-002scenarios):Waf.ResultWithData.eventsnow correctly reflects the size of the real"events"JSON array (fixed upstream inlibddwaf-java#206), instead of legacy-defaulting totrue. Attributes-onlyrules_compatmatches no longer trigger a (no-op)reportEvents([])call.AppSecEventWrapperJSON serialization:libddwaf2.x now emits array indices inkey_pathas JSON numbers (e.g.key_path: [0]) instead of strings (key_path: ["0"]). Sincekey_pathisList<Object>, plain Moshi serialization of a whole-numberDoubleproduced0.0instead of0. Added a customJsonAdapter<Double>(IntegralDoubleJsonAdapter) registered onAppSecEventWrapper's Moshi instance that writes whole-number doubles without the trailing.0, while leaving non-integral doubles and Moshi's defaultDoubledeserialization untouched.AppSecEventWrapperTestfrom Groovy/Spock to JUnit 5 Java, adding direct coverage for both the numeric (0.0→0) and non-integral (1.5→1.5)key_pathserialization paths.WAFResultData's nested DTOs (RuleMatch,Rule,Parameter,MatchInfo) left over from the test migration; Moshi never required them for deserialization (falls back toUnsafe-based allocation).Motivation
APPSEC-69428: keep the vendored libddwaf-java binding up to date with the latest native libddwaf release.
Additional Notes
Validated locally by running the full
dd-java-agent:appsectest suite (644 tests) against the real published17.5.0artifact, plus RASP-related tests outside theappsecmodule (java-io-1.8,iast-instrumenter) which don't depend onlibsqreendirectly but exercise adjacent code paths — all green.No changes were made to
libddwaf-javaitself; all fixes live indd-trace-java.Contributor Checklist
type:and (comp:orinst:) labels in addition to any other useful labelsclose,fix, or any linking keywords when referencing an issueUse
solvesinstead, and assign the PR milestone to the issueJira ticket: APPSEC-69428
Note: Once your PR is ready to merge, add it to the merge queue by commenting
/merge./merge -ccancels the queue request./merge -f --reason "reason"skips all merge queue checks; please use this judiciously, as some checks do not run at the PR-level. For more information, see this doc.