Skip to content

feat: implement CiliumNetworkPolicies for namespace isolation#28

Merged
CodeBuildder merged 1 commit intomainfrom
feat/issue-8-network-policies
Apr 14, 2026
Merged

feat: implement CiliumNetworkPolicies for namespace isolation#28
CodeBuildder merged 1 commit intomainfrom
feat/issue-8-network-policies

Conversation

@CodeBuildder
Copy link
Copy Markdown
Owner

What this does

Closes #8.

Implements zero-trust network segmentation across all Argus namespaces using CiliumNetworkPolicy. Replaces placeholder files with production policies that enforce default-deny ingress on workload namespaces and grant explicit egress only to the services that need it.

Changes

security/cilium/default-deny-ingress.yaml

Default-deny ingress policies for prod and staging. Any pod in these namespaces will only accept inbound traffic from:

  • Same namespace (intra-namespace pod communication)
  • monitoring namespace (Prometheus scraping)
  • argus-system namespace (agent remediation actions)

Everything else is silently dropped — and visible as dropped flows in the Hubble UI, which gives the agent a network-level signal it can correlate with Falco syscall events.

security/cilium/deny-cross-namespace.yaml

Two egress policies for the control plane namespaces:

allow-argus-agent-egress (argus-system): The AI agent needs to reach prod/staging to execute remediation (cordon, label, network isolate), reach kube-system for cluster API access, reach monitoring for context enrichment, and reach api.anthropic.com for Claude API calls. Both the wildcard and exact FQDN are specified — Cilium resolves these via DNS proxy and programs eBPF maps for matching egress flows.

allow-monitoring-scrape (monitoring): Prometheus needs outbound access to scrape metrics endpoints in prod, staging, and kube-system. Scoped to only those three namespaces — monitoring cannot initiate connections anywhere else.

README.md

Added Cilium Network Policies section to Security status documenting the default-deny model and all explicit allow rules.

Why this matters

This completes the Module 2 security layer. Combined, Falco + Kyverno + CiliumNetworkPolicy give Argus three independent enforcement points: runtime syscall detection, admission-time policy validation, and eBPF-enforced network segmentation. A compromised pod in prod cannot reach argus-system, cannot exfiltrate to arbitrary IPs, and any attempt to do so generates a Hubble dropped flow that feeds directly into the agent's threat reasoning pipeline.

@CodeBuildder CodeBuildder added enhancement New feature or request module-2 Security Layers security Security policies and tools labels Apr 14, 2026
@CodeBuildder CodeBuildder merged commit 0ef4068 into main Apr 14, 2026
1 check passed
@CodeBuildder CodeBuildder deleted the feat/issue-8-network-policies branch April 14, 2026 23:27
CodeBuildder added a commit that referenced this pull request Apr 17, 2026
CodeBuildder added a commit that referenced this pull request Apr 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request module-2 Security Layers security Security policies and tools

Projects

None yet

Development

Successfully merging this pull request may close these issues.

M2: Implement CiliumNetworkPolicies for namespace isolation

1 participant