ebpf-sandbox-enforcer
Skill2 starsChanged 29 days agoApache-2.0View on GitHub
Enforces zero-trust rootless micro-VM and eBPF kernel security boundaries for speculative agent tool executions and container sandboxes.
- Reads credentials
- Deletes or force-pushes
In this repository108 other files it gives its agents.
- AGENTS.mdAGENTS.md
- everything-gemini-maintainerSkill
- adversarial-fuzz-generatorSkill
- agent-evalsSkill
- ai-first-engineeringSkill
- alloydb-omni-vectorSkill
- apache-kafka-streamsSkill
- api-craftsmanSkill
- architecture-designerSkill
- argon-3d-game-engineSkill
- argon-3d-scene-architectSkill
- argon-procedural-asset-generatorSkill
- argon-visual-critique-loopSkill
- argo-workflowsSkill
- autonomous-incident-healerSkill
- axum-web-serviceSkill
- bigquery-vector-searchSkill
- browser-qa-testerSkill
- chromadb-vector-storeSkill
- cilium-ebpf-networkingSkill
- clickhouse-analyticsSkill
- cloud-deploy-canarySkill
- cloudflare-r2-object-storageSkill
- cloudflare-workersSkill
- cloud-run-agentsSkill
- context-cachingSkill
- context-distillation-compressorSkill
- context-warmerSkill
- continuous-learningSkill
- cost-oracle-finopsSkill
- cross-repo-swarm-syncSkill
- cve-remediation-orchestratorSkill
- database-architectSkill
- dataproc-spark-analyticsSkill
- dbt-transformationSkill
- debezium-cdcSkill
- devops-pipelineSkill
- distributed-rate-limitingSkill
- docker-compose-orchestratorSkill
- duckdb-local-olapSkill
- dynamic-thinking-allocationSkill
- ebpf-microvm-sandboxSkill
- elephant-goldfish-modelSkill
- envoy-ai-gatewaySkill
- ephemeral-swarm-orchestratorSkill
- fastapi-productionSkill
- fullstack-nextjsSkill
- game-audio-synthesizerSkill
- game-studioSkill
- gemini-function-callingSkill
- gemini-groundingSkill
- gemini-live-audio-transcriberSkill
- gemini-live-multimodalSkill
- gemini-live-screen-visionSkill
- gemini-multimodalSkill
- genetic-prompt-cross-pollinatorSkill
- git-craftsmanSkill
- github-opsSkill
- google-axSkill
- google-flow-orchestratorSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 99
Rootless Execution: Never execute autonomous agent commands as root (UID 0).
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
eBPF Sandbox Enforcer & Zero-Trust Tool Isolation
Implements kernel-level zero-trust security isolation, rootless micro-VM sandboxing, Landlock filesystem restriction, and Cilium eBPF network filtering for speculative agent tool executions within Google Antigravity and Everything Gemini workflows.
1. Architecture: Kernel-Level Agent Sandboxing
┌─────────────────────────────────────────────────────────────────────────────┐
│ KERNEL-LEVEL AGENT SECURITY BOUNDARY │
│ │
│ ┌─────────────────────────────────────────────────────────────────────┐ │
│ │ Speculative Agent Tool Execution (`run_command`, `write_to_file`) │ │
│ └──────────────────────────────────┬──────────────────────────────────┘ │
│ │ │
│ ▼ │
│ ┌─────────────────────────────────────────────────────────────────────┐ │
│ │ 1. User-Space Policy Interceptor (`gemini-shield` & OPA Rego) │ │
│ │ • Validates command AST, blocks `rm -rf`, detects token leakages │ │
│ └──────────────────────────────────┬──────────────────────────────────┘ │
│ │ │
│ ▼ │
│ ┌─────────────────────────────────────────────────────────────────────┐ │
│ │ 2. Linux Landlock & Seccomp-BPF Syscall Filter │ │
│ │ • Traps unauthorized `execve`, `ptrace`, `setuid`, and `chroot` │ │
│ │ • Restricts filesystem I/O strictly to isolated `./scratch/` dir │ │
│ └──────────────────────────────────┬──────────────────────────────────┘ │
│ │ │
│ ▼ │
│ ┌─────────────────────────────────────────────────────────────────────┐ │
│ │ 3. Cilium eBPF Socket Filter (L3/L4/L7 Network Egress) │ │
│ │ • Blocks outbound internet access to non-whitelisted IPs │ │
│ │ • Allows Google Cloud APIs (`*.googleapis.com`) on TLS 443 │ │
│ │ • Drops all lateral movement probes to internal Kubernetes pods │ │
│ └─────────────────────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────────────────────┘2. Kernel Enforcement Mechanisms
A. Landlock Filesystem Sandboxing
Speculative agent mutations are restricted to the local workspace directory or an ephemeral scratch area. System directories (/etc, /usr, /root, ~/.ssh) are marked strictly LANDLOCK_ACCESS_FS_READ or completely denied:
// Example Landlock ruleset structure for agent tool sandbox
#include <linux/landlock.h>
#include <sys/prctl.h>
int enforce_agent_landlock(const char *allowed_dir) {
int ruleset_fd = landlock_create_ruleset(&ruleset_attr, sizeof(ruleset_attr), 0);
// Add rule: allowed_dir gets read/write/truncate/execute
// System directories remain read-only or inaccessible
prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0);
landlock_restrict_self(ruleset_fd, 0);
return 0;
}B. Cilium eBPF Network Security Policy (CNP)
Prevents data exfiltration or reverse shells when the agent runs third-party build scripts or untrusted dependencies:
apiVersion: "cilium.io/v2"
kind: CiliumNetworkPolicy
metadata:
name: "agent-tool-sandbox-egress"
spec:
endpointSelector:
matchLabels:
role: "autonomous-agent-worker"
egress:
- toFQDNs:
- matchPattern: "*.googleapis.com"
- matchName: "github.com"
toPorts:
- ports:
- port: "443"
protocol: TCP
- toEntities:
- cluster
toPorts:
- ports:
- port: "53"
protocol: UDP3. Best Practices & Isolation Checklist
- Rootless Execution: Never execute autonomous agent commands as
root(UID 0). Always run inside an unprivileged user namespace (UID 10001). - Ephemeral Disks: Speculative test runs must target tmpfs or overlayfs volumes that can be unmounted and discarded in $<100\text{ms}$.
- Audit Telemetry: Feed eBPF syscall audit logs (
bpftool prog tracelog) into the Mission Control UI to detect anomalous fork storms or socket scans.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

