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

Null output_fields object in falco output for k8s audit events #1845

Closed
tspearconquest opened this issue Jan 7, 2022 · 0 comments · Fixed by #1847
Closed

Null output_fields object in falco output for k8s audit events #1845

tspearconquest opened this issue Jan 7, 2022 · 0 comments · Fixed by #1847
Labels

Comments

@tspearconquest
Copy link
Contributor

Describe the bug
The output_fields object in falco output for k8s audit log events in an AKS cluster is null, but should either be an empty hash or have the output fields properly parsed and dropped into the object for log analysis tools.

Currently fluentd cannot process these log entries and throws a parsing error

How to reproduce it

Expected behaviour
output_fields has a value, even if it is just an empty hash

Environment

  • Falco version: 0.30.0-bb8b75a2
  • System info:
  • Cloud provider or hardware configuration: Azure
  • OS: Ubuntu 18.04
  • Kernel:
  • Installation method: Kubernetes

Additional context
After successfully configuring falco and the sysdig audit log forwarder to work together in an AKS cluster, we observed that the k8s audit events have a null value for the output_fields object.

Because of this, fluentd's json parser cannot parse these events without first mutating the output to include an empty hash for the output_fields object. If we leave it null, the fluent throws a parser error for every log entry with a null value.

All of our k8s audit log events in falco have this issue, it is not limited to a specific rule or set of rules in falco.

The output in question looks like below:

{"output":"15:17:01.590452992: Notice Attach/Exec to pod (user=system:serviceaccount:glab:gitlab-runner pod=runner-mxnwd6zb-project-17542877-concurrent-0l2p7t ns=glab action=exec command=gitlab-runner-helper)","priority":"Notice","rule":"Attach/Exec Pod","source":"k8s_audit","tags":["k8s"],"time":"2022-01-07T15:17:01.590452992Z", "output_fields": }

It should look like below:

{"output":"15:17:01.590452992: Notice Attach/Exec to pod (user=system:serviceaccount:glab:gitlab-runner pod=runner-mxnwd6zb-project-17542877-concurrent-0l2p7t ns=glab action=exec command=gitlab-runner-helper)","priority":"Notice","rule":"Attach/Exec Pod","source":"k8s_audit","tags":["k8s"],"time":"2022-01-07T15:17:01.590452992Z","output_fields":{}}

Please check and correct this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant