Skip to content

Commit da7fd66

Browse files
authored
Report input attribute addresses on ddwaf_known_addresses, increase macos target and increase version to v1.30.1 (#484)
1 parent 00e895f commit da7fd66

File tree

13 files changed

+89
-308
lines changed

13 files changed

+89
-308
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
${{ github.workspace }}/packages/*.sha256
6666
6767
macos-build:
68-
runs-on: macos-13
68+
runs-on: macos-14
6969
strategy:
7070
fail-fast: false
7171
matrix:
@@ -76,8 +76,6 @@ jobs:
7676
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
7777
with:
7878
submodules: recursive
79-
- name: Select Xcode version
80-
run: sudo xcode-select --switch /Applications/Xcode_14.3.1.app
8179
- name: Create Build Directory
8280
run: cmake -E make_directory ${{ github.workspace }}/build ${{ github.workspace }}/packages
8381
- name: Generating Build Scripts
@@ -87,7 +85,6 @@ jobs:
8785
run: cmake --build . --config RelWithDebInfo --verbose --target all --target waf_test -j $(getconf _NPROCESSORS_ONLN)
8886
working-directory: ${{ github.workspace }}/build
8987
- name: Test
90-
if: matrix.arch == 'x86_64'
9188
run: ${{ github.workspace }}/build/tests/waf_test
9289
working-directory: ${{ github.workspace }}/tests
9390
- name: Build Packages
@@ -107,7 +104,7 @@ jobs:
107104
${{ github.workspace }}/packages/*.sha256
108105
109106
macos-universal-package:
110-
runs-on: macos-13
107+
runs-on: macos-14
111108
needs: [macos-build]
112109
steps:
113110
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# libddwaf release
22

3+
## v1.30.1 ([unstable](https://github.com/DataDog/libddwaf/blob/master/README.md#versioning-semantics))
4+
5+
### Release changelog
6+
#### Fixes
7+
- Report input attribute addresses on `ddwaf_known_addresses`, increase macos target and increase version to v1.30.1 ([#484](https://github.com/DataDog/libddwaf/pull/484))
8+
39
## v1.30.0 ([unstable](https://github.com/DataDog/libddwaf/blob/master/README.md#versioning-semantics))
410
This release introduces no new features, however the recently introduced `block_id` action parameter has been renamed to `security_response_id` for consistency.
511

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ file(READ "version" version)
55
string(REGEX REPLACE "-(alpha|beta)[0-9]*$" "" mmp_version ${version})
66

77
if (APPLE)
8-
set(CMAKE_OSX_DEPLOYMENT_TARGET "12.7" CACHE STRING "Minimum OS X deployment version")
8+
set(CMAKE_OSX_DEPLOYMENT_TARGET "14.2.1" CACHE STRING "Minimum OS X deployment version")
99
endif()
1010

1111
project(libddwaf VERSION "${mmp_version}")

cmake/objects.cmake

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ set(LIBDDWAF_SOURCE
9292
${libddwaf_SOURCE_DIR}/src/transformer/css_decode.cpp
9393
${libddwaf_SOURCE_DIR}/src/transformer/html_entity_decode.cpp
9494
${libddwaf_SOURCE_DIR}/src/transformer/js_decode.cpp
95-
${libddwaf_SOURCE_DIR}/src/libcxx-compat/monotonic_buffer_resource.cpp
9695
${libddwaf_SOURCE_DIR}/src/vendor/fmt/format.cc
9796
${libddwaf_SOURCE_DIR}/src/vendor/radixlib/radixlib.c
9897
${libddwaf_SOURCE_DIR}/src/vendor/lua-aho-corasick/ac_fast.cxx

src/context_allocator.hpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,12 @@
77
#pragma once
88

99
#include <list>
10+
#include <memory_resource>
1011
#include <string>
1112
#include <unordered_map>
1213
#include <unordered_set>
1314
#include <vector>
1415

15-
#include "memory_resource.hpp"
16-
1716
namespace ddwaf::memory {
1817
extern thread_local std::pmr::memory_resource *local_memory_resource;
1918

src/libcxx-compat/monotonic_buffer_resource.cpp

Lines changed: 0 additions & 145 deletions
This file was deleted.

src/libcxx-compat/monotonic_buffer_resource.hpp

Lines changed: 0 additions & 116 deletions
This file was deleted.

src/memory_resource.hpp

Lines changed: 0 additions & 24 deletions
This file was deleted.

src/rule.hpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,13 @@ class core_rule {
165165
void get_addresses(std::unordered_map<target_index, std::string> &addresses) const
166166
{
167167
expr_->get_addresses(addresses);
168+
169+
for (const auto &attr : attributes_) {
170+
if (std::holds_alternative<rule_attribute::input_target>(attr.value_or_target)) {
171+
const auto &input = std::get<rule_attribute::input_target>(attr.value_or_target);
172+
addresses.emplace(input.index, input.name);
173+
}
174+
}
168175
}
169176

170177
protected:

0 commit comments

Comments
 (0)