Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update: bump libs and driver versions #2177

Merged
merged 5 commits into from
Aug 25, 2022
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
4 changes: 2 additions & 2 deletions cmake/modules/driver.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ else()
# In case you want to test against another driver version (or branch, or commit) just pass the variable -
# ie., `cmake -DDRIVER_VERSION=dev ..`
if(NOT DRIVER_VERSION)
set(DRIVER_VERSION "b4c198773bf05486e122f6d3f7f63be125242413")
set(DRIVER_CHECKSUM "SHA256=e85fa42a0b58ba21ca7efb38c20ce25207f4816245bdf154e6b9a037a1cce930")
set(DRIVER_VERSION "6599e2efebce30a95f27739d655d53f0d5f686e4")
set(DRIVER_CHECKSUM "SHA256=7cd84fe8a41c25bba9cd7d5d86a87d2483658e367b885ddbd3037aa45404df04")
endif()

# cd /path/to/build && cmake /path/to/source
Expand Down
5 changes: 3 additions & 2 deletions cmake/modules/falcosecurity-libs.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ else()
# In case you want to test against another falcosecurity/libs version (or branch, or commit) just pass the variable -
# ie., `cmake -DFALCOSECURITY_LIBS_VERSION=dev ..`
if(NOT FALCOSECURITY_LIBS_VERSION)
set(FALCOSECURITY_LIBS_VERSION "b4c198773bf05486e122f6d3f7f63be125242413")
set(FALCOSECURITY_LIBS_CHECKSUM "SHA256=e85fa42a0b58ba21ca7efb38c20ce25207f4816245bdf154e6b9a037a1cce930")
set(FALCOSECURITY_LIBS_VERSION "6599e2efebce30a95f27739d655d53f0d5f686e4")
set(FALCOSECURITY_LIBS_CHECKSUM "SHA256=7cd84fe8a41c25bba9cd7d5d86a87d2483658e367b885ddbd3037aa45404df04")
endif()

# cd /path/to/build && cmake /path/to/source
Expand Down Expand Up @@ -69,6 +69,7 @@ set(USE_BUNDLED_TBB ON CACHE BOOL "")
set(USE_BUNDLED_B64 ON CACHE BOOL "")
set(USE_BUNDLED_JSONCPP ON CACHE BOOL "")
set(USE_BUNDLED_VALIJSON ON CACHE BOOL "")
set(USE_BUNDLED_RE2 ON CACHE BOOL "")

list(APPEND CMAKE_MODULE_PATH "${FALCOSECURITY_LIBS_SOURCE_DIR}/cmake/modules")

Expand Down
52 changes: 26 additions & 26 deletions tests/engine/test_filter_evttype_resolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ string to_string(set<uint16_t> s)
return out;
}

void compare_evttypes(ast::expr* f, set<uint16_t> &expected)
void compare_evttypes(std::unique_ptr<ast::expr> f, set<uint16_t> &expected)
{
set<uint16_t> actual;
filter_evttype_resolver().evttypes(f, actual);
filter_evttype_resolver().evttypes(f.get(), actual);
for(auto &etype : expected)
{
REQUIRE(actual.find(etype) != actual.end());
Expand All @@ -49,7 +49,7 @@ void compare_evttypes(ast::expr* f, set<uint16_t> &expected)
}
}

ast::expr* compile(const string &fltstr)
std::unique_ptr<ast::expr> compile(const string &fltstr)
{
return libsinsp::filter::parser(fltstr).parse();
}
Expand Down Expand Up @@ -98,138 +98,138 @@ TEST_CASE("Should find event types from filter", "[rule_loader]")
SECTION("evt_type_eq")
{
auto f = compile("evt.type=openat");
compare_evttypes(f, openat_only);
compare_evttypes(std::move(f), openat_only);
}

SECTION("evt_type_in")
{
auto f = compile("evt.type in (openat, close)");
compare_evttypes(f, openat_close);
compare_evttypes(std::move(f), openat_close);
}

SECTION("evt_type_ne")
{
auto f = compile("evt.type!=openat");
compare_evttypes(f, not_openat);
compare_evttypes(std::move(f), not_openat);
}

SECTION("not_evt_type_eq")
{
auto f = compile("not evt.type=openat");
compare_evttypes(f, not_openat);
compare_evttypes(std::move(f), not_openat);
}

SECTION("not_evt_type_in")
{
auto f = compile("not evt.type in (openat, close)");
compare_evttypes(f, not_openat_close);
compare_evttypes(std::move(f), not_openat_close);
}

SECTION("not_evt_type_ne")
{
auto f = compile("not evt.type != openat");
compare_evttypes(f, openat_only);
compare_evttypes(std::move(f), openat_only);
}

SECTION("evt_type_or")
{
auto f = compile("evt.type=openat or evt.type=close");
compare_evttypes(f, openat_close);
compare_evttypes(std::move(f), openat_close);
}

SECTION("not_evt_type_or")
{
auto f = compile("evt.type!=openat or evt.type!=close");
compare_evttypes(f, all_events);
compare_evttypes(std::move(f), all_events);
}

SECTION("evt_type_or_ne")
{
auto f = compile("evt.type=close or evt.type!=openat");
compare_evttypes(f, not_openat);
compare_evttypes(std::move(f), not_openat);
}

SECTION("evt_type_and")
{
auto f = compile("evt.type=close and evt.type=openat");
compare_evttypes(f, no_events);
compare_evttypes(std::move(f), no_events);
}

SECTION("evt_type_and_non_evt_type")
{
auto f = compile("evt.type=openat and proc.name=nginx");
compare_evttypes(f, openat_only);
compare_evttypes(std::move(f), openat_only);
}

SECTION("evt_type_and_non_evt_type_not")
{
auto f = compile("evt.type=openat and not proc.name=nginx");
compare_evttypes(f, openat_only);
compare_evttypes(std::move(f), openat_only);
}

SECTION("evt_type_and_nested")
{
auto f = compile("evt.type=openat and (proc.name=nginx)");
compare_evttypes(f, openat_only);
compare_evttypes(std::move(f), openat_only);
}

SECTION("evt_type_and_nested_multi")
{
auto f = compile("evt.type=openat and (evt.type=close and proc.name=nginx)");
compare_evttypes(f, no_events);
compare_evttypes(std::move(f), no_events);
}

SECTION("non_evt_type")
{
auto f = compile("proc.name=nginx");
compare_evttypes(f, all_events);
compare_evttypes(std::move(f), all_events);
}

SECTION("non_evt_type_or")
{
auto f = compile("evt.type=openat or proc.name=nginx");
compare_evttypes(f, all_events);
compare_evttypes(std::move(f), all_events);
}

SECTION("non_evt_type_or_nested_first")
{
auto f = compile("(evt.type=openat) or proc.name=nginx");
compare_evttypes(f, all_events);
compare_evttypes(std::move(f), all_events);
}

SECTION("non_evt_type_or_nested_second")
{
auto f = compile("evt.type=openat or (proc.name=nginx)");
compare_evttypes(f, all_events);
compare_evttypes(std::move(f), all_events);
}

SECTION("non_evt_type_or_nested_multi")
{
auto f = compile("evt.type=openat or (evt.type=close and proc.name=nginx)");
compare_evttypes(f, openat_close);
compare_evttypes(std::move(f), openat_close);
}

SECTION("non_evt_type_or_nested_multi_not")
{
auto f = compile("evt.type=openat or not (evt.type=close and proc.name=nginx)");
compare_evttypes(f, not_close);
compare_evttypes(std::move(f), not_close);
}

SECTION("non_evt_type_and_nested_multi_not")
{
auto f = compile("evt.type=openat and not (evt.type=close and proc.name=nginx)");
compare_evttypes(f, openat_only);
compare_evttypes(std::move(f), openat_only);
}

SECTION("ne_and_and")
{
auto f = compile("evt.type!=openat and evt.type!=close");
compare_evttypes(f, not_openat_close);
compare_evttypes(std::move(f), not_openat_close);
}

SECTION("not_not")
{
auto f = compile("not (not evt.type=openat)");
compare_evttypes(f, openat_only);
compare_evttypes(std::move(f), openat_only);
}
}
Loading