Detect and alert on suspicious activity inside running containers or on cluster nodes.
→Deploy Falco as a DaemonSet. Falco uses eBPF or a kernel module to monitor system calls and alerts on anomalous behavior based on its ruleset (e.g., shell in container, unexpected network connections).
Why: Falco provides real-time visibility into runtime behavior, enabling detection of threats like container escapes, cryptomining, or data exfiltration that static scanning cannot see.
Reference↗
A default Falco rule is generating too many false positives.
→Create a custom Falco rules file to override the default rule. Add exceptions to the rule's `condition` to exclude known-good behavior, such as specific processes or container images (e.g., `and not container.image.repository contains "debug"`).
Why: Tuning rules is critical for operationalizing runtime security. Reducing noise ensures that security teams can focus on actionable, high-priority alerts.
Record a chronological, immutable log of all actions taken against the Kubernetes API.
→Enable audit logging on the `kube-apiserver` by providing `--audit-policy-file` and `--audit-log-path` flags. Configure the policy to define what gets logged and at what level.
Why: Audit logs are essential for security analysis, incident investigation, and compliance. They provide a definitive record of who did what, and when.
Reference↗
Audit access to sensitive resources like Secrets without logging the secret content itself.
→Configure the audit policy rule for Secrets to use `level: Metadata`. This logs the user, timestamp, resource, and verb, but omits the request and response bodies.
Why: This provides accountability for who is accessing secrets without creating a new security risk by writing sensitive data into the audit logs.
Aggregate logs from all cluster components and applications for centralized analysis.
→Deploy a log collection agent (e.g., Fluentd, Vector) as a DaemonSet to collect logs from nodes and forward them to a centralized SIEM or log management system (e.g., Elasticsearch, Splunk).
Why: Centralized logging is crucial for correlating events across the cluster during an incident investigation and for maintaining long-term records for compliance.
Forward Falco security alerts to an external system for notification and response.
→Deploy `Falcosidekick` alongside Falco. Configure it to receive alerts from Falco and forward them to outputs like Slack, PagerDuty, or a SIEM.
Why: Falcosidekick provides a flexible and robust mechanism for integrating Falco's real-time alerts into existing operational and security workflows.
Detect if a running container has been modified, which could indicate a compromise.
→Enforce immutable containers with `readOnlyRootFilesystem: true`. Use a runtime security tool like Falco to monitor for and alert on any file writes to unexpected locations.
Why: In an immutable model, containers are never changed at runtime; they are replaced. Any deviation from this pattern is a strong indicator of a potential security breach.