We need Kubernetes: run ARTEX and its sandbox natively on clusters

Aperta
#781 4 commenti 2 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
docker, github-actions, go, helm, kubernetes

Direzione di ricerca

Start with the linked delivery issues #780, #783, #791, and #792; each defines a separate piece of Kubernetes support and lists its dependency. Begin with #780 for the runner backend, then follow the dependencies to the Helm chart, sandbox view and scaling, and restricted panel egress. Done means the Kubernetes support described here is delivered and proven on k3d and a real multi-node cluster; the issue does not name source files or tests.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Why ARTEX needs Kubernetes

ARTEX runs autonomous agents that execute real tools against real targets. Every task gets its own sandbox: a worker, an egress proxy and an allowlist built from operator-approved scope. Today that model is tied to one Docker host.

That limits where ARTEX can go:

  • Scale. One host caps how many engagements can run at once. A team running continuous testing across many targets needs sandboxes that spread over a cluster, start on demand and disappear when idle.
  • Where teams already run software. Security teams and MSSPs deploy on EKS, GKE, AKS, OpenShift and on-prem clusters. They need a chart, not a compose file on a VM.
  • Security posture. On a cluster the Docker backend means mounting the node's container runtime socket into a pod, which gives that pod root on the node. A pentest platform should not need that. Kubernetes already has the primitives ARTEX's sandbox model needs: pods with locked-down security contexts, NetworkPolicy, RBAC scoped to a namespace, and RuntimeClass for gVisor or Kata.
  • Operations. Rolling upgrades, health probes, persistent volumes, resource quotas and cluster-autoscaler come with the platform instead of being rebuilt around one host.
  • People are asking. #620 shows users trying to deploy ARTEX on Kubernetes and getting stuck on the security context.

What Kubernetes support should mean

Kubernetes is a first-class target, not a port of the compose file:

  1. Native sandbox. Each task runs in its own worker pod behind its own egress-proxy pod, created through the Kubernetes API. No runtime socket anywhere. Per-task NetworkPolicies enforce the same boundary as the Docker backend: the worker reaches only its proxy, and the proxy reaches only approved scope.
  2. One-command install. A Helm chart with hardened defaults: default-deny networking, generated secrets, namespace-scoped RBAC, and a panel security context that passes the isolation self-test.
  3. Elastic capacity. Idle sandboxes scale to zero and come back on the next command with their workspace intact. A cap bounds active sandboxes. On clusters with cluster-autoscaler, nodes follow demand.
  4. Visibility. Operators see what is running: every task's worker and proxy, their health, scaling state, and every allowed and denied connection.
  5. No unrestricted fallback. Even with the sandbox turned off, the panel's egress stays limited to approved scope.
  6. Proven on real clusters. Every piece is tested live: k3d in CI, plus cluster-autoscaler on a real multi-node cluster.

What it looks like

The Sandbox page under System shows every task sandbox live: the runner, each task's worker and egress proxy, the scaling state, and every allowed and refused connection. The screenshots use example data.

Topology. Every task's worker reaches the network only through its own proxy. Refused traffic goes to Blocked, and idle sandboxes are shown scaled to zero.

Sandbox topology, dark

Operator view. One row per task with health, idle countdown, pods and egress counts. Below it, egress is grouped by destination and can be filtered by outcome, task and text.

Sandbox list, light

Expanded task row

Expanded task row

Scaling. The capacity in use against the cap, cold-start p50/p95, per-task idle countdowns, and the scale history, which is kept across runner restarts.

Scaling

Node details, mobile, Docker backend, runner down

Node details drawer

Mobile, dark

Docker backend, topology

Docker backend, list

Runner unreachable

Delivery

The work is split into focused PRs. Each one says what it depends on.

  • #780 Kubernetes backend for artex-runner: per-task worker and egress-proxy pods, per-task NetworkPolicies, exec through the Kubernetes API.
  • #783 Helm chart with default-deny NetworkPolicies and generated secrets, a k3d e2e script and a CI job. Answers #620. Depends on #780.
  • #791 Sandbox view and autoscaling: runner status API; a Sandbox page under System with a topology graph and task and egress tables; idle scale-to-zero; a cap on active sandboxes; scaling history kept across restarts; placement settings for cluster-autoscaler; a cluster-autoscaler e2e script. Depends on #783.
  • #792 Scope-restricted panel egress for sandbox.mode=off. Depends on #783.

Related fix: #775.

Later

  • More than one panel or runner replica. This needs the runner's task state out of memory.
  • RuntimeClass presets (gVisor, Kata) tested in CI.
  • Operator-facing quotas per company or engagement.
Lingua principale
Go
Stelle
18.7k
Fork
7k
Merge medio
10h 57m
PR unite (30g)
494

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di BaaRai/ARTEX

Tutte le issue di BaaRai/ARTEX

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.