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

Open
#781 4 comments 2 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
docker, github-actions, go, helm, kubernetes

Research direction

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.

Written by the indexing model from the issue text.

Description

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.
Dominant language
Go
Stars
18.7k
Forks
7k
Avg merge
10h 57m
Merged PRs (30d)
494

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from BaaRai/ARTEX

All issues in BaaRai/ARTEX

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.