# falco

Falco runtime security agent: a DaemonSet watching system calls through the modern eBPF driver, with JSON alerts on stdout

This page is generated from [`kix/packages/experimental/falco`](https://github.com/kix-run/kix/tree/main/kix/packages/experimental/falco).

| | |
| --- | --- |
| Stability | Experimental |
| `package` value | `packages.experimental.falco` |
| Default software version | `0.45.2` |

## Dependencies

Kix matches each dependency below to another package instance by instance name, alias, or role. To bind a specific instance, set [`deps.<name>`](/docs/reference/instances-and-composition/#deps) in your cluster definition. See [Declaring dependencies](/docs/reference/package-anatomy/#declaring-dependencies) for how required and optional dependencies work.

| Dependency | Requirement |
| --- | --- |
| `prometheus` | Optional |

## Options

### `containerRuntime.sockets`

CRI sockets the container plugin reads container and pod metadata from, keyed by any name; null removes a default. The package mounts each socket's directory from the host. A socket that does not exist on a node is skipped there.

- **Type:** `attribute set of (null or string matching the pattern /[^
]*[^/
])`
- **Default:**

  ```nix
  {
    containerd = "/run/containerd/containerd.sock";
    crio = "/run/crio/crio.sock";
    k3s = "/run/k3s/containerd/containerd.sock";
  }
  ```
- **Example:**

  ```nix
  {
    crio = null;
    rke2 = "/run/k3s/containerd/containerd.sock";
  }
  ```

### `env`

Extra environment variables for Falco: a string, a `fieldRef` source, or a `kix.untrackedRef` secretKeyRef. HOST_ROOT and FALCO_HOSTNAME are set by the package.

- **Type:** ``attribute set of (null or string or env var source with `valueFrom`)``
- **Default:** `{ }`

### `image`

Container image for this instance. Set it from a pin file (`kix.pins`) so the deployed reference is committed and resolved.

- **Type:** `submodule`
- **Default:**

  ```nix
  {
    digest = "sha256:1562a643953f938e02f47319b5214d93a235f11f646d60e9b8a516fd5a64698e";
    pullPolicy = "IfNotPresent";
    repository = "docker.io/falcosecurity/falco";
    tag = "0.45.2";
  }
  ```

### `image.digest`

Resolved manifest digest, `sha256:` followed by 64 hex characters. What will actually run. Null means not resolved.

- **Type:** `null or string`
- **Default:** the package's digest while `tag` is the package's tag, otherwise null

### `image.note`

Whatever a person wanted to say about this pin. Kix never reads it and a promotion never discards it. Declared here for the same reason as the three fields above: a pin carries its own record-keeping, and the option accepts the whole pin rather than a subset of it.

- **Type:** `null or string`
- **Default:** `null`

### `image.promotedBy`

Who resolved this pin, for the record. Null when unknown.

- **Type:** `null or string`
- **Default:** `null`

### `image.pullPolicy`

imagePullPolicy for containers using this image. Null leaves it to Kubernetes.

- **Type:** `null or string`
- **Default:** `"IfNotPresent"`

### `image.repository`

Image repository, registry host included.

- **Type:** `string`
- **Default:** `"docker.io/falcosecurity/falco"`

### `image.resolvedAt`

When this pin was resolved, RFC 3339. Null when unknown.

- **Type:** `null or string`
- **Default:** `null`

### `image.sourceRev`

Revision of the source the image was built from, when Kix built it. Null for upstream images.

- **Type:** `null or string`
- **Default:** `null`

### `image.tag`

Image tag. What was asked for.

- **Type:** `string`
- **Default:** `"0.45.2"`

### `metrics.enabled`

Enable metrics endpoint and monitoring resources (ServiceMonitor, PrometheusRules) when prometheus is available.

- **Type:** `boolean`
- **Default:** `true`

### `metrics.interval`

Scrape interval (e.g. "30s"). Null = use Prometheus default.

- **Type:** `null or string`
- **Default:** `null`

### `resources`

Container resource requests and limits. Each field keeps its default until set, and null removes a default.

- **Type:** `submodule`
- **Default:**

  ```nix
  {
    limits = {
      cpu = "1";
      memory = "1024Mi";
    };
    requests = {
      cpu = "100m";
      memory = "512Mi";
    };
  }
  ```

### `resources.claims`

Dynamic resource claims the container uses. Null leaves it unset.

- **Type:** `null or (list of (submodule))`
- **Default:** `null`

### `resources.claims.*.name`

Name of an entry in the pod's `resourceClaims`.

- **Type:** `string`

### `resources.claims.*.request`

Request within the claim to use. Null uses the whole claim.

- **Type:** `null or string`
- **Default:** `null`

### `resources.limits`

Resource quantities by name.

- **Type:** `open submodule of attribute set of Kubernetes quantity, such as "500m" or "1Gi" (a non-negative decimal or integer with an optional suffix m, k, M, G, T, P, E, Ki, Mi, Gi, Ti, Pi or Ei)`
- **Default:** `{ }`

### `resources.limits.cpu`

The cpu quantity. Null leaves it unset.

- **Type:** `null or Kubernetes quantity, such as "500m" or "1Gi" (a non-negative decimal or integer with an optional suffix m, k, M, G, T, P, E, Ki, Mi, Gi, Ti, Pi or Ei)`
- **Default:** `"1"`

### `resources.limits.ephemeral-storage`

The ephemeral-storage quantity. Null leaves it unset.

- **Type:** `null or Kubernetes quantity, such as "500m" or "1Gi" (a non-negative decimal or integer with an optional suffix m, k, M, G, T, P, E, Ki, Mi, Gi, Ti, Pi or Ei)`
- **Default:** `null`

### `resources.limits.memory`

The memory quantity. Null leaves it unset.

- **Type:** `null or Kubernetes quantity, such as "500m" or "1Gi" (a non-negative decimal or integer with an optional suffix m, k, M, G, T, P, E, Ki, Mi, Gi, Ti, Pi or Ei)`
- **Default:** `"1024Mi"`

### `resources.requests`

Resource quantities by name.

- **Type:** `open submodule of attribute set of Kubernetes quantity, such as "500m" or "1Gi" (a non-negative decimal or integer with an optional suffix m, k, M, G, T, P, E, Ki, Mi, Gi, Ti, Pi or Ei)`
- **Default:** `{ }`

### `resources.requests.cpu`

The cpu quantity. Null leaves it unset.

- **Type:** `null or Kubernetes quantity, such as "500m" or "1Gi" (a non-negative decimal or integer with an optional suffix m, k, M, G, T, P, E, Ki, Mi, Gi, Ti, Pi or Ei)`
- **Default:** `"100m"`

### `resources.requests.ephemeral-storage`

The ephemeral-storage quantity. Null leaves it unset.

- **Type:** `null or Kubernetes quantity, such as "500m" or "1Gi" (a non-negative decimal or integer with an optional suffix m, k, M, G, T, P, E, Ki, Mi, Gi, Ti, Pi or Ei)`
- **Default:** `null`

### `resources.requests.memory`

The memory quantity. Null leaves it unset.

- **Type:** `null or Kubernetes quantity, such as "500m" or "1Gi" (a non-negative decimal or integer with an optional suffix m, k, M, G, T, P, E, Ki, Mi, Gi, Ti, Pi or Ei)`
- **Default:** `"512Mi"`

### `rules`

Extra Falco rule files, keyed by file name (letters, digits, `-`,
and `_`; `.yaml` is appended). Each value is the file's list of
entries, and each entry has exactly one of the keys
`rule`, `macro`, `list`, `required_engine_version`, `required_plugin_versions`.
Falco loads them after the image's default rules, in file-name
order, so a file may append to or override a default rule, list,
or macro (`override`, or `enabled: false`).

- **Type:** `attribute set of non-empty (list of attribute set of anything)`
- **Default:** `{ }`
- **Example:**

  ```nix
  {
    "50-shell-in-app" = [
      {
        condition = "k8s.ns.name = apps";
        macro = "app_namespace";
      }
      {
        condition = "spawned_process and container and app_namespace and proc.name in (sh, bash)";
        desc = "A shell started in a container of the apps namespace.";
        output = "Shell in app container (user=%user.name command=%proc.cmdline container=%container.name)";
        priority = "WARNING";
        rule = "Shell in app container";
      }
    ];
  }
  ```

### `settings`

falco.yaml settings, deep-merged over the package's; a list
replaces the package's list. The package sets
`json_output: true`, `stdout_output.enabled: true`,
`outputs_queue.capacity: 10000`,
`time_format_iso_8601: true`, `log_stderr: true`, `log_syslog: false`,
`syslog_output.enabled: false` (the image runs no syslog daemon),
`metrics.interval: 1h`, and `metrics.output_rule: false`; these may
be overridden. It
locks `config_files`, `engine.kind`, `load_plugins`, `metrics.enabled`, `plugins`, `rules_files`, `webserver.enabled`, `webserver.k8s_healthz_endpoint`, `webserver.listen_address`, `webserver.listen_port`, `webserver.prometheus_metrics_enabled`, `webserver.ssl_enabled`.
Setting a locked path fails evaluation. `http_output`,
`program_output`, and `file_output` are refused: no network egress
is derived for the first two, and the root filesystem is read-only.

- **Type:** `attribute set of anything`
- **Default:** `{ }`
- **Example:**

  ```nix
  {
    engine = {
      modern_ebpf = {
        buf_size_preset = 6;
      };
    };
    priority = "notice";
  }
  ```