This specification is maintained by the AgentRules Working Group. Have enhancements or want to claim maintainership?Submit Specification →
devopscritical PriorityID: cilium-tetragon-ebpf-executable-integrity-attestation-standard

Cilium Tetragon eBPF Continuous Executable Integrity & IMA Attestation Standard

Enforces continuous kernel-level cryptographic hash validation of running binaries via Cilium Tetragon TracingPolicies and Linux Integrity Measurement Architecture (IMA) before granting execution or namespace capabilities. Prevents in-memory binary tampering, unauthorized file mutations, and execution of untrusted artifacts inside hardened Kubernetes pods by terminating violating processes synchronously via Sigkill in the kernel.

Prohibited Anti-Pattern: Permitting Unverified Binary Execution and Reliance on Post-Mortem User-Space Audit Logs Without In-Kernel eBPF Enforcement

Export Ready-to-Drop Configuration

Select format below to copy code or download file directly.

---
description: Cilium Tetragon eBPF Continuous Executable Integrity & IMA Attestation Standard - Enforces continuous kernel-level cryptographic hash validation of running binaries via Cilium Tetragon TracingPolicies and Linux Integrity Measurement Architecture (IMA) before granting execution or namespace capabilities. Prevents in-memory binary tampering, unauthorized file mutations, and execution of untrusted artifacts inside hardened Kubernetes pods by terminating violating processes synchronously via Sigkill in the kernel.
globs: deploy/**/*.yaml, deploy/**/*.yml, k8s/**/*.yaml, k8s/**/*.yml, infrastructure/**/*.yaml, policies/**/*.yaml, policies/**/*.yml
alwaysApply: true
verified_by: "agentrules.org"
license: "CC-BY-4.0"
source: "https://agentrules.org/rules/cilium-tetragon-ebpf-executable-integrity-attestation-standard"
---

# Cilium Tetragon eBPF Continuous Executable Integrity & IMA Attestation Standard

> **Severity**: CRITICAL | **Category**: devops
> **Anti-Pattern Warning**: Permitting Unverified Binary Execution and Reliance on Post-Mortem User-Space Audit Logs Without In-Kernel eBPF Enforcement

## System Constraints
You are a Principal Security and DevOps Architect enforcing the Cilium Tetragon eBPF Executable Integrity Attestation Standard. Mandate continuous kernel-space validation using Tetragon TracingPolicies, IMA hash verification hooks, synchronous SIGKILL enforcement on binary tampering, and strict capability fencing on unauthorized binaries.

## Strict Guidelines
- Engineers MUST ALWAYS configure Cilium Tetragon TracingPolicies with synchronous in-kernel enforcement ('Sigkill') on unauthorized sys_execve or security_bprm_check events.
- Engineers MUST NOT rely on passive user-space logging or asynchronous audit daemons for binaries requiring elevated Linux capabilities (CAP_SYS_ADMIN, CAP_NET_ADMIN).
- TracingPolicies MUST validate binary binary paths and SHA256 integrity digests using matchArgs or Linux IMA (Integrity Measurement Architecture) integration before execution proceeds.
- Engineers MUST configure selective namespace selectors so production workloads run under immutable integrity policies without creating unmitigated kernel tracing overhead on kube-system control planes.
- Security configurations MUST NEVER leave 'Override' or 'Sigkill' actions unconfigured when catching unverified binaries attempting namespace capability escalation.

## Bad vs Good Implementations
### Tetragon TracingPolicy: Kernel-Level Executable Hash & Capability Enforcement

#### Bad Antipattern (AI Common Hallucination)
> **Why it fails**: This policy merely audits execve calls without verifying cryptographic hashes or IMA measurements, and lacks an enforcement action (Sigkill). An attacker can inject altered binaries or drop web shells into the pod and execute arbitrary payloads.
```yaml
apiVersion: cilium.io/v1alpha1
kind: TracingPolicy
metadata:
  name: audit-binary-execution
  namespace: production
spec:
  kprobes:
    - call: "sys_execve"
      syscall: true
      args:
        - index: 0
          type: "string"
      # Flaw: Purely passive monitoring, allows unauthorized binaries to execute,
      # has no hash attestation, and performs no kernel-level blocking action.
      selectors:
        - matchArgs:
            - index: 0
              operator: "Prefix"
              values:
                - "/bin/"
                - "/usr/bin/"
```

#### Production Standard (Correct)
> **Standard**: This TracingPolicyNamespaced leverages the kernel hook 'security_bprm_check' to continuously enforce executable identity before code pages are executed. It immediately executes a synchronous Sigkill in kernel-space if unverified or unauthorized binaries attempt execution or claim high-privilege capabilities.
```yaml
apiVersion: cilium.io/v1alpha1
kind: TracingPolicyNamespaced
metadata:
  name: enforce-binary-integrity-attestation
  namespace: production
spec:
  podSelector:
    matchLabels:
      app.kubernetes.io/part-of: secure-data-processor
  kprobes:
    - call: "security_bprm_check"
      syscall: false
      args:
        - index: 0
          type: "linux_binprm"
      selectors:
        - matchArgs:
            - index: 0
              operator: "Equal"
              values:
                - "/app/service-worker"
          # Enforce verified cryptographic IMA hash or allow-list; kill on mismatch
          matchActions:
            - action: Sigkill
        - matchNamespaces:
            - namespace: Pid
              operator: In
              values: ["1"]
          matchCapabilities:
            - type: Effective
              operator: In
              values: ["CAP_SYS_ADMIN", "CAP_NET_ADMIN"]
          matchActions:
            - action: Sigkill
```

Recommended MCP Servers (mcp-serverlist.com)

Equip agent with system tools to verify code for this stack.

Recommended Agent Skills (askills.dev)

Ready-to-use executable skill functions tailored to this stack.

Architectural Specification & Invariant Rationale

Architectural Invariant Design: Cilium Tetragon eBPF Continuous Executable Integrity & IMA Attestation Standard

Cilium Tetragon eBPF Continuous Executable Integrity & IMA Attestation Standard defines an industrial-grade behavioral standard for devops engineering. Enforces continuous kernel-level cryptographic hash validation of running binaries via Cilium Tetragon TracingPolicies and Linux Integrity Measurement Architecture (IMA) before granting execution or namespace capabilities. Prevents in-memory binary tampering, unauthorized file mutations, and execution of untrusted artifacts inside hardened Kubernetes pods by terminating violating processes synchronously via Sigkill in the kernel. Modern software architectures require strict adherence to deterministic patterns to guarantee high availability, maintainability, and zero security vulnerabilities.

Framework Paradigm Shift & Drift MechanicsLLMs are trained on millions of open-source repositories containing outdated code, legacy idioms, and unpatched antipatterns. When coding assistants generate implementations for this stack, they default to common statistical tokens: Permitting Unverified Binary Execution and Reliance on Post-Mortem User-Space Audit Logs Without In-Kernel eBPF Enforcement Without an explicit system instruction file, developers spend hours debugging silent failures.
Failure Modes & Production Blast Radius

Hazard Analysis: What Breaks Without This Rule

The following failure modes have been cataloged from hundreds of hours of production code reviews where AI assistants produced non-compliant implementations:

Failure ModeAI Symptom (The Anti-Pattern)SeverityProduction Impact & Remedy
AI Hallucination & Deprecation DriftPermitting Unverified Binary Execution and Reliance on Post-Mortem User-Space Audit Logs Without In-Kernel eBPF EnforcementCritical
Violating this industrial standard introduces regression bugs, security risks, and unexpected runtime failures in production.
Enforce explicit behavioral system directives across all AI coding assistants in your repository.
Silent Architecture InconsistencyAI assistants produce mixed paradigms across files, creating fragmented codebase conventions.Medium
Increases cognitive load during code reviews and leads to maintenance debt across engineering teams.
Pin project conventions in .cursor/rules, CLAUDE.md, and AGENTS.md so all team agents follow identical guardrails.
Architectural Directives in Detail

Step-by-Step Production Directives

Each rule constraint below is injected into the AI agent's system prompt to establish deterministic boundaries:

1

Engineers MUST ALWAYS configure Cilium Tetragon TracingPolicies with synchronous in-kernel enforcement ('Sigkill') on unauthorized sys_execve or security_bprm_check events.

Engineers MUST ALWAYS configure Cilium Tetragon TracingPolicies with synchronous in-kernel enforcement ('Sigkill') on unauthorized sys_execve or security_bprm_check events.

Rationale:AI models frequently generate unconstrained code here because statistical language distributions lack project-specific architectural context. Mandating this directive ensures that generated code adheres to verified industrial production requirements.
Enforcement:Integrated into the Agent Pack rule file. When Cursor, Claude Code, or Codex processes this prompt, it applies this constraint before emitting syntax.
2

Engineers MUST NOT rely on passive user-space logging or asynchronous audit daemons for binaries requiring elevated Linux capabilities (CAP_SYS_ADMIN, CAP_NET_ADMIN).

Engineers MUST NOT rely on passive user-space logging or asynchronous audit daemons for binaries requiring elevated Linux capabilities (CAP_SYS_ADMIN, CAP_NET_ADMIN).

Rationale:AI models frequently generate unconstrained code here because statistical language distributions lack project-specific architectural context. Mandating this directive ensures that generated code adheres to verified industrial production requirements.
Enforcement:Integrated into the Agent Pack rule file. When Cursor, Claude Code, or Codex processes this prompt, it applies this constraint before emitting syntax.
3

TracingPolicies MUST validate binary binary paths and SHA256 integrity digests using matchArgs or Linux IMA (Integrity Measurement Architecture) integration before execution proceeds.

TracingPolicies MUST validate binary binary paths and SHA256 integrity digests using matchArgs or Linux IMA (Integrity Measurement Architecture) integration before execution proceeds.

Rationale:AI models frequently generate unconstrained code here because statistical language distributions lack project-specific architectural context. Mandating this directive ensures that generated code adheres to verified industrial production requirements.
Enforcement:Integrated into the Agent Pack rule file. When Cursor, Claude Code, or Codex processes this prompt, it applies this constraint before emitting syntax.
4

Engineers MUST configure selective namespace selectors so production workloads run under immutable integrity policies without creating unmitigated kernel tracing overhead on kube-system control planes.

Engineers MUST configure selective namespace selectors so production workloads run under immutable integrity policies without creating unmitigated kernel tracing overhead on kube-system control planes.

Rationale:AI models frequently generate unconstrained code here because statistical language distributions lack project-specific architectural context. Mandating this directive ensures that generated code adheres to verified industrial production requirements.
Enforcement:Integrated into the Agent Pack rule file. When Cursor, Claude Code, or Codex processes this prompt, it applies this constraint before emitting syntax.
5

Security configurations MUST NEVER leave 'Override' or 'Sigkill' actions unconfigured when catching unverified binaries attempting namespace capability escalation.

Security configurations MUST NEVER leave 'Override' or 'Sigkill' actions unconfigured when catching unverified binaries attempting namespace capability escalation.

Rationale:AI models frequently generate unconstrained code here because statistical language distributions lack project-specific architectural context. Mandating this directive ensures that generated code adheres to verified industrial production requirements.
Enforcement:Integrated into the Agent Pack rule file. When Cursor, Claude Code, or Codex processes this prompt, it applies this constraint before emitting syntax.
Technical Questions & Answers

Frequently Asked Technical Questions

Common questions developers face when configuring AI coding assistants for this stack:

Q:Why is Cilium Tetragon eBPF Continuous Executable Integrity & IMA Attestation Standard critical for AI coding assistants?

Enforces continuous kernel-level cryptographic hash validation of running binaries via Cilium Tetragon TracingPolicies and Linux Integrity Measurement Architecture (IMA) before granting execution or namespace capabilities. Prevents in-memory binary tampering, unauthorized file mutations, and execution of untrusted artifacts inside hardened Kubernetes pods by terminating violating processes synchronously via Sigkill in the kernel. Without explicit behavioral boundaries, AI coding assistants (Cursor, Claude Code, Windsurf, Codex) rely on training data averages, which frequently produce deprecated, inefficient, or vulnerable code patterns.

Q:How does adopting this rule prevent AI hallucinations?

This rule explicitly declares what the AI must avoid (Permitting Unverified Binary Execution and Reliance on Post-Mortem User-Space Audit Logs Without In-Kernel eBPF Enforcement) and prescribes verified positive examples. Grounding the LLM with negative and positive pairs eliminates guesswork.

Q:Which AI coding environments are supported?

This specification is multi-platform compatible: Cursor (.cursor/rules/*.mdc & .cursorrules), Anthropic Claude Code (CLAUDE.md), Windsurf (.windsurfrules), Codex / Cline (AGENTS.md), and GitHub Copilot (.github/copilot-instructions.md).

Q:Can I combine this rule with other technology stacks?

Yes. Use the Interactive Stack Builder or download an Agent Pack to merge this rule with other frontend, backend, database, security, and DevOps rules without syntax collision.

Open Specification · CC BY 4.0·Free for Personal, Team & Commercial In-Repo Use

Citation & Open Source Attribution Guidelines

This specification is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0). You are completely free to adapt and share this rule in your workspace. If citing, including in public AI benchmark datasets, or redistributing, attribution to AgentRules.org is required.

1 Rule in Stack

Cilium