We're deploying OpenClaw agents in our research cluster and I wanted to lock down their outbound traffic. I'm new to this, so I tried writing it as policy-as-code using Cuelang to make it readable and enforceable.
I defined a schema for allowed egress destinations. The idea is to only permit the agent to talk to our internal model registry and a specific logging endpoint. Everything else is denied by default. Does this approach make sense for basic isolation, or am I missing common exceptions an agent might need?
```
// core.cue
package agent
#EgressSpec: {
// Default deny
default_allow: false
allowed_targets: [...{
host: string
port: int
proto: "tcp" | "udp"
reason: string
}]
}
spec: #EgressSpec & {
allowed_targets: [
{
host: "registry.internal.corp"
port: 443
proto: "tcp"
reason: "Model artifact fetching"
},
{
host: "logs.corp:9200"
port: 9200
proto: "tcp"
reason: "Structured event export"
},
]
}
```