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

refactor(userspace/engine): drop macro source field in rules and rule loader #2094

Merged
merged 2 commits into from
Jun 28, 2022

Conversation

jasondellaluce
Copy link
Contributor

What type of PR is this?

/kind cleanup

Any specific area of the project related to this PR?

/area engine

/area tests

What this PR does / why we need it:

Since being ported from Lua to C++, the Falco rule loader supported defining a source field in both rules and macros, meant to define compatibility with a specific event source. However, having source definitions in macros is not meaningful, and also the current implementation does not enforce any check during ruleset compilation (it just reads the value from the YAML). On the opposite, I think not defining a source for macros is the way to go. This would enable ruleset developers to create cross-source macros (for example, the json plugin can be used to build macros that are valid for all the json-based event sources such as cloudtrail and k8s_audit). As such, this PR drops the notion of macro-specific source and its related regression tests.

Which issue(s) this PR fixes:

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

refactor(userspace/engine): drop macro source field in rules and rule loader

…oader

Signed-off-by: Jason Dellaluce <jasondellaluce@gmail.com>
Signed-off-by: Jason Dellaluce <jasondellaluce@gmail.com>
@poiana
Copy link
Contributor

poiana commented Jun 27, 2022

LGTM label has been added.

Git tree hash: 1d651227cf2761b336b313008df08e708615ed69

@leogr
Copy link
Member

leogr commented Jun 27, 2022

/milestone 0.32.1

@poiana poiana added this to the 0.32.1 milestone Jun 27, 2022
Copy link
Contributor

@FedeDP FedeDP left a comment

Choose a reason for hiding this comment

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

/approve

@poiana poiana merged commit effabf5 into master Jun 28, 2022
@poiana poiana deleted the refactor/drop-macro-source-field-in-rules branch June 28, 2022 09:33
@poiana
Copy link
Contributor

poiana commented Jun 28, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: FedeDP, jasondellaluce

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:
  • OWNERS [FedeDP,jasondellaluce]

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

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.

4 participants