falcosecurity / falco

Cloud Native Runtime Security
https://falco.org
Apache License 2.0
7.27k stars 895 forks source link

fs.target.name appears broken #3011

Closed cccsss01 closed 8 months ago

cccsss01 commented 8 months ago

fs.target.name creates error in falco-modern-bpf service.

Describe the bug Falco version: 0.36.2 (x86_64)

unable to utilize fs.target.name How to reproduce it install falco-modern-bpf 0.36.2 Fedora 34 distro 5.14.0-362.13.1.el9_3.x86_64

install falco-modern-bpf 0.36.2 Fedora 34 distro 5.14.0-362.13.1.el9_3.x86_64

Create local rules yaml file `- list: file_operation_paths items: [/share]

I expect service to reload/restart successfully. Screenshots

Environment

ALMALINUX_MANTISBT_PROJECT="AlmaLinux-9" ALMALINUX_MANTISBT_PROJECT_VERSION="9.3" REDHAT_SUPPORT_PRODUCT="AlmaLinux" REDHAT_SUPPORT_PRODUCT_VERSION="9.3"

RPM

1 Errors: In rules content: (/etc/falco/falco_rules.local.yaml:0:0) rule 'Any File Related Operation in Path': (/etc/falco/falco_rules.local.yaml:28:2) rule output: (/etc/falco/falco_rules.local.yaml:31:10)

output: > ^

LOAD_ERR_COMPILE_OUTPUT (Error compiling output): invalid formatting token fs.target.name)

incertum commented 8 months ago

fs.target.name is not a valid field, see https://falco.org/docs/rules/fspath/

fs.path.name
fs.path.nameraw
fs.path.source
fs.path.sourceraw
fs.path.target
fs.path.targetraw
cccsss01 commented 8 months ago

Acknowledged. We fixed a couple of things around fs.path.* fields and if ok with you could we wait for 2 weeks until Falco 0.37.0 is out? Then try again?

Or if you can try with the current master build it would be even better.

Yes, sounds good, 0.35.0 it works at least loaded in the service.

fs.target.name is not a valid field, see https://falco.org/docs/rules/fspath/

fs.path.name
fs.path.nameraw
fs.path.source
fs.path.sourceraw
fs.path.target
fs.path.targetraw

very interesting as the example below within the docs referenced it references fs.target.name and again, at least loads with 0.35.0

cccsss01 commented 8 months ago

Docs in example is wrong.