Skip to content

Conversation

@Anilm3
Copy link
Collaborator

@Anilm3 Anilm3 commented Jul 31, 2025

This PR improves negated operators with the following changes:

  • Support for key path, only raise an event when there key path is actually present
  • When using key paths containing a scalar or a single-value array, report the value that didn't match
  • Ignore non-evaluated non-matches (e,g. incompatible type)

Related Jiras: APPSEC-58464

@codecov-commenter
Copy link

codecov-commenter commented Jul 31, 2025

Codecov Report

❌ Patch coverage is 81.45695% with 28 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.36%. Comparing base (3911a64) to head (3e04e1e).

Files with missing lines Patch % Lines
src/condition/negated_scalar_condition.cpp 77.41% 9 Missing and 12 partials ⚠️
src/condition/negated_scalar_condition.hpp 76.92% 0 Missing and 3 partials ⚠️
src/object_helpers.cpp 87.50% 1 Missing and 2 partials ⚠️
src/object_helpers.hpp 83.33% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #435      +/-   ##
==========================================
- Coverage   85.45%   85.36%   -0.10%     
==========================================
  Files         176      179       +3     
  Lines        9029     9085      +56     
  Branches     3966     4001      +35     
==========================================
+ Hits         7716     7755      +39     
- Misses        511      517       +6     
- Partials      802      813      +11     
Flag Coverage Δ
waf_test 85.36% <81.45%> (-0.10%) ⬇️

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.

@github-actions
Copy link

github-actions bot commented Jul 31, 2025

Artifact Size Comparison 📦

Artifact Previous Release This PR Difference
darwin-arm64::libddwaf.a 83315344 86105528 0.03%
darwin-arm64::libddwaf.a.stripped 4352184 4442896 0.02%
darwin-arm64::libddwaf.dylib 1919536 1920368 0.00%
darwin-universal::libddwaf.a 167911160 173548224 0.03%
darwin-universal::libddwaf.a.stripped 9268592 9465600 0.02%
darwin-universal::libddwaf.dylib 4033072 4050288 0.00%
darwin-x86_64::libddwaf.a 84595768 87442648 0.03%
darwin-x86_64::libddwaf.a.stripped 4916360 5022656 0.02%
darwin-x86_64::libddwaf.dylib 2091048 2107008 0.00%
linux-aarch64::libddwaf.a 68876962 70896324 0.02%
linux-aarch64::libddwaf.a.stripped 11720766 11575224 -0.01%
linux-aarch64::libddwaf.so 2429048 2427912 0.00%
linux-armv7::libddwaf.a 60213732 62633514 0.04%
linux-armv7::libddwaf.a.stripped 10612116 10576914 0.00%
linux-armv7::libddwaf.so 2103320 2108812 0.00%
linux-i386::libddwaf.a 58414994 60811086 0.04%
linux-i386::libddwaf.a.stripped 9009642 9140778 0.01%
linux-i386::libddwaf.so 2302460 2346940 0.01%
linux-x86_64::libddwaf.a 68977050 71366196 0.03%
linux-x86_64::libddwaf.a.stripped 11389686 11397112 0.00%
linux-x86_64::libddwaf.so 2602216 2616768 0.00%
windows-win32::ddwaf.dll 3292160 3298304 0.00%
windows-win32::ddwaf.lib 11684 11922 0.02%
windows-win32::ddwaf_static.lib 46934870 47761224 0.01%
windows-x64::ddwaf.dll 4021248 4030976 0.00%
windows-x64::ddwaf.lib 11464 11698 0.02%
windows-x64::ddwaf_static.lib 54410908 55348470 0.01%
windows-x86_64::libddwaf.a 6204034 6263042 0.00%
windows-x86_64::libddwaf.dll 18785618 18798493 0.00%
windows-x86_64::libddwaf.dll.a 31292 31948 0.02%

@pr-commenter
Copy link

pr-commenter bot commented Jul 31, 2025

Benchmarks clang

Benchmark execution time: 2025-08-01 12:03:04

Comparing candidate commit 3e04e1e in PR branch anilm3/negated-operator-fixes with baseline commit 3911a64 in branch master.

Found 0 performance improvements and 1 performance regressions! Performance is the same for 0 metrics, 0 unstable metrics.

scenario:global-benchmark.random.clang

  • 🟥 execution_time [+41.204ms; +41.219ms] or [+16.797%; +16.803%]

@pr-commenter
Copy link

pr-commenter bot commented Jul 31, 2025

Benchmarks gcc

Benchmark execution time: 2025-08-01 12:04:38

Comparing candidate commit 3e04e1e in PR branch anilm3/negated-operator-fixes with baseline commit 3911a64 in branch master.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 1 metrics, 0 unstable metrics.

@pr-commenter
Copy link

pr-commenter bot commented Jul 31, 2025

Benchmarks clang-pgo

Benchmark execution time: 2025-08-01 12:18:11

Comparing candidate commit 3e04e1e in PR branch anilm3/negated-operator-fixes with baseline commit 3911a64 in branch master.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 1 metrics, 0 unstable metrics.

@Anilm3 Anilm3 force-pushed the anilm3/negated-operator-fixes branch 2 times, most recently from 34f11c0 to e2ccdfb Compare July 31, 2025 13:15
@Anilm3 Anilm3 marked this pull request as ready for review July 31, 2025 13:16
@Anilm3 Anilm3 requested a review from a team as a code owner July 31, 2025 13:16
@Anilm3 Anilm3 force-pushed the anilm3/negated-operator-fixes branch from e2ccdfb to 22acf78 Compare July 31, 2025 13:22
@Anilm3 Anilm3 force-pushed the anilm3/negated-operator-fixes branch from 22acf78 to 06fb65b Compare July 31, 2025 13:59
@Anilm3 Anilm3 merged commit 4e27ccd into master Aug 1, 2025
56 checks passed
@Anilm3 Anilm3 deleted the anilm3/negated-operator-fixes branch August 1, 2025 12:40
Sign up for free to 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.

4 participants