Production-grade platform engineering handbook — Kubernetes, Terraform, Flux CD, GitHub Actions, AWS, and more.
67
84%
Does it follow best practices?
Impact
—
No eval scenarios have been run
Passed
No known issues
Detect and respond to threats inside running containers using Falco.
When invoked with no arguments, ask before proceeding:
Q1 — Mode?
What do you need?
1. install — deploy Falco on Kubernetes (EKS or GKE) with eBPF driver
2. rules — write and test a custom Falco rule
3. alerts — configure Falcosidekick to route alerts (Slack, webhook, etc.)
4. debug — diagnose why a Falco rule is not firing
5. harden — map runtime Falco alerts to Kyverno admission policies
Enter 1–5 or mode name:Q2 — Context (after mode selected, one at a time):
Which cloud platform? EKS / GKE / other (specify node OS if known):Describe the behaviour to detect (e.g. "shell spawned in a container", "unexpected outbound connection"):Which output destination? Slack / webhook / PagerDuty / other:Describe the symptom — which rule is not firing, and what event should trigger it?Which Falco alert or rule output should block re-admission? (paste the alert or rule name):Then proceed into the relevant mode below.
Deploy Falco on Kubernetes (EKS or GKE) using the eBPF driver via Helm.
Prerequisites:
kubectl access to the target clusterSteps:
helm repo add falcosecurity https://falcosecurity.github.io/charts
helm repo updatehelm install falco falcosecurity/falco \
--namespace falco \
--create-namespace \
-f examples/runtime-security/falco-values.yamlkubectl rollout status daemonset/falco -n falco
kubectl get pods -n falco -o widekubectl logs -n falco -l app.kubernetes.io/name=falco --tail=20Notice A shell was spawned... (from the default ruleset test events)EKS-specific note: if using Bottlerocket nodes, set driver.kind: modern_ebpf in Helm values — Bottlerocket does not ship kernel headers for the classic eBPF probe.
GKE-specific note: COS nodes require driver.kind: modern_ebpf. GKE Autopilot does not support Falco (no DaemonSet scheduling).
Reference: references/runtime-security.md → eBPF driver, Node OS compatibility
Write and test custom Falco rules.
Steps:
- rule: Shell spawned in container
desc: A shell was spawned inside a container — potential interactive intrusion
condition: >
spawned_process
and container
and shell_procs
and not container.image.repository in (allowed_shell_images)
output: >
Shell spawned in container
(user=%user.name user_id=%user.uid
container=%container.name image=%container.image.repository
shell=%proc.name parent=%proc.pname cmdline=%proc.cmdline)
priority: WARNING
tags: [container, shell, mitre_execution]spawned_process — a new process was exec'dcontainer — event is inside a container (not on the host)proc.name — process namecontainer.image.repository — image name without tagfd.net — network file descriptor (for connection events)kubectl run event-generator \
--image=falcosecurity/event-generator \
--restart=Never \
--rm -it -- run syscallkubectl logs -n falco -l app.kubernetes.io/name=falco | grep WARNINGcustomRules:
custom-rules.yaml: |-
- rule: Shell spawned in container
...Reference: references/runtime-security.md → Rule syntax, Condition fields, Lists and macros
Configure Falcosidekick to route Falco alerts to Slack, webhooks, or other outputs.
Steps:
helm upgrade --install falco falcosecurity/falco \
--namespace falco \
--create-namespace \
--set falcosidekick.enabled=true \
--set falcosidekick.webui.enabled=true \
-f examples/runtime-security/falcosidekick-values.yamlfalcosidekick:
config:
slack:
webhookurl: "https://hooks.slack.com/services/<token>"
minimumpriority: warning
messageformat: >
Alert: *{{ .Rule }}* (Priority: {{ .Priority }})
Container: `{{ index .OutputFields "container.name" }}`
Image: `{{ index .OutputFields "container.image.repository" }}`kubectl port-forward -n falco svc/falco-falcosidekick-ui 2802:2802
# Open http://localhost:2802 — events appear in the UIslack.minimumpriority: warning to suppress DEBUG/INFO noiseReference: references/runtime-security.md → Falcosidekick, Output types
Diagnose why a Falco rule is not firing.
Checklist (work through in order):
kubectl get pods -n falco -o wide
kubectl logs -n falco -l app.kubernetes.io/name=falco | tail -20kubectl logs -n falco -l app.kubernetes.io/name=falco | grep -i "Loading rules"
kubectl exec -n falco daemonset/falco -- cat /etc/falco/rules.d/custom-rules.yaml 2>/dev/null \
|| kubectl exec -n falco daemonset/falco -- ls /etc/falco/kubectl exec -n falco daemonset/falco -- falco --validate /etc/falco/rules.d/custom-rules.yamlkubectl run test --image=falcosecurity/event-generator --rm -it -- run syscallfalcosidekick.config.slack.minimumpriority: error, rules with priority: WARNING are silently dropped. Adjust priority or threshold.never_true is shadowing your condition:
kubectl exec -n falco daemonset/falco -- cat /etc/falco/falco_rules.yaml | grep -A3 "macro: <macro name>"
kubectl exec -n falco daemonset/falco -- ls /etc/falco/rules.d/Reference: references/runtime-security.md → Troubleshooting
Map Falco runtime alerts to Kyverno admission policies to prevent redeployment of flagged workloads.
Steps:
kubectl label deployment <name> -n <namespace> \
security.platform/falco-alert=criticalapiVersion: policies.kyverno.io/v1
kind: ValidatingPolicy
metadata:
name: block-falco-flagged-workloads
spec:
validationActions: [Deny]
matchConstraints:
resourceRules:
- apiGroups: ["apps"]
apiVersions: ["v1"]
operations: ["CREATE", "UPDATE"]
resources: ["deployments"]
validations:
- expression: >
!has(object.metadata.labels) ||
!('security.platform/falco-alert' in object.metadata.labels) ||
object.metadata.labels['security.platform/falco-alert'] != 'critical'
message: "Deployment is flagged by a Falco critical alert and cannot be re-admitted. Remove the flag after remediation."Reference: references/runtime-security.md → Kyverno bridge, references/kyverno.md → ValidatingPolicy
After completing any runtime-security mode, log findings while context is fresh:
ERR in .learnings/ERRORS.mdLRN in .learnings/LEARNINGS.mdUse /platform-skills:self-improve log for each entry. Do not defer to end of session.
.claude-plugin
.github
commands
docs
examples
agent-self-improve
argocd
awesome-docs
aws
cloudfront
functions
lambda-edge
functions
azure
compliance
conventional-commits
datadog
llm-observability
demo
documentation
dora
dynatrace
fluxcd
github-actions
composite-actions
configure-cloud
db-migrate
docker-build-push
k8s-deploy
notify-slack
pr-comment
release-tag
security-scan
setup-env
setup-terraform
terraform-plan
helm
web-service
templates
kubernetes
kyverno
mcp
observability
openshift
pr-review
ownership
runtime-security
supply-chain
terraform
references
scripts
skills
platform-skills
tests