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

wip: new(anomalydetection): Initial Scope - CountMinSketch Powered Probabilistic Counting and Filtering #419

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

incertum
Copy link
Contributor

What type of PR is this?

Uncomment one (or more) /kind <> lines:

/kind bug

/kind cleanup

/kind design

/kind documentation

/kind failing-test

/kind feature

Any specific area of the project related to this PR?

Uncomment one (or more) /area <> lines:

/area plugins

/area registry

/area build

/area documentation

What this PR does / why we need it:

Introduce a new anomalydetection plugin, as outlined in the Proposal.

Which issue(s) this PR fixes:

falcosecurity/falco#3117

Fixes #

Special notes for your reviewer:

@poiana
Copy link
Contributor

poiana commented Apr 2, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: incertum
Once this PR has been reviewed and has the lgtm label, please assign mstemm for approval. For more information see the Kubernetes Code Review Process.

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

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

@incertum incertum force-pushed the anomaly-detection-1 branch 2 times, most recently from c72e9de to f5bb677 Compare June 10, 2024 04:52
m_exe_writable = m_thread_table.get_field(t.fields(), "exe_writable", st::SS_PLUGIN_ST_BOOL);
m_exe_upper_layer = m_thread_table.get_field(t.fields(), "exe_upper_layer", st::SS_PLUGIN_ST_BOOL);
m_exe_from_memfd = m_thread_table.get_field(t.fields(), "exe_from_memfd", st::SS_PLUGIN_ST_BOOL);
// m_args = m_thread_table.get_field(t.fields(), "args", TBD);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jasondellaluce what data type would this be for the cmd args? And what data types would it be for the fd sub table fields, like the fd_name? Please note that falcosecurity::state_value_type does not yet have the new data types. We would need an SDK upgrade. Do you have a timeline wrt when they will be available? Thanks.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

CC @mrgian

m_container_id.read_value(tr, thread_entry, tstr);
break;
case plugin_sinsp_filterchecks::TYPE_NAME:
m_comm.read_value(tr, thread_entry, tstr);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jasondellaluce how would you read the cmd args? See also the previous comments. Same question for fd_name.


bool anomalydetection::extract_filterchecks_concat_profile(int64_t thread_id, const falcosecurity::table_reader &tr, const std::vector<plugin_sinsp_filterchecks_field>& fields, std::string& behavior_profile_concat_str)
{
falcosecurity::table_entry thread_entry = m_thread_table.get_entry(tr, thread_id);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jasondellaluce Would there be something needed to access the subtables for example for the cmd args and fd_name?

break;
case plugin_sinsp_filterchecks::TYPE_ANAME:
{
// todo: check implications of main thread as it's part of the libs implementation
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jasondellaluce does the plugin have enough access to information to perform similar checks like we do in libs?

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.

None yet

3 participants