-
Notifications
You must be signed in to change notification settings - Fork 519
falco: fix dashboard visualisation and handling of event.original #11881
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
falco: fix dashboard visualisation and handling of event.original #11881
Conversation
|
Pinging @elastic/security-service-integrations (Team:Security-Service Integrations) |
e5a6af7 to
4bca948
Compare
🚀 Benchmarks reportTo see the full report comment with |
efd6
left a comment
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.
Can we add a test case for this?
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.
I don't think this should change.
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.
Make this depend on preserve_original_event?
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.
The use case of this processor is users that want to ingest directly from Falco without the need of a Elastic agent, so they'd just install the integration assets. In this scenario, incoming events would not include the preserve_original_event tag so that's why I didn't add it as a dependency.
Matching ctx?.output_fields != null means that the event doesn't follow the format that Filebeat delivers, wrapping the entire event into message, and it follows the format that Falco Sidekick provides.
This is also why I didn't add test cases, in the context of the integration, I couldn't find a way to reproduce this format.
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.
I don't think this is the right thing to do; toString gives a Java syntax representation of the value:
def a = [:];
a.a = 1;
a.b = 2;
a.c = "three";
a.toString();
{a=1, b=2, c=three}
We want something that renders the JSON. Json.dump works, though note that it does not canonicalise key order in my experience, so tests will be brittle.
def a = [:];
a.a = 1;
a.b = 2;
a.c = "three";
Json.dump(a);
{"a":1,"b":2,"c":"three"}
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.
Alternatively, just retaining the actual original data.
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.
Thanks for the suggestions. I've tried using Json.dump() and it works as you mentioned. I think it is ok that result doesn't follow canonical order as tests were not added for this use case.
aleksmaus
left a comment
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.
LGTM
💚 Build Succeeded
History
|
|
|
Package falco - 1.1.1 containing this change is available at https://epr.elastic.co/package/falco/1.1.1/ |
…astic#11881) This PR adds event.original to events directly ingested from Falco Sidekick. It also updates the Alerts by Host visualization to rely on the host.name instead of host.hostname.
…astic#11881) This PR adds event.original to events directly ingested from Falco Sidekick. It also updates the Alerts by Host visualization to rely on the host.name instead of host.hostname.




Proposed commit message
Falco assets are not only used for the integration itself. They are also used by users that want to ingest Falco alerts directly into Elasticsearch through Falco Sidekick (more information at https://www.elastic.co/blog/cncf-open-source-security-tools).
This PR adds
event.originalto events directly ingested from Falco Sidekick.It also updates the
Alerts by Hostvisualisation to rely on thehost.nameinstead ofhost.hostname.Checklist
changelog.ymlfile.Related issues
Screenshots