falcosecurity / falcosidekick-ui

A simple WebUI with latest events from Falco
Apache License 2.0
112 stars 16 forks source link

interface conversion: interface {} is []string, not string #144

Closed ctdfo closed 1 month ago

ctdfo commented 6 months ago

Describe the bug We are getting the interface conversion: interface {} is []string, not string error in our logs.

How to reproduce it Install the Falco Helm chart with Falcosidekick (using version 4.3.0, which corresponds to app version 0.37.1). Have the UI open at the Events section with refresh on (I put it at the default of 10s). Then create an event (I opened a shell in one of the running pods to cause the Terminal shell in container alert). You will notice the interface conversion: interface {} is []string, not string in the logs.

Expected behaviour No interface conversion: interface {} is []string, not string error.

Screenshots image

Environment

Additional context I am not quite sure where this is coming from. Could it possibly be from the string conversion in the CountKeyBy function: image

Issif commented 6 months ago

Hi,

Can you provide me the exact json payload generated by Falco? Did you customize the rule to change the tags or used output fields?

ctdfo commented 6 months ago

Hi,

Can you provide me the exact json payload generated by Falco? Did you customize the rule to change the tags or used output fields?

Hi @Issif, I am not quite sure what you meant by the exact json generated by Falco, but this is the Falco log output of the event that replicates the issue: {"hostname":"aks-default-32511568-vmss000087","output":"14:50:45.460592981: Notice A shell was spawned in a container with an attached terminal (evt_type=execve user=root user_uid=0 user_loginuid=-1 process=sh proc _exepath=/usr/bin/dash parent=runc command=sh terminal=34816 exe_flags=EXE_WRITABLE container_id=9af8a917fc3e container_image=docker.io/falcosecurity/falco-no-driver container_image_tag=0.37.1 container_name=falco k8s_ns=falco k8s_pod_name=falco-44ddf)","priority":"Notice","rule":"Terminal shell in container","source":"syscall","tags":["T1059","container","maturity_stable","mitre_execution","shell"],"time":"2024-04-24T14:50: 45.460592981Z", "output_fields": {"container.id":"9af8a917fc3e","container.image.repository":"docker.io/falcosecurity/falco-no-driver","container.image.tag":"0.37.1","container.name":"falco","evt.arg.flags":"EXE_WR ITABLE","evt.time":1713970245460592981,"evt.type":"execve","k8s.ns.name":"falco","k8s.pod.name":"falco-44ddf","proc.cmdline":"sh","proc.exepath":"/usr/bin/dash","proc.name":"sh","proc.pname":"runc","proc.tty":34816 ,"user.loginuid":-1,"user.name":"root","user.uid":0}}

Please, let me know if this is not what you meant.

Issif commented 6 months ago

This is exactly what I wanted, thanks a lot, it will allow me to try to reproduce. Thanks

Issif commented 6 months ago

The PR #145 fixes that issue, it will be included in the next release. The ETA is before summer.

poiana commented 3 months ago

Issues go stale after 90d of inactivity.

Mark the issue as fresh with /remove-lifecycle stale.

Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Provide feedback via https://github.com/falcosecurity/community.

/lifecycle stale

poiana commented 2 months ago

Stale issues rot after 30d of inactivity.

Mark the issue as fresh with /remove-lifecycle rotten.

Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Provide feedback via https://github.com/falcosecurity/community.

/lifecycle rotten

poiana commented 1 month ago

Rotten issues close after 30d of inactivity.

Reopen the issue with /reopen.

Mark the issue as fresh with /remove-lifecycle rotten.

Provide feedback via https://github.com/falcosecurity/community. /close

poiana commented 1 month ago

@poiana: Closing this issue.

In response to [this](https://github.com/falcosecurity/falcosidekick-ui/issues/144#issuecomment-2380396544): >Rotten issues close after 30d of inactivity. > >Reopen the issue with `/reopen`. > >Mark the issue as fresh with `/remove-lifecycle rotten`. > >Provide feedback via https://github.com/falcosecurity/community. >/close Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.