Tune Falco runtime detections
What you’ll accomplish
Section titled “What you’ll accomplish”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.
Prerequisites
Section titled “Prerequisites”- UDS Core deployed
- UDS CLI installed
- Access to a Kubernetes cluster
Before you begin
Section titled “Before you begin”UDS Core ships Falco with three rulesets. Only the stable ruleset is enabled by default:
| Ruleset | Default | Description |
|---|---|---|
| Stable | Enabled | Production-grade rules covering common attack patterns (privilege escalation, unauthorized file access, container breakout) |
| Incubating | Disabled | Rules with robust coverage for more specific use cases; may generate noise in some environments |
| Sandbox | Disabled | Experimental rules for emerging threat patterns; expect false positives |
UDS Core also pre-disables a set of known-noisy rules from each ruleset:
| Ruleset | Disabled rule | Reason |
|---|---|---|
| Stable | Contact K8S API Server From Container | Expected behavior in UDS Core |
| Incubating | Change thread namespace | Ztunnel generates high volume |
| Incubating | Contact EC2 Instance Metadata Service From Container | Expected in AWS environments using IMDS |
| Incubating | Contact cloud metadata service from container | Expected 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.
-
Enable additional rulesets
To enable the incubating and/or sandbox rulesets, add the following overrides:
uds-bundle.yaml packages:- name: corerepository: registry.defenseunicorns.com/public/coreref: x.x.x-upstreamoverrides:falco:uds-falco-config:values:- path: incubatingRulesEnabledvalue: true- path: sandboxRulesEnabledvalue: true -
Disable specific rules by name
You can explicitly disable any Falco rule by name using the
disabledRulesvalue. Rules listed here are disabled across all enabled rulesets (stable, incubating, and sandbox).uds-bundle.yaml overrides:falco:uds-falco-config:values:- path: disabledRulesvalue:- "Write below root"- "Read environment variable from /proc files"How to find rule names:
- Falco rules reference — complete list of stable, incubating, and sandbox rules
- UDS Core stable rules —
src/falco/chart/rules/stable-rules.yaml - UDS Core incubating rules —
src/falco/chart/rules/incubating-rules.yaml - UDS Core sandbox rules —
src/falco/chart/rules/sandbox-rules.yaml - Falco logs — query Loki with
{rule=~".+"}to see rule names from live detections
Look for entries that start with
- rule:in the rule files to find exact rule names. -
Override built-in lists, macros, and rules
For more granular control, use the
overridesvalue 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: overridesvalue:lists:trusted_images:action: replaceitems:- "registry.corp/*"- "gcr.io/distroless/*"macros:open_write:action: appendcondition: "or evt.type=openat"rules:"Unexpected UDP Traffic":exceptions:action: appenditems:- name: allow_udp_in_smoke_nsfields: ["proc.name", "fd.l4proto"]comps: ["=", "="]values:- ["iptables-restore", "udp"]Override reference:
Path Action Description overrides.lists.<name>.actionreplaceorappendHow to apply list items overrides.lists.<name>.itemsarray List entries to apply overrides.macros.<name>.actionreplaceorappendHow to apply the macro condition overrides.macros.<name>.conditionstring Macro condition to apply overrides.rules.<name>.exceptions.actionappendHow to apply exceptions overrides.rules.<name>.exceptions.itemsarray Exception entries ( name,fields,comps,values) -
Add custom rules
To define entirely new Falco rules, use the
extraRulesvalue:uds-bundle.yaml overrides:falco:uds-falco-config:values:- path: extraRulesvalue:- rule: "My Local Rule"desc: "Example additional rule"condition: evt.type=openoutput: "opened file"priority: NOTICEtags: ["local"] -
Create and deploy your bundle
Terminal window uds create <path-to-bundle-dir>uds deploy uds-bundle-<name>-<arch>-<version>.tar.zst
Verification
Section titled “Verification”Confirm Falco is running and rules are loaded:
# Check Falco pods are runninguds 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=20To verify your tuning by examining what events Falco is generating, see Query Falco events in Grafana.
Troubleshooting
Section titled “Troubleshooting”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):
# Check which rules Falco loadeduds 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:
uds zarf tools kubectl logs -n falco -l app.kubernetes.io/name=falco --previousCommon issues: missing quotes around rule names with special characters, mismatched fields/comps array lengths in exceptions, or invalid condition syntax in macros.
Related Documentation
Section titled “Related Documentation”- Falco default rules reference — complete list of stable, incubating, and sandbox rules
- Falco rules syntax — upstream reference for writing Falco rules, macros, and lists
- Runtime security concepts — background on how Falco and runtime threat detection work in UDS Core
Next steps
Section titled “Next steps”These guides and concepts may be useful to explore next: