diff --git a/docs/changelog/CHANGELOG-latest.md b/docs/changelog/CHANGELOG-latest.md index d9113fc67..68554b6f5 120000 --- a/docs/changelog/CHANGELOG-latest.md +++ b/docs/changelog/CHANGELOG-latest.md @@ -1 +1 @@ -CHANGELOG-v2.0.0.md \ No newline at end of file +CHANGELOG-v2.0.1.md \ No newline at end of file diff --git a/docs/changelog/CHANGELOG-v2.0.1.md b/docs/changelog/CHANGELOG-v2.0.1.md new file mode 100644 index 000000000..3d1c27e74 --- /dev/null +++ b/docs/changelog/CHANGELOG-v2.0.1.md @@ -0,0 +1,18 @@ +# v2.0.1 + +## Release Changelog + +### Changes + +- Use inline storage for value iterators ([#502](https://github.com/DataDog/libddwaf/pull/502)). + +### Fixes + +- Avoid exception in user resource comparison ([#501](https://github.com/DataDog/libddwaf/pull/501)). +- Preserve relative path of source files in logs ([#500](https://github.com/DataDog/libddwaf/pull/500)). +- Fix warnings when building for wasm32 ([#499](https://github.com/DataDog/libddwaf/pull/499)). +- Fix bad has_from_chars concept ([#497](https://github.com/DataDog/libddwaf/pull/497)). + +### Miscellaneous + +- Remove CodeCov upload from CI ([#498](https://github.com/DataDog/libddwaf/pull/498)). diff --git a/docs/changelog/CHANGELOG-v2.0.0.md b/docs/changelog/CHANGELOG-v2.x.md similarity index 98% rename from docs/changelog/CHANGELOG-v2.0.0.md rename to docs/changelog/CHANGELOG-v2.x.md index 8a6a93f32..b9735cfcc 100644 --- a/docs/changelog/CHANGELOG-v2.0.0.md +++ b/docs/changelog/CHANGELOG-v2.x.md @@ -1,4 +1,6 @@ -# v2.0.0 +# libddwaf release + +## v2.0.0 libddwaf v2.0.0 represents a significant redesign of the C API, focusing on explicit memory ownership, reduced memory footprint, and a more consistent interface. Beyond the public API, the internals have also been refactored to use safer and more C++-native abstractions. @@ -18,8 +20,9 @@ Object creation functions have been renamed to follow a consistent `ddwaf_object The function `ddwaf_run` has been renamed to `ddwaf_context_eval` for consistency with the rest of the API. More significantly, ephemeral data semantics have been replaced with a new subcontext mechanism. In v1, ephemeral data was passed as a separate parameter to each `ddwaf_run` call and was not retained. In v2, a subcontext is explicitly created from a parent context via `ddwaf_subcontext_init`, evaluated with `ddwaf_subcontext_eval`, and destroyed with `ddwaf_subcontext_destroy`. Subcontexts inherit all data from their parent context but maintain their own isolated evaluation state. Multiple concurrent subcontexts can be created from the same parent context, each defining its own data scope and lifetime. -## Release Changelog -### Changes +### Release changelog + +#### Changes - Object model overhaul: immutable `object_view`, owned/borrowed writable objects, raw configuration on `object_view`, container view types, and updated unit tests ([#341](https://github.com/DataDog/libddwaf/pull/341), [#378](https://github.com/DataDog/libddwaf/pull/378), [#382](https://github.com/DataDog/libddwaf/pull/382), [#387](https://github.com/DataDog/libddwaf/pull/387), [#390](https://github.com/DataDog/libddwaf/pull/390), [#391](https://github.com/DataDog/libddwaf/pull/391), [#394](https://github.com/DataDog/libddwaf/pull/394), [#408](https://github.com/DataDog/libddwaf/pull/408), [#413](https://github.com/DataDog/libddwaf/pull/413), [#476](https://github.com/DataDog/libddwaf/pull/476)). - Allocator API: propagate allocators through contexts/subcontexts, expose allocator-aware interfaces, and stop generating zero-terminated strings ([#418](https://github.com/DataDog/libddwaf/pull/418), [#420](https://github.com/DataDog/libddwaf/pull/420), [#427](https://github.com/DataDog/libddwaf/pull/427), [#452](https://github.com/DataDog/libddwaf/pull/452)). @@ -31,12 +34,12 @@ The function `ddwaf_run` has been renamed to `ddwaf_context_eval` for consistenc - Remove legacy configuration schema (v1) support ([#482](https://github.com/DataDog/libddwaf/pull/482)). - Introduce ddwaf_(context|subcontext)_multieval to evaluate multiple batches in sequence ([#494](https://github.com/DataDog/libddwaf/pull/494)). -### Fixes +#### Fixes - Report input attribute addresses on `ddwaf_known_addresses` ([#485](https://github.com/DataDog/libddwaf/pull/485)). - Remove default allocator arguments ([#486](https://github.com/DataDog/libddwaf/pull/486)). -### Miscellaneous +#### Miscellaneous - Upgrade fmt dependency and use as header-only ([#478](https://github.com/DataDog/libddwaf/pull/478)). - Increase macOS target to 14.2.1 ([#477](https://github.com/DataDog/libddwaf/pull/477)). diff --git a/tests/unit/configuration/base_rule_parser_test.cpp b/tests/unit/configuration/base_rule_parser_test.cpp index f761f5953..b94b68bd4 100644 --- a/tests/unit/configuration/base_rule_parser_test.cpp +++ b/tests/unit/configuration/base_rule_parser_test.cpp @@ -984,7 +984,7 @@ TEST(TestBaseRuleParser, CompatibleVersion) ruleset_info::section_info section; auto rule_object = yaml_to_object( - R"([{id: 1, name: rule1, tags: {type: flow1, category: category1}, min_version: 0.0.99, max_version: 2.0.0, conditions: [{operator: match_regex, parameters: {inputs: [{address: arg1}], regex: .*}}]}])"); + R"([{id: 1, name: rule1, tags: {type: flow1, category: category1}, min_version: 0.0.99, max_version: 99.0.0, conditions: [{operator: match_regex, parameters: {inputs: [{address: arg1}], regex: .*}}]}])"); auto rule_array = static_cast(raw_configuration(rule_object)); EXPECT_EQ(rule_array.size(), 1); diff --git a/tests/unit/configuration/input_filter_parser_test.cpp b/tests/unit/configuration/input_filter_parser_test.cpp index 9cfa373a2..ac07a2bcd 100644 --- a/tests/unit/configuration/input_filter_parser_test.cpp +++ b/tests/unit/configuration/input_filter_parser_test.cpp @@ -732,7 +732,7 @@ TEST(TestInputFilterParser, IncompatibleMaxVersion) TEST(TestInputFilterParser, CompatibleVersion) { auto object = yaml_to_object( - R"([{id: 1, inputs: [{address: http.client_ip}], min_version: 0.0.99, max_version: 2.0.0}])"); + R"([{id: 1, inputs: [{address: http.client_ip}], min_version: 0.0.99, max_version: 99.0.0}])"); configuration_spec cfg; configuration_change_spec change; diff --git a/tests/unit/configuration/processor_parser_test.cpp b/tests/unit/configuration/processor_parser_test.cpp index 0af3f3a05..63eb7e20d 100644 --- a/tests/unit/configuration/processor_parser_test.cpp +++ b/tests/unit/configuration/processor_parser_test.cpp @@ -839,7 +839,7 @@ TEST(TestProcessorParser, IncompatibleMaxVersion) TEST(TestProcessorParser, CompatibleVersion) { auto object = yaml_to_object( - R"([{id: 1, generator: extract_schema, parameters: {mappings: [{inputs: [{address: in}], output: out}]}, min_version: 0.0.99, max_version: 2.0.0, evaluate: false, output: true}])"); + R"([{id: 1, generator: extract_schema, parameters: {mappings: [{inputs: [{address: in}], output: out}]}, min_version: 0.0.99, max_version: 99.0.0, evaluate: false, output: true}])"); configuration_spec cfg; configuration_change_spec change; diff --git a/tests/unit/configuration/rule_filter_parser_test.cpp b/tests/unit/configuration/rule_filter_parser_test.cpp index d9b136cbf..41a236d59 100644 --- a/tests/unit/configuration/rule_filter_parser_test.cpp +++ b/tests/unit/configuration/rule_filter_parser_test.cpp @@ -935,7 +935,7 @@ TEST(TestRuleFilterParser, IncompatibleMaxVersion) TEST(TestRuleFilterParser, CompatibleVersion) { auto object = yaml_to_object( - R"([{id: 1, rules_target: [{rule_id: 2939}], min_version: 0.0.99, max_version: 2.0.0, on_match: monitor}])"); + R"([{id: 1, rules_target: [{rule_id: 2939}], min_version: 0.0.99, max_version: 99.0.0, on_match: monitor}])"); configuration_spec cfg; configuration_change_spec change; diff --git a/tests/unit/configuration/scanner_parser_test.cpp b/tests/unit/configuration/scanner_parser_test.cpp index d41a11684..561c17873 100644 --- a/tests/unit/configuration/scanner_parser_test.cpp +++ b/tests/unit/configuration/scanner_parser_test.cpp @@ -874,7 +874,7 @@ TEST(TestScannerParser, IncompatibleMaxVersion) TEST(TestScannerParser, CompatibleVersion) { auto definition = yaml_to_object( - R"([{"id":"ecd","key":{"operator":"match_regex","parameters":{"regex":"email"}},"tags":{"type":"email","category":"pii"}, "min_version": "0.0.99", "max_version": "2.0.0"}])"); + R"([{"id":"ecd","key":{"operator":"match_regex","parameters":{"regex":"email"}},"tags":{"type":"email","category":"pii"}, "min_version": "0.0.99", "max_version": "99.0.0"}])"); auto scanners_array = static_cast(raw_configuration(definition)); configuration_spec cfg; diff --git a/tests/unit/configuration/user_rule_parser_test.cpp b/tests/unit/configuration/user_rule_parser_test.cpp index 4159689ad..a8f015f11 100644 --- a/tests/unit/configuration/user_rule_parser_test.cpp +++ b/tests/unit/configuration/user_rule_parser_test.cpp @@ -984,7 +984,7 @@ TEST(TestUserRuleParser, CompatibleVersion) ruleset_info::section_info section; auto rule_object = yaml_to_object( - R"([{id: 1, name: rule1, tags: {type: flow1, category: category1}, min_version: 0.0.99, max_version: 2.0.0, conditions: [{operator: match_regex, parameters: {inputs: [{address: arg1}], regex: .*}}]}])"); + R"([{id: 1, name: rule1, tags: {type: flow1, category: category1}, min_version: 0.0.99, max_version: 99.0.0, conditions: [{operator: match_regex, parameters: {inputs: [{address: arg1}], regex: .*}}]}])"); auto rule_array = static_cast(raw_configuration(rule_object)); EXPECT_EQ(rule_array.size(), 1); diff --git a/version b/version index 227cea215..10bf840ed 100644 --- a/version +++ b/version @@ -1 +1 @@ -2.0.0 +2.0.1 \ No newline at end of file