Skip to content

Conversation

@deepskyblue86
Copy link
Member

What type of PR is this?
/kind bug

Any specific area of the project related to this PR?
/area plugins

What this PR does / why we need it:
I hit a segfault with sinsp-example, just specifying -f 'container.name!=my_container'.
After debugging it I realized that event filtering (using extract cap) happens before parse, so the assumption in the code didn't hold.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

@github-actions
Copy link

github-actions bot commented Oct 9, 2025

Rules files suggestions

Copy link
Contributor

@gnosek gnosek left a comment

Choose a reason for hiding this comment

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

LGTM, not sure why CI is unhappy though

@deepskyblue86
Copy link
Member Author

LGTM, not sure why CI is unhappy though

I found this in the CI output:

Runtime error: cannot load plugin /usr/share/falco/plugins/libcontainer.so: plugin required API version '3.12.0' not compatible with the framework's API version '3.11.0': framework's minor is less than the requested one. Exiting.

I think this has something to do with #1005 / #1016.
No idea why this is failing though. CC @ekoops @leogr

@ekoops
Copy link
Contributor

ekoops commented Oct 13, 2025

CI is still using an old falco:master-debian image to test this, as no new docker images of that kind has been pushed to dockerhub yet. That old image is synced with an old libs version. That's why we are getting this error.

@deepskyblue86
Copy link
Member Author

CI is still using an old falco:master-debian image to test this, as no new docker images of that kind has been pushed to dockerhub yet. That old image is synced with an old libs version. That's why we are getting this error.

How did the previous one pass then?

@ekoops
Copy link
Contributor

ekoops commented Oct 13, 2025

What is the previous one? Do you mean the previous merged PR? It failed as well: https://github.com/falcosecurity/plugins/actions/runs/18351059430/job/52271109104

@leogr
Copy link
Member

leogr commented Oct 13, 2025

FYI the CI will be fixed once falcosecurity/falco#3689 gets merged. You can ignore it at the moment.

@deepskyblue86 deepskyblue86 force-pushed the fix/container-filter-extract branch from 31e48a4 to 45cfeff Compare October 13, 2025 10:10
@github-actions
Copy link

Rules files suggestions

@leogr
Copy link
Member

leogr commented Oct 14, 2025

FYI the CI will be fixed once falcosecurity/falco#3689 gets merged. You can ignore it at the moment.

FYI it works now 😎

Copy link
Contributor

@irozzo-1A irozzo-1A left a comment

Choose a reason for hiding this comment

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

LGTM, just a nit on a comment

@poiana
Copy link
Contributor

poiana commented Nov 17, 2025

LGTM label has been added.

DetailsGit tree hash: 3285c4b0d4228f891f1dcc4392292883522af8f0

@irozzo-1A
Copy link
Contributor

@ekoops @leogr do you mind taking a look?

@poiana poiana removed the lgtm label Nov 17, 2025
@poiana poiana requested a review from irozzo-1A November 17, 2025 14:53
Copy link
Member

@leogr leogr left a comment

Choose a reason for hiding this comment

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

SGTM. Just left a minor comment, but not a blocker.

I let the CI run, then I will approve eventually,.

Comment on lines 529 to 543
// Deprecated fields don't extract anything, deal with them immediately
if(field_id == TYPE_K8S_RC_NAME || field_id == TYPE_K8S_RC_ID ||
field_id == TYPE_K8S_RC_LABEL || field_id == TYPE_K8S_RC_LABELS ||
field_id == TYPE_K8S_SVC_NAME || field_id == TYPE_K8S_SVC_ID ||
field_id == TYPE_K8S_SVC_LABEL || field_id == TYPE_K8S_SVC_LABELS ||
field_id == TYPE_K8S_NS_ID || field_id == TYPE_K8S_NS_LABEL ||
field_id == TYPE_K8S_NS_LABELS || field_id == TYPE_K8S_RS_NAME ||
field_id == TYPE_K8S_RS_ID || field_id == TYPE_K8S_RS_LABEL ||
field_id == TYPE_K8S_RS_LABELS || field_id == TYPE_K8S_DEPLOYMENT_NAME ||
field_id == TYPE_K8S_DEPLOYMENT_ID ||
field_id == TYPE_K8S_DEPLOYMENT_LABEL ||
field_id == TYPE_K8S_DEPLOYMENT_LABELS)
{
return true;
}
Copy link
Member

Choose a reason for hiding this comment

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

Just nit:

Why should we pay this little cost assuming TYPE_K8S_* would never pass here in most cases?
Do nothing may be better, IMO.

@github-actions
Copy link

Rules files suggestions

Signed-off-by: Angelo Puglisi <angelopuglisi86@gmail.com>
@deepskyblue86 deepskyblue86 force-pushed the fix/container-filter-extract branch from c7335b5 to f424638 Compare November 17, 2025 17:29
@github-actions
Copy link

Rules files suggestions

@poiana
Copy link
Contributor

poiana commented Nov 18, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: deepskyblue86, irozzo-1A, leogr

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@poiana
Copy link
Contributor

poiana commented Nov 18, 2025

LGTM label has been added.

DetailsGit tree hash: 1a04486c22afcfa196023aa5a4e48ab3a4683b6b

@poiana poiana merged commit 81201c0 into falcosecurity:main Nov 18, 2025
24 checks passed
@deepskyblue86 deepskyblue86 deleted the fix/container-filter-extract branch December 3, 2025 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants