Skip to content

Upgrade libddwaf to 1.25.1 - #175

Merged
sezen-datadog merged 2 commits into
masterfrom
sezen.leblay/APPSEC-58057-upgrade-libddwaf-1.25.1
Jun 25, 2025
Merged

Upgrade libddwaf to 1.25.1#175
sezen-datadog merged 2 commits into
masterfrom
sezen.leblay/APPSEC-58057-upgrade-libddwaf-1.25.1

Conversation

@sezen-datadog

@sezen-datadogsezen-datadog commented Jun 23, 2025

Copy link
Copy Markdown
Contributor

Upgrades libddwaf to 1.25.1, this version removes the ddwaf_result object and advises the use of ddwaf_object
https://github.com/DataDog/libddwaf/blob/master/UPGRADING.md#upgrading-from-124x-to-1250

@sezen-datadog
sezen-datadogforce-pushed the sezen.leblay/APPSEC-58057-upgrade-libddwaf-1.25.1 branch 2 times, most recently from 695f1ad to 9c93451CompareJune 23, 2025 11:53
@sezen-datadog
sezen-datadog marked this pull request as ready for review June 23, 2025 13:07
@sezen-datadog
sezen-datadog requested a review from a team as a code ownerJune 23, 2025 13:07
@sezen-datadog
sezen-datadogforce-pushed the sezen.leblay/APPSEC-58057-upgrade-libddwaf-1.25.1 branch from bacc163 to 17e26cfCompareJune 23, 2025 13:08
@codecov-commenter

codecov-commenter commented Jun 23, 2025

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 76.00000% with 6 lines in your changes missing coverage. Please review.

Project coverage is 56.93%. Comparing base (47c2db6) to head (41c83b3).
Report is 61 commits behind head on master.

Files with missing linesPatch %Lines
src/main/c/waf_jni.c76.00%0 Missing and 6 partials ⚠️
Additional details and impacted files
@@ Coverage Diff @@## master #175 +/- ##
============================================
- Coverage 58.55% 56.93% -1.63% - Complexity 134 175 +41 
============================================
Files 34 34 Lines 3458 3548 +90 Branches 780 796 +16 ============================================
- Hits 2025 2020 -5 - Misses 900 975 +75 - Partials 533 553 +20 
FlagCoverage Δ
helper56.93% <76.00%> (-1.63%)⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sezen-datadog
sezen-datadogforce-pushed the sezen.leblay/APPSEC-58057-upgrade-libddwaf-1.25.1 branch from b53e6c6 to 17e26cfCompareJune 24, 2025 12:53
Comment threadsrc/main/c/waf_jni.c Outdated
@sezen-datadog
sezen-datadogforce-pushed the sezen.leblay/APPSEC-58057-upgrade-libddwaf-1.25.1 branch from 04030c5 to c74e9d1CompareJune 25, 2025 08:48
@sezen-datadog
sezen-datadog enabled auto-merge (squash) June 25, 2025 09:09
Comment threadsrc/main/c/waf_jni.c
if (duration_obj != NULL && duration_obj->type == DDWAF_OBJ_UNSIGNED) {
duration = (jlong) ddwaf_object_get_unsigned(duration_obj);
}
metrics_update_checked(env, metrics_obj, 0, duration);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Does it make sense to update the metrics when we can´t parse the duration received? (maybe it's better to include it inside the if statement)

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

i feel like this is okay, seeing how metrics_update_checked was called before when we were not sure if the attribute was there or not, but i can make another PR to shove it in the if

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

(sorry had auto merge on thinking there was no more issue 😓 )

@sezen-datadog
sezen-datadog merged commit 8516bc9 into masterJun 25, 2025
@sezen-datadog
sezen-datadog deleted the sezen.leblay/APPSEC-58057-upgrade-libddwaf-1.25.1 branch June 25, 2025 09:29
@sezen-datadog
sezen-datadog restored the sezen.leblay/APPSEC-58057-upgrade-libddwaf-1.25.1 branch June 25, 2025 09:30
sezen-datadog added a commit that referenced this pull request Jun 25, 2025
@sezen-datadog
sezen-datadog deleted the sezen.leblay/APPSEC-58057-upgrade-libddwaf-1.25.1 branch June 25, 2025 09:30
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@sezen-datadog@codecov-commenter@manuel-alvarez-alvarez