Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions k8s/local/network-policies.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
# Agent phase: allow only DNS + outbound port 443.
# Agent phase: allow only cluster DNS + outbound port 443.
# All HTTPS traffic from the main container is transparently intercepted by the
# iptables REDIRECT rule and forwarded to the proxy SNI router on port 15443.
# The proxy sidecar (UID 1337, exempt from REDIRECT) reaches the internet directly.
Expand All @@ -16,8 +16,15 @@ spec:
policyTypes:
- Egress
egress:
# DNS resolution
- ports:
# DNS resolution — cluster DNS only (kube-dns / CoreDNS in kube-system).
# Without a `to:` selector port 53 is open to the entire internet, which
# would let agent code exfiltrate data or tunnel arbitrary traffic (e.g.
# LLM calls to non-whitelisted providers) over DNS queries.
- to:
- namespaceSelector:
matchLabels:
kubernetes.io/metadata.name: kube-system
ports:
- port: 53
protocol: UDP
- port: 53
Expand Down