Skip to content

Bump libsqreen (libddwaf-java) to 17.5.0 for libddwaf 2.0.1 - #12118

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 3 commits into
masterfrom
update-libddwaf-java
Aug 5, 2026
Merged

Bump libsqreen (libddwaf-java) to 17.5.0 for libddwaf 2.0.1#12118
gh-worker-dd-mergequeue-cf854d[bot] merged 3 commits into
masterfrom
update-libddwaf-java

Conversation

@jandro996

@jandro996 jandro996 commented Jul 31, 2026

Copy link
Copy Markdown
Member

What Does This Do

  • Bumps io.sqreen:libsqreen (libddwaf-java binding) from 17.4.0 to 17.5.0, which wraps the native libddwaf bump from 1.30.0 to 2.0.1.
  • Fixes WAFModuleSpecification.groovy (rc-000-001/rc-000-002 scenarios): Waf.ResultWithData.events now correctly reflects the size of the real "events" JSON array (fixed upstream in libddwaf-java#206), instead of legacy-defaulting to true. Attributes-only rules_compat matches no longer trigger a (no-op) reportEvents([]) call.
  • Fixes AppSecEventWrapper JSON serialization: libddwaf 2.x now emits array indices in key_path as JSON numbers (e.g. key_path: [0]) instead of strings (key_path: ["0"]). Since key_path is List<Object>, plain Moshi serialization of a whole-number Double produced 0.0 instead of 0. Added a custom JsonAdapter<Double> (IntegralDoubleJsonAdapter) registered on AppSecEventWrapper's Moshi instance that writes whole-number doubles without the trailing .0, while leaving non-integral doubles and Moshi's default Double deserialization untouched.
  • Migrates AppSecEventWrapperTest from Groovy/Spock to JUnit 5 Java, adding direct coverage for both the numeric (0.00) and non-integral (1.51.5) key_path serialization paths.
  • Removes now-unused no-arg constructors from WAFResultData's nested DTOs (RuleMatch, Rule, Parameter, MatchInfo) left over from the test migration; Moshi never required them for deserialization (falls back to Unsafe-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:appsec test suite (644 tests) against the real published 17.5.0 artifact, plus RASP-related tests outside the appsec module (java-io-1.8, iast-instrumenter) which don't depend on libsqreen directly but exercise adjacent code paths — all green.

No changes were made to libddwaf-java itself; all fixes live in dd-trace-java.

Contributor Checklist

Jira ticket: APPSEC-69428

Note: Once your PR is ready to merge, add it to the merge queue by commenting /merge. /merge -c cancels 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.

- 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.
@jandro996 jandro996 added comp: asm waf Application Security Management (WAF) type: bug fix Bug fix labels Jul 31, 2026
@jandro996

Copy link
Copy Markdown
Member Author

@codex review

@jandro996 jandro996 added type: feature Enhancements and improvements and removed type: bug fix Bug fix labels Jul 31, 2026
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. You're on a roll.

Reviewed commit: 0ee0477f73

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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".

@datadog-datadog-us1-prod

datadog-datadog-us1-prod Bot commented Jul 31, 2026

Copy link
Copy Markdown

🎯 Code Coverage (details)
Patch Coverage: 64.29%
Overall Coverage: 55.94% (-1.98%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 2259a12 | Docs | Datadog PR Page | Give us feedback!

@dd-octo-sts

dd-octo-sts Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

🟢 Java Benchmark SLOs — All performance SLOs passed

Suite Status
Startup 🟢 pass

SLO thresholds are defined here based on automatically generated metrics. A warning is raised when results are within 5% of the threshold.

PR vs. master results
Scenario Candidate master Δ (95% CI of mean)
startup:insecure-bank:iast:Agent 14.78 s 14.68 s [-0.1%; +1.4%] (no difference)
startup:insecure-bank:tracing:Agent 13.52 s 13.68 s [-2.0%; -0.5%] (maybe better)
startup:petclinic:appsec:Agent 16.84 s 16.64 s [+0.3%; +2.0%] (maybe worse)
startup:petclinic:iast:Agent 16.31 s 16.82 s [-7.4%; +1.3%] (no difference)
startup:petclinic:profiling:Agent 16.67 s 16.77 s [-1.8%; +0.6%] (no difference)
startup:petclinic:sca:Agent 16.21 s 16.47 s [-5.8%; +2.7%] (no difference)
startup:petclinic:tracing:Agent 16.02 s 16.08 s [-1.2%; +0.4%] (no difference)

Commit: 2259a12b · CI Pipeline · Benchmarking Platform UI


Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion.

@jandro996
jandro996 marked this pull request as ready for review July 31, 2026 09:57
@jandro996
jandro996 requested a review from a team as a code owner July 31, 2026 09:57

@datadog-datadog-us1-prod datadog-datadog-us1-prod Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Datadog Autotest: PASS

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.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Datadog Autotest · Commit 4585573 · What is Autotest? · @DataDog review to ask questions · Any feedback? Reach out in #autotest

@jandro996
jandro996 added this pull request to the merge queue Aug 5, 2026
@dd-octo-sts

dd-octo-sts Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

/merge

@gh-worker-devflow-routing-ef8351

gh-worker-devflow-routing-ef8351 Bot commented Aug 5, 2026

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2026-08-05 08:05:59 UTC ℹ️ Start processing command /merge


2026-08-05 08:06:04 UTC ℹ️ MergeQueue: pull request added to the queue

The expected merge time in master is approximately 1h (p90).


2026-08-05 08:21:35 UTCMergeQueue: The build pipeline contains failing jobs for this merge request

Build pipeline has failing jobs for b3969fb:

⚠️ Do NOT retry failed jobs directly (why?).

What to do next?

  • Investigate the failures and when ready, re-add your pull request to the queue!
  • If your PR checks are green, try to rebase/merge. It might be because the CI run is a bit old.
  • Any question, go check the FAQ.
Details

Since those jobs are not marked as being allowed to fail, the pipeline will most likely fail.
Therefore, and to allow other builds to be processed, this merge request has been rejected and the pipeline got canceled.

@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 5, 2026
@jandro996
jandro996 added this pull request to the merge queue Aug 5, 2026
@dd-octo-sts

dd-octo-sts Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

/merge

@gh-worker-devflow-routing-ef8351

gh-worker-devflow-routing-ef8351 Bot commented Aug 5, 2026

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2026-08-05 10:07:14 UTC ℹ️ Start processing command /merge


2026-08-05 10:07:18 UTC ℹ️ MergeQueue: pull request added to the queue

The expected merge time in master is approximately 1h (p90).


2026-08-05 11:00:51 UTC ℹ️ MergeQueue: This merge request was merged

@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 5, 2026
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot merged commit 0ea0aaf into master Aug 5, 2026
795 of 797 checks passed
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot deleted the update-libddwaf-java branch August 5, 2026 11:00
@github-actions github-actions Bot added this to the 1.66.0 milestone Aug 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp: asm waf Application Security Management (WAF) type: feature Enhancements and improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants