This specification is maintained by the AgentRules Working Group. Have enhancements or want to claim maintainership?Submit Specification →
devopscritical PriorityID: cilium-ebpf-xdp-ingress-cryptographic-attestation-guardrail

Cilium eBPF XDP Ingress Cryptographic Attestation Validation Standard

Enforces strict cryptographic attestation (IPsec, WireGuard, or SPIFFE/mTLS token verification) during Cilium eBPF XDP ingress acceleration. Prevents kernel-bypass line-rate packet processing from short-circuiting zero-trust authentication boundaries prior to cluster workload dispatch.

Prohibited Anti-Pattern: Short-Circuiting Cryptographic Verification via Unchecked XDP_REDIRECT Ingress Rules

Export Ready-to-Drop Configuration

Select format below to copy code or download file directly.

---
description: Cilium eBPF XDP Ingress Cryptographic Attestation Validation Standard - Enforces strict cryptographic attestation (IPsec, WireGuard, or SPIFFE/mTLS token verification) during Cilium eBPF XDP ingress acceleration. Prevents kernel-bypass line-rate packet processing from short-circuiting zero-trust authentication boundaries prior to cluster workload dispatch.
globs: infra/**/*.ts, deploy/**/*.ts, k8s/**/*.ts, src/infra/**/*.ts
alwaysApply: true
verified_by: "agentrules.org"
license: "CC-BY-4.0"
source: "https://agentrules.org/rules/cilium-ebpf-xdp-ingress-cryptographic-attestation-guardrail"
---

# Cilium eBPF XDP Ingress Cryptographic Attestation Validation Standard

> **Severity**: CRITICAL | **Category**: devops
> **Anti-Pattern Warning**: Short-Circuiting Cryptographic Verification via Unchecked XDP_REDIRECT Ingress Rules

## System Constraints
You are a Principal Software Architect enforcing Cilium eBPF XDP Ingress Cryptographic Attestation Validation. Mandate that all high-throughput, line-rate XDP packet steering pipelines validate cryptographic authenticity (WireGuard tunnel context, IPsec ESP authentication headers, or hardware-offloaded cryptographic signatures) before issuing XDP_REDIRECT into tenant pod veth interfaces or overlay tunnels.

## Strict Guidelines
- Engineers MUST ALWAYS enforce authenticated node-to-node encryption (WireGuard or IPsec) when configuring Cilium XDP acceleration modes.
- Engineers MUST NOT configure XDP bypass rules (`loadBalancer.mode: "xdp"`) that redirect traffic directly to pod interfaces without cryptographic identity tag verification via Cilium BPF map lookups.
- Code SHOULD enforce Strict mTLS and identity-aware ingress policies within CiliumNetworkPolicy (L3/L4/L7) to ensure packets decrypted at the node level undergo workload-level cryptographic attestation.
- Services MUST enable eBPF host-routing verification (`bpf.masquerade: true`, `bpf.hostRouting: true`) in conjunction with strict ingress cryptographic validation flags.
- Components NEVER permit insecure cleartext fallback when ingress XDP cryptographic header parsing fails or indicates key mismatch.

## Bad vs Good Implementations
### Cilium Helm Configuration for XDP Ingress with Cryptographic Attestation

#### Bad Antipattern (AI Common Hallucination)
> **Why it fails**: Enabling XDP native acceleration with encryption disabled allows unauthenticated packets to bypass the host firewall and kernel network stack, injecting traffic into tenant workloads without verifying cryptographic authenticity.
```typescript
// Flawed CDK8s/Pulumi configuration: XDP acceleration enabled without cryptographic validation
import * as k8s from "@pulumi/kubernetes";

export const ciliumRelease = new k8s.helm.v3.Release("cilium", {
  chart: "cilium",
  repositoryOpts: { repo: "https://helm.cilium.io/" },
  version: "1.15.0",
  values: {
    loadBalancer: {
      mode: "xdp", // Bypasses host network stack directly into workload
      acceleration: "native"
    },
    // CRITICAL FLAW: Encryption is disabled; cleartext packets are redirected
    // at line rate via XDP_REDIRECT without identity verification
    encryption: {
      enabled: false
    },
    ingressController: {
      enabled: true,
      enforceHttps: false
    }
  }
});
```

#### Production Standard (Correct)
> **Standard**: Enforces WireGuard node-to-node encryption and SPIFFE/SPIRE mutual TLS authentication in conjunction with XDP native acceleration, ensuring that packet authentication is verified before workloads receive traffic.
```typescript
// Robust CDK8s/Pulumi configuration: XDP ingress paired with strict cryptographic attestation
import * as k8s from "@pulumi/kubernetes";

export const ciliumRelease = new k8s.helm.v3.Release("cilium", {
  chart: "cilium",
  repositoryOpts: { repo: "https://helm.cilium.io/" },
  version: "1.15.0",
  values: {
    loadBalancer: {
      mode: "xdp",
      acceleration: "native"
    },
    // Enforce WireGuard cryptographic node-to-node tunnel attestation
    encryption: {
      enabled: true,
      type: "wireguard",
      nodeEncryption: true
    },
    // Ensure eBPF host routing enforces identity lookups
    bpf: {
      masquerade: true,
      hostRouting: true
    },
    // Require mutual TLS authentication with SPIFFE identity verification
    authentication: {
      mutual: {
        spire: {
          enabled: true,
          install: {
            server: { dataStorage: { enabled: true } }
          }
        }
      }
    },
    kubeProxyReplacement: "true"
  }
});
```

Architectural Specification & Invariant Rationale

Architectural Invariant Design: Cilium eBPF XDP Ingress Cryptographic Attestation Validation Standard

Cilium eBPF XDP Ingress Cryptographic Attestation Validation Standard defines an industrial-grade behavioral standard for devops engineering. Enforces strict cryptographic attestation (IPsec, WireGuard, or SPIFFE/mTLS token verification) during Cilium eBPF XDP ingress acceleration. Prevents kernel-bypass line-rate packet processing from short-circuiting zero-trust authentication boundaries prior to cluster workload dispatch. 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: Short-Circuiting Cryptographic Verification via Unchecked XDP_REDIRECT Ingress Rules 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 DriftShort-Circuiting Cryptographic Verification via Unchecked XDP_REDIRECT Ingress RulesCritical
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 enforce authenticated node-to-node encryption (WireGuard or IPsec) when configuring Cilium XDP acceleration modes.

Engineers MUST ALWAYS enforce authenticated node-to-node encryption (WireGuard or IPsec) when configuring Cilium XDP acceleration modes.

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 configure XDP bypass rules (`loadBalancer.mode

Engineers MUST NOT configure XDP bypass rules (`loadBalancer.mode: "xdp"`) that redirect traffic directly to pod interfaces without cryptographic identity tag verification via Cilium BPF map lookups.

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

Code SHOULD enforce Strict mTLS and identity-aware ingress policies within CiliumNetworkPolicy (L3/L4/L7) to ensure packets decrypted at the node level undergo workload-level cryptographic attestation.

Code SHOULD enforce Strict mTLS and identity-aware ingress policies within CiliumNetworkPolicy (L3/L4/L7) to ensure packets decrypted at the node level undergo workload-level cryptographic attestation.

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

Services MUST enable eBPF host-routing verification (`bpf.masquerade

Services MUST enable eBPF host-routing verification (`bpf.masquerade: true`, `bpf.hostRouting: true`) in conjunction with strict ingress cryptographic validation flags.

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

Components NEVER permit insecure cleartext fallback when ingress XDP cryptographic header parsing fails or indicates key mismatch.

Components NEVER permit insecure cleartext fallback when ingress XDP cryptographic header parsing fails or indicates key mismatch.

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 eBPF XDP Ingress Cryptographic Attestation Validation Standard critical for AI coding assistants?

Enforces strict cryptographic attestation (IPsec, WireGuard, or SPIFFE/mTLS token verification) during Cilium eBPF XDP ingress acceleration. Prevents kernel-bypass line-rate packet processing from short-circuiting zero-trust authentication boundaries prior to cluster workload dispatch. 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 (Short-Circuiting Cryptographic Verification via Unchecked XDP_REDIRECT Ingress Rules) 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