Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/changelog/CHANGELOG-latest.md
18 changes: 18 additions & 0 deletions docs/changelog/CHANGELOG-v2.0.1.md
Original file line number Diff line number Diff line change
@@ -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)).
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# v2.0.0
# libddwaf release

## v2.0.0

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

should this be v2.0.1

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

this is the archive of changelogs. The way it works is you create one new file for a new version, symlink it, and archive the previous one


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.

Expand All @@ -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)).
Expand All @@ -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)).
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/configuration/base_rule_parser_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -984,7 +984,7 @@ TEST(TestBaseRuleParser, CompatibleVersion)
ruleset_info::section_info section;

auto rule_object = yaml_to_object<owned_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::vector>(raw_configuration(rule_object));
EXPECT_EQ(rule_array.size(), 1);
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/configuration/input_filter_parser_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -732,7 +732,7 @@ TEST(TestInputFilterParser, IncompatibleMaxVersion)
TEST(TestInputFilterParser, CompatibleVersion)
{
auto object = yaml_to_object<owned_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;
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/configuration/processor_parser_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -839,7 +839,7 @@ TEST(TestProcessorParser, IncompatibleMaxVersion)
TEST(TestProcessorParser, CompatibleVersion)
{
auto object = yaml_to_object<owned_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;
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/configuration/rule_filter_parser_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -935,7 +935,7 @@ TEST(TestRuleFilterParser, IncompatibleMaxVersion)
TEST(TestRuleFilterParser, CompatibleVersion)
{
auto object = yaml_to_object<owned_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;
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/configuration/scanner_parser_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -874,7 +874,7 @@ TEST(TestScannerParser, IncompatibleMaxVersion)
TEST(TestScannerParser, CompatibleVersion)
{
auto definition = yaml_to_object<owned_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::vector>(raw_configuration(definition));

configuration_spec cfg;
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/configuration/user_rule_parser_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -984,7 +984,7 @@ TEST(TestUserRuleParser, CompatibleVersion)
ruleset_info::section_info section;

auto rule_object = yaml_to_object<owned_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::vector>(raw_configuration(rule_object));
EXPECT_EQ(rule_array.size(), 1);
Expand Down
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.0.0
2.0.1
Loading