Skip to content

Validator: Add support for testing subcontexts and attributes#451

Merged
Anilm3 merged 2 commits into
anilm3/v2from
anilm3/validator-subcontext
Sep 15, 2025
Merged

Validator: Add support for testing subcontexts and attributes#451
Anilm3 merged 2 commits into
anilm3/v2from
anilm3/validator-subcontext

Conversation

@Anilm3

@Anilm3 Anilm3 commented Sep 12, 2025

Copy link
Copy Markdown
Collaborator

This PR adds support for subcontexts (replacing ephemerals) and attributes as part of the validator, the tests have also been updated.

@codecov-commenter

codecov-commenter commented Sep 12, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.85%. Comparing base (7c65d96) to head (d5333cc).

Additional details and impacted files
@@              Coverage Diff              @@
##           anilm3/v2     #451      +/-   ##
=============================================
+ Coverage      84.71%   84.85%   +0.13%     
=============================================
  Files            183      183              
  Lines           9657     9657              
  Branches        4211     4211              
=============================================
+ Hits            8181     8194      +13     
  Misses           607      607              
+ Partials         869      856      -13     
Flag Coverage Δ
waf_test 84.85% <ø> (+0.13%) ⬆️

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.

@pr-commenter

pr-commenter Bot commented Sep 12, 2025

Copy link
Copy Markdown

Benchmarks clang

Benchmark execution time: 2025-09-13 21:44:03

Comparing candidate commit d5333cc in PR branch anilm3/validator-subcontext with baseline commit 7c65d96 in branch anilm3/v2.

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

@pr-commenter

pr-commenter Bot commented Sep 12, 2025

Copy link
Copy Markdown

Benchmarks gcc

Benchmark execution time: 2025-09-13 21:46:10

Comparing candidate commit d5333cc in PR branch anilm3/validator-subcontext with baseline commit 7c65d96 in branch anilm3/v2.

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

@github-actions

github-actions Bot commented Sep 12, 2025

Copy link
Copy Markdown

Artifact Size Comparison 📦

Artifact Previous Release This PR Difference
darwin-arm64::libddwaf.a 89560336 94141376 0.05%
darwin-arm64::libddwaf.a.stripped 4545616 4832136 0.06%
darwin-arm64::libddwaf.dylib 1960784 2027392 0.03%
darwin-universal::libddwaf.a 180532808 189907752 0.05%
darwin-universal::libddwaf.a.stripped 9690824 10294928 0.06%
darwin-universal::libddwaf.dylib 4139856 4272000 0.03%
darwin-x86_64::libddwaf.a 90972424 95766328 0.05%
darwin-x86_64::libddwaf.a.stripped 5145160 5462744 0.06%
darwin-x86_64::libddwaf.dylib 2147776 2214968 0.03%
linux-aarch64::libddwaf.a 72647358 75350702 0.03%
linux-aarch64::libddwaf.a.stripped 11778162 12191594 0.03%
linux-aarch64::libddwaf.so 2453368 2479968 0.01%
linux-armv7::libddwaf.a 64279684 66587906 0.03%
linux-armv7::libddwaf.a.stripped 10783356 11181730 0.03%
linux-armv7::libddwaf.so 2138996 2140528 0.00%
linux-i386::libddwaf.a 62427430 64714434 0.03%
linux-i386::libddwaf.a.stripped 9321362 9681938 0.03%
linux-i386::libddwaf.so 2382908 2401736 0.00%
linux-x86_64::libddwaf.a 73129494 75830276 0.03%
linux-x86_64::libddwaf.a.stripped 11599138 11990424 0.03%
linux-x86_64::libddwaf.so 2649632 2674736 0.00%
windows-arm64::ddwaf.dll 4769280 4866048 0.02%
windows-arm64::ddwaf.lib 11698 14560 0.24%
windows-arm64::ddwaf_static.lib 57431616 59684262 0.03%
windows-win32::ddwaf.dll 3356160 3444736 0.02%
windows-win32::ddwaf.lib 11922 14842 0.24%
windows-win32::ddwaf_static.lib 49113786 51342800 0.04%
windows-x64::ddwaf.dll 4088832 4156928 0.01%
windows-x64::ddwaf.lib 11698 14560 0.24%
windows-x64::ddwaf_static.lib 56948354 59200398 0.03%

@pr-commenter

pr-commenter Bot commented Sep 12, 2025

Copy link
Copy Markdown

Benchmarks clang-pgo

Benchmark execution time: 2025-09-13 22:00:39

Comparing candidate commit d5333cc in PR branch anilm3/validator-subcontext with baseline commit 7c65d96 in branch anilm3/v2.

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

@Anilm3
Anilm3 force-pushed the anilm3/validator-subcontext branch from 4857ef2 to d5333cc Compare September 13, 2025 21:24
@Anilm3
Anilm3 marked this pull request as ready for review September 15, 2025 07:52
@Anilm3
Anilm3 requested a review from a team as a code owner September 15, 2025 07:52
@Anilm3 Anilm3 changed the title Validator: Add support for testing subcontexts Validator: Add support for testing subcontexts and attributes Sep 15, 2025
@Anilm3
Anilm3 merged commit d6e707c into anilm3/v2 Sep 15, 2025
54 checks passed
@Anilm3
Anilm3 deleted the anilm3/validator-subcontext branch September 15, 2025 08:52
Anilm3 added a commit that referenced this pull request Oct 1, 2025
* Object view: read only abstraction to ddwaf_object (#341)
* [v2] Remove mingw builds (#381)
* Writable objects: owned and borrowed object and object limits removal (#378, #382)
* [v2] Refactor and improve object types (#387)
* [v2] Update unit tests to use new abstractions (#389)
* [v2] Update `raw_configuration` type to use `object_view` (#390)
* [v2] Remove remaining uses of ddwaf_object in `src` and `tests/unit` (#391)
* [v2] JWT Decoding Processor (#401)
* [v2] First iteration of object layout changes (#394)
* Split context data insertion from evaluation (#407)
* [v2] Second iteration of object layout changes (#408)
* [v2] Add new fingerprint and object view tests (#414)
* Reenable attribute collector unit test (#415)
* [v2] Container view types (#413)
* Exclude assertions from coverage (#416)
* [v2] Use allocators internally instead of malloc/free and stop generating zero-terminated strings (#418)
* Add memory resource to owned and borrowed objects (#428)
* [v2] Propagate allocators from context (#420)
* [v2] Update interface and expose allocators (#427)
* Refactor evaluation stages out of the context (#442)
* Subcontext: replace ephemerals with a new scope with user-defined lifetime derived from the context (#443)
* Validator: Add support for testing subcontexts and attributes (#451)
* [v2] Pass allocator to context and subcontext eval and add new allocators (#452)
* Update logger to avoid dependencies on ddwaf.h (#453)
* [v2] Return DDWAF_MATCH when there are events, attributes or actions (#455)
* [v2] Cleanup: remove exclusion namespace and some redundant references (#456)
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.

3 participants