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

new(falco): add json_include_message_property to have a message field without date and priority #3314

Merged
merged 1 commit into from
Sep 11, 2024

Conversation

LucaGuerra
Copy link
Contributor

@LucaGuerra LucaGuerra commented Sep 6, 2024

What type of PR is this?

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

/kind feature

Any specific area of the project related to this PR?

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

/area engine

What this PR does / why we need it:

There are multiple discussions (#2985) about allowing JSON output that has a field containing only the rule output. One proposal is to change the output format but that would cause breaking changes, and also several tools (including possibly Falcosidekick) rely on a specific output format so it seems too risky to do that. However, we still want the pure unfiltered rule output, so we're introducing a new field called "message" to do just that. You can turn on and off both the output and message fields from your falco.yaml.

Example of the difference between the two:

  "message": "A process has started! (proc_exe=cat proc_sname=bash)",
  "output": "15:47:29.809967681: Warning A process has started! (proc_exe=cat proc_sname=bash)",

NOTE1: This PR is WIP because it depends on: #3308 , but it's useful to run the CI
NOTE2: I also wrote a much heavier modification to the test suite to allow this to be tested, but it involves creating sinsp events and so it's a bit messy, it'll require more discussion

Which issue(s) this PR fixes:

Fixes #2985

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

new(falco): add json_include_message_property to have a message field without date and priority

Copy link

github-actions bot commented Sep 6, 2024

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

@LucaGuerra LucaGuerra force-pushed the new/json_include_message branch 2 times, most recently from bc50207 to 17e45c2 Compare September 9, 2024 13:42
@LucaGuerra
Copy link
Contributor Author

LucaGuerra commented Sep 9, 2024

Please double check userspace/engine/falco_engine_version.h file. See versioning for FALCO_ENGINE_VERSION.

false positive

/unhold

@LucaGuerra LucaGuerra changed the title wip: new(falco): add json_include_message_property to have a message field without date and priority new(falco): add json_include_message_property to have a message field without date and priority Sep 9, 2024
@LucaGuerra
Copy link
Contributor Author

/milestone 0.39.0

@poiana poiana added this to the 0.39.0 milestone Sep 10, 2024
falco.yaml Show resolved Hide resolved
@LucaGuerra LucaGuerra force-pushed the new/json_include_message branch from 17e45c2 to 4a33e78 Compare September 11, 2024 13:17
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
Copy link
Contributor

poiana commented Sep 11, 2024

LGTM label has been added.

Git tree hash: 72b133d9d8fc77af867fe677be4852f7987bf8b5

@poiana
Copy link
Contributor

poiana commented Sep 11, 2024

[APPROVALNOTIFIER] This PR is APPROVED

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

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@poiana poiana merged commit bc7394b into falcosecurity:master Sep 11, 2024
35 checks passed
@LucaGuerra LucaGuerra deleted the new/json_include_message branch September 12, 2024 06:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Change the format of the 'output' field in the JSON payload
5 participants