-
Notifications
You must be signed in to change notification settings - Fork 452
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
base: main
Are you sure you want to change the base?
falco: fix dashboard visualisation and handling of event.original #11881
Conversation
Pinging @elastic/security-service-integrations (Team:Security-Service Integrations) |
f2343f7
to
87834af
Compare
e5a6af7
to
4bca948
Compare
🚀 Benchmarks reportTo see the full report comment with |
💚 Build Succeeded
History
|
Quality Gate passedIssues Measures |
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.
def original = ctx.falco.toString(); | ||
if (original != null) { | ||
if (ctx.event == null) { | ||
ctx.event = new HashMap(); | ||
} | ||
ctx.event.original = original; | ||
} |
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
?
@@ -36,7 +38,14 @@ processors: | |||
ctx.remove(v); | |||
} | |||
} | |||
ctx['falco'] = m | |||
ctx['falco'] = m; | |||
def original = ctx.falco.toString(); |
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.
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.original
to events directly ingested from Falco Sidekick.It also updates the
Alerts by Host
visualisation to rely on thehost.name
instead ofhost.hostname
.Checklist
changelog.yml
file.Related issues
Screenshots