-
Notifications
You must be signed in to change notification settings - Fork 169
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
new(userspace): added new addOutput
json entry for plugin get_field()
API
#2116
Conversation
…d()` API. It suggests to Falco that some fields should be enforced to all compatible sources output. Signed-off-by: Federico Di Pierro <[email protected]>
/milestone 0.19.0 |
@FedeDP: GitHub didn't allow me to request PR reviews from the following users: mrgian. Note that only falcosecurity members and repo collaborators can review this PR, and authors cannot review their own PRs. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
[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 |
Perf diff from master - unit tests
Heap diff from master - unit tests
Heap diff from master - scap file
Benchmarks diff from master
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2116 +/- ##
==========================================
+ Coverage 73.69% 74.46% +0.76%
==========================================
Files 253 253
Lines 31916 33069 +1153
Branches 5608 5682 +74
==========================================
+ Hits 23521 24624 +1103
- Misses 8364 8423 +59
+ Partials 31 22 -9
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
Looks amazing Fede!
Design question/suggestion: why don't we add a new filtercheck_field_flags
flag (e.g. EPF_FORMAT_SUGGESTED
or something like that) and make this a property of fields in general?
The plugin API will keep defining this property in the way you proposed, but I feel like having a standard mechanism would be more beneficial rather then having an extra getter or code path for plugins only. That way, consumers like Falco will just reason about fields/filters list compared to being aware of plugins and their specifics
I quite like it indeed! |
…ld flag. Signed-off-by: Federico Di Pierro <[email protected]> Co-authored-by: Jason Dellaluce <[email protected]>
…ormats` API. Signed-off-by: Federico Di Pierro <[email protected]> Co-authored-by: Jason Dellaluce <[email protected]>
cbce2dc
to
09995e3
Compare
What type of PR is this?
/kind feature
Any specific area of the project related to this PR?
/area libsinsp
Does this PR require a change in the driver versions?
What this PR does / why we need it:
The new field suggests to the agent that some fields should be enforced to all compatible sources output by default.
It is up to the agent to implement the logic to actually use these suggested fields.
PR contains also updated tests.
For example, k8smeta plugin could expose eg:
k8smeta.pod.name
andk8smeta.pod.uid
asaddOutput
fields; this way forsyscall
event source (seeget_extract_event_sources
: https://github.com/falcosecurity/plugins/blob/main/plugins/k8smeta/src/plugin.h#L154) those fields will always be appended to the output with no further intervention.Idea is then to have a for-plugin config option in Falco to disable this behavior by default.
Basically, this feat would allow us to avoid leaking plugin-related knowledge about which output should be appended by default, up to Falco. For example, we could drop the
pk
Falco option that is used by charts when enabling the k8smeta collector: https://github.com/falcosecurity/charts/blob/master/charts/falco/templates/pod-template.tpl#L78Long term goal is to drop all
print
related Falco CLI options: https://github.com/falcosecurity/falco/blob/master/userspace/falco/app/actions/init_falco_engine.cpp#L55when:
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?: