Skip to content

Tune Falco runtime detections

You’ll customize which threats Falco detects by enabling additional rulesets, disabling noisy rules, overriding built-in macros and lists, adding rule exceptions, and writing custom rules — all via bundle overrides without modifying Falco source files.

  • UDS Core deployed
  • UDS CLI installed
  • Access to a Kubernetes cluster

UDS Core ships Falco with three rulesets. Only the stable ruleset is enabled by default:

RulesetDefaultDescription
StableEnabledProduction-grade rules covering common attack patterns (privilege escalation, unauthorized file access, container breakout)
IncubatingDisabledRules with robust coverage for more specific use cases; may generate noise in some environments
SandboxDisabledExperimental rules for emerging threat patterns; expect false positives

UDS Core also pre-disables a set of known-noisy rules from each ruleset:

RulesetDisabled ruleReason
StableContact K8S API Server From ContainerExpected behavior in UDS Core
IncubatingChange thread namespaceZtunnel generates high volume
IncubatingContact EC2 Instance Metadata Service From ContainerExpected in AWS environments using IMDS
IncubatingContact cloud metadata service from containerExpected in cloud environments using metadata services

All configuration in this guide uses the uds-falco-config Helm chart overrides in your uds-bundle.yaml. You can combine overrides from multiple steps into a single values array — the steps below show each override independently for clarity.

  1. Enable additional rulesets

    To enable the incubating and/or sandbox rulesets, add the following overrides:

    uds-bundle.yaml
    packages:
    - name: core
    repository: registry.defenseunicorns.com/public/core
    ref: x.x.x-upstream
    overrides:
    falco:
    uds-falco-config:
    values:
    - path: incubatingRulesEnabled
    value: true
    - path: sandboxRulesEnabled
    value: true
  2. Disable specific rules by name

    You can explicitly disable any Falco rule by name using the disabledRules value. Rules listed here are disabled across all enabled rulesets (stable, incubating, and sandbox).

    uds-bundle.yaml
    overrides:
    falco:
    uds-falco-config:
    values:
    - path: disabledRules
    value:
    - "Write below root"
    - "Read environment variable from /proc files"

    How to find rule names:

    Look for entries that start with - rule: in the rule files to find exact rule names.

  3. Override built-in lists, macros, and rules

    For more granular control, use the overrides value to modify Falco’s built-in lists, macros, and rule exceptions without disabling entire rules:

    uds-bundle.yaml
    overrides:
    falco:
    uds-falco-config:
    values:
    - path: overrides
    value:
    lists:
    trusted_images:
    action: replace
    items:
    - "registry.corp/*"
    - "gcr.io/distroless/*"
    macros:
    open_write:
    action: append
    condition: "or evt.type=openat"
    rules:
    "Unexpected UDP Traffic":
    exceptions:
    action: append
    items:
    - name: allow_udp_in_smoke_ns
    fields: ["proc.name", "fd.l4proto"]
    comps: ["=", "="]
    values:
    - ["iptables-restore", "udp"]

    Override reference:

    PathActionDescription
    overrides.lists.<name>.actionreplace or appendHow to apply list items
    overrides.lists.<name>.itemsarrayList entries to apply
    overrides.macros.<name>.actionreplace or appendHow to apply the macro condition
    overrides.macros.<name>.conditionstringMacro condition to apply
    overrides.rules.<name>.exceptions.actionappendHow to apply exceptions
    overrides.rules.<name>.exceptions.itemsarrayException entries (name, fields, comps, values)
  4. Add custom rules

    To define entirely new Falco rules, use the extraRules value:

    uds-bundle.yaml
    overrides:
    falco:
    uds-falco-config:
    values:
    - path: extraRules
    value:
    - rule: "My Local Rule"
    desc: "Example additional rule"
    condition: evt.type=open
    output: "opened file"
    priority: NOTICE
    tags: ["local"]
  5. Create and deploy your bundle

    Terminal window
    uds create <path-to-bundle-dir>
    uds deploy uds-bundle-<name>-<arch>-<version>.tar.zst

Confirm Falco is running and rules are loaded:

Terminal window
# Check Falco pods are running
uds zarf tools kubectl get pods -n falco
# Check Falco loaded your rules (look for "Rules loaded" in output)
uds zarf tools kubectl logs -n falco -l app.kubernetes.io/name=falco --tail=20

To verify your tuning by examining what events Falco is generating, see Query Falco events in Grafana.

Problem: Rule override or disable has no effect

Section titled “Problem: Rule override or disable has no effect”

Symptoms: Alerts continue to fire for a rule you disabled or added an exception to.

Solution: Verify the rule name matches exactly — names are case-sensitive and must match the rule: field in the Falco rules files. Also confirm the override is targeting the correct chart (uds-falco-config, not falco):

Terminal window
# Check which rules Falco loaded
uds zarf tools kubectl logs -n falco -l app.kubernetes.io/name=falco | grep -i "rule"

Problem: Falco pod crash-loops after adding custom rules

Section titled “Problem: Falco pod crash-loops after adding custom rules”

Symptoms: Falco pod enters CrashLoopBackOff after deploying with extraRules or overrides.

Solution: Check Falco logs for YAML parse errors or invalid rule syntax:

Terminal window
uds zarf tools kubectl logs -n falco -l app.kubernetes.io/name=falco --previous

Common issues: missing quotes around rule names with special characters, mismatched fields/comps array lengths in exceptions, or invalid condition syntax in macros.

These guides and concepts may be useful to explore next: