You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
API Version: artifact.falcosecurity.dev/v1alpha1Kind: Rulesfile
Description
The Rulesfile Custom Resource manages Falco detection rules. Rules can be sourced from OCI registries, defined inline as YAML, or loaded from Kubernetes ConfigMaps. All three sources can be combined in a single resource.
Spec
Field
Type
Default
Description
ociArtifact
*OCIArtifact
—
OCI artifact containing rules
inlineRules
*apiextensionsv1.JSON
—
Structured YAML rules defined inline
configMapRef
*ConfigMapRef
—
Reference to a ConfigMap containing rules (key: rules.yaml)
apiVersion: artifact.falcosecurity.dev/v1alpha1kind: Rulesfilemetadata:
name: custom-rulesspec:
inlineRules:
- rule: Terminal shell in containerdesc: A shell was used as the entrypoint into a container with an attached terminal.condition: > spawned_process and container and shell_procs and proc.tty != 0 and container_entrypointoutput: > A shell was spawned in a container (user=%user.name container_id=%container.id image=%container.image.repository)priority: NOTICEtags: [container, shell, mitre_execution]priority: 60
From ConfigMap
apiVersion: v1kind: ConfigMapmetadata:
name: my-rulesdata:
rules.yaml: | - rule: Write below binary dir desc: An attempt to write below a binary directory. condition: bin_dir and evt.dir = < and open_write output: File below binary dir opened for writing (file=%fd.name) priority: ERROR tags: [filesystem, mitre_persistence]
---
apiVersion: artifact.falcosecurity.dev/v1alpha1kind: Rulesfilemetadata:
name: configmap-rulesspec:
configMapRef:
name: my-rulespriority: 55