-
Notifications
You must be signed in to change notification settings - Fork 940
new(build,userspace): switch to use container plugin #3482
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
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: FedeDP The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
1575590
to
a52405c
Compare
/milestone 0.41.0 |
This PR may bring feature or behavior changes in the Falco engine and may require the engine version to be bumped. Please double check userspace/engine/falco_engine_version.h file. See versioning for FALCO_ENGINE_VERSION. /hold |
11663e9
to
03e2350
Compare
Going to remove the wip commit once falcosecurity/testing#69 gets merged. EDIT: removed |
624544b
to
03e2350
Compare
Now the arm64 test-dev-packages is down to 4 errors, 2 of them are related to the usage of the full branch name for libs and driver deps; they will be fixed once we properly use a commit hash. The remaining 2 are actually linked to the container plugin: it seems replaying a capture file we are seeing 2 container events instead of 3:
EDIT: on x86 we also have a couple of ASSERT triggering in libs code:
|
The failing tests come from the fact that we are not able to extract Indeed, we were previously setting tinfo on the generated container json event: https://github.com/falcosecurity/libs/blob/master/userspace/libsinsp/container.cpp#L287; i am trying to understand whether this is reproducible with a plugin ASYNCEVENT. EDIT: fixed; now only the x86 ASSERT fails remain:
|
It will be shipped by default hence it is present in default config. Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
Also, default falco.yaml will only host container plugin configuration but won't enable the plugin. Instead, a configuration override file will be installed only on linux non-musl deployments, enabled the plugin. Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
… string. Also, remove `container_id container_name` fields from `-pc` output. These fields are now automatically appended since the `container` plugin marks them as suggested. Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
Container plugin cannot be dynamically loaded on musl build, therefore some falcosecurity/testing tests are failing on it. Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
fd1ddd3
to
f16530b
Compare
falcosecurity/libs#2207 was finally MERGED! Rebased this PR to use libs master. |
Amazing work @FedeDP! 👏 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
Just nits 😅
@@ -0,0 +1,76 @@ | |||
# SPDX-License-Identifier: Apache-2.0 | |||
# | |||
# Copyright (C) 2023 The Falco Authors. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# Copyright (C) 2023 The Falco Authors. | |
# Copyright (C) 2025 The Falco Authors. |
@@ -0,0 +1,100 @@ | |||
# SPDX-License-Identifier: Apache-2.0 | |||
# | |||
# Copyright (C) 2023 The Falco Authors. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# Copyright (C) 2023 The Falco Authors. | |
# Copyright (C) 2025 The Falco Authors. |
@@ -0,0 +1,274 @@ | |||
# SPDX-License-Identifier: Apache-2.0 | |||
# | |||
# Copyright (C) 2023 The Falco Authors. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# Copyright (C) 2023 The Falco Authors. | |
# Copyright (C) 2025 The Falco Authors. |
@@ -0,0 +1,81 @@ | |||
# SPDX-License-Identifier: Apache-2.0 | |||
# | |||
# Copyright (C) 2023 The Falco Authors. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# Copyright (C) 2023 The Falco Authors. | |
# Copyright (C) 2025 The Falco Authors. |
// See https://falco.org/docs/rules/style-guide/ | ||
const std::string container_info = | ||
"container_id=%container.id container_image=%container.image.repository " | ||
"container_image_tag=%container.image.tag container_name=%container.name"; | ||
"container_image=%container.image.repository " | ||
"container_image_tag=%container.image.tag"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note for ourselves: we need to update the documentation https://falco.org/docs/rules/style-guide/
cc @LucaGuerra
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once this is merged let's open an issue
I'd avoid re-pushing just to fix some licenses year (since it means to wait ~50minutes for the CI). |
/unhold no need to bump major. |
/unhold |
What type of PR is this?
/kind cleanup
/kind feature
Any specific area of the project related to this PR?
/area build
/area engine
What this PR does / why we need it:
This PR bumps Falco to HEAD of falcosecurity/libs#2207, enforcing the usage of the container plugin.
Keeping it
wip
until all issues are resolved.TODO:
test_falco_engine.extra_format_do_not_replace_container_info
falco_others.yaml
config (that we install on windows,osx and musl in place of falco.yaml), or we use something likeload_plugins: [@FALCO_DEFAULT_PLUGINS@]
and customizeFALCO_DEFAULT_PLUGINS
from within cmake -> we decided to add the plugin configuration in the main falco.yaml file but then install an override config file that loads it only on non-musl linux installationscontainer_engines:
key: drop in favor of plugin config -> implement TODOs or drop? It is notsandbox
level unfortunately, butIncubating
thus theoretically we'd need a deprecation period. -> before 1.0.0incubating
features can be dropped without deprecation period: https://github.com/falcosecurity/falco/blob/master/proposals/20231220-features-adoption-and-deprecation.md#before-falco-10While it should be up to falcoctl to install the
container
plugin, since it was previously a core feature of libraries, we decided to keep it installed by the Falco package so that host installations through packages won't lose such a feature by default (ie: without playing with falcoctl to install the plugin).Another solution could be to let rpm/deb install scripts leverage
falcoctl
to install the plugin, BUT thetar.gz
tarball would still be hit by the feature loss.Which issue(s) this PR fixes:
Refs #3403
Special notes for your reviewer:
The cares,grpc,openssl and curl cmake files were copy pasted from libs repo.
Does this PR introduce a user-facing change?: