Skip to content

Instantiate obfuscator through configuration, remove ddwaf_config#464

Merged
Anilm3 merged 4 commits into
masterfrom
anilm3/obfuscator-through-config
Oct 2, 2025
Merged

Instantiate obfuscator through configuration, remove ddwaf_config#464
Anilm3 merged 4 commits into
masterfrom
anilm3/obfuscator-through-config

Conversation

@Anilm3

@Anilm3 Anilm3 commented Oct 1, 2025

Copy link
Copy Markdown
Collaborator

This PR removes ddwaf_config, which currently only holds the obfuscator configuration. Instead, the obfuscator can now be configured using a standard builder configuration, with the following contents:

{
  "obfuscator": {
    "key_regex": "<key-based regular expression>",
    "value_regex": "<value-based regular expression>"
  }
}

This configuration works in the same way as ddwaf_config:

  • If omitted, no obfuscator is used, equivalent to providing a nullptr config.
  • If any of the regexes is invalid (based on re2 syntax), the default regex is used instead.
  • If two configurations are provided with the obfuscator key, the second one is rejected.

@Anilm3
Anilm3 requested a review from a team as a code owner October 1, 2025 14:43

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ 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

Comment thread src/builder/ruleset_builder.cpp Outdated
@codecov-commenter

codecov-commenter commented Oct 1, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.14286% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 84.89%. Comparing base (482b5df) to head (d614c0f).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
src/configuration/configuration_manager.cpp 93.75% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #464      +/-   ##
==========================================
+ Coverage   84.87%   84.89%   +0.01%     
==========================================
  Files         190      190              
  Lines        9814     9825      +11     
  Branches     4284     4295      +11     
==========================================
+ Hits         8330     8341      +11     
  Misses        613      613              
  Partials      871      871              
Flag Coverage Δ
waf_test 84.89% <97.14%> (+0.01%) ⬆️

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 Oct 1, 2025

Copy link
Copy Markdown

Benchmarks gcc

Benchmark execution time: 2025-10-02 15:22:03

Comparing candidate commit d614c0f in PR branch anilm3/obfuscator-through-config with baseline commit 482b5df in branch master.

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

@pr-commenter

pr-commenter Bot commented Oct 1, 2025

Copy link
Copy Markdown

Benchmarks clang

Benchmark execution time: 2025-10-02 15:22:17

Comparing candidate commit d614c0f in PR branch anilm3/obfuscator-through-config with baseline commit 482b5df in branch master.

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

@Anilm3 Anilm3 changed the title Instantiate obfuscator through configuration, remove ddwaf_config Instantiate obfuscator through configuration, remove ddwaf_config Oct 1, 2025
@github-actions

github-actions Bot commented Oct 1, 2025

Copy link
Copy Markdown

Artifact Size Comparison 📦

Artifact Previous Release This PR Difference
darwin-arm64::libddwaf.a 90005656 94542584 0.05%
darwin-arm64::libddwaf.a.stripped 4579560 4881368 0.06%
darwin-arm64::libddwaf.dylib 1963024 2032736 0.03%
darwin-universal::libddwaf.a 181419976 190708064 0.05%
darwin-universal::libddwaf.a.stripped 9765384 10403352 0.06%
darwin-universal::libddwaf.dylib 4142096 4293728 0.03%
darwin-x86_64::libddwaf.a 91414272 96165432 0.05%
darwin-x86_64::libddwaf.a.stripped 5185776 5521936 0.06%
darwin-x86_64::libddwaf.dylib 2150896 2238424 0.04%
linux-aarch64::libddwaf.a 73159494 75883554 0.03%
linux-aarch64::libddwaf.a.stripped 11852226 12283262 0.03%
linux-aarch64::libddwaf.so 2463216 2500648 0.01%
linux-armv7::libddwaf.a 64719098 67024842 0.03%
linux-armv7::libddwaf.a.stripped 10852762 11261910 0.03%
linux-armv7::libddwaf.so 2148652 2160328 0.00%
linux-i386::libddwaf.a 62842618 65125730 0.03%
linux-i386::libddwaf.a.stripped 9379954 9746674 0.03%
linux-i386::libddwaf.so 2392676 2424452 0.01%
linux-x86_64::libddwaf.a 73645934 76368810 0.03%
linux-x86_64::libddwaf.a.stripped 11671234 12077550 0.03%
linux-x86_64::libddwaf.so 2660048 2695216 0.01%
windows-arm64::ddwaf.dll 4788224 4916736 0.02%
windows-arm64::ddwaf.lib 11698 16410 0.40%
windows-arm64::ddwaf_static.lib 57913408 60227292 0.03%
windows-win32::ddwaf.dll 3368448 3474944 0.03%
windows-win32::ddwaf.lib 11922 16726 0.40%
windows-win32::ddwaf_static.lib 49534122 51765366 0.04%
windows-x64::ddwaf.dll 4101632 4193792 0.02%
windows-x64::ddwaf.lib 11698 16410 0.40%
windows-x64::ddwaf_static.lib 57409488 59692356 0.03%

@pr-commenter

pr-commenter Bot commented Oct 1, 2025

Copy link
Copy Markdown

Benchmarks clang-pgo

Benchmark execution time: 2025-10-01 15:54:21

Comparing candidate commit 52db4a4 in PR branch anilm3/obfuscator-through-config with baseline commit 482b5df in branch master.

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

Comment thread src/configuration/common/configuration_collector.hpp Outdated
@Anilm3
Anilm3 enabled auto-merge (squash) October 2, 2025 15:00
@Anilm3
Anilm3 merged commit fd28083 into master Oct 2, 2025
55 of 56 checks passed
@Anilm3
Anilm3 deleted the anilm3/obfuscator-through-config branch October 2, 2025 15:27
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