Proposal: ARTEX-owned Go/bubblewrap backend for enforced execution scope
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 20/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- docker, go, linux, node.js
- Área
- backend, infrastructure, security
Línea de trabajo
Start with the linked design draft in PR #555, then read the related issues #421, #423, #347, #440, and companion audit issue #553. The issue defines a multi-PR implementation sequence, beginning with an ADR and followed by audit, policy, and runner work; each PR needs its own acceptance checks. Done for this proposal means the design draft is reviewable, with boundaries, policy and event contracts, capability matrix, rollout decisions, and unsupported behavior explicit.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Revised 2026-11-27: select an ARTEX-owned Go/bubblewrap Linux backend; implementation remains planned.
Goal and relationship to existing issues
Implement a concrete execution backend for #421: restrict actual network access by ARTEX-managed tool processes and their children, rather than depending solely on declared tool arguments or the LLM judge.
This builds on #423, #347 and #440; it does not claim current ARTEX lacks all scope or isolation controls. Reviewed upstream 3cb0638 already has the target gate, target pins, executor privilege dropping, and startup isolation checks. Preserve those controls and the existing egress noise governor.
Companion audit issue: https://github.com/BaaRai/ARTEX/issues/553.
This is an implementation proposal and explicit threat model, not a new vulnerability disclosure.
Enforcement boundary: sandbox + deterministic policy + judge
| Action | Required control | Evidence/limit |
|---|---|---|
| Local shell/custom tool/managed MCP and child processes connect to a target | OS containment and policy at the actual outbound dial/request | Independent of whether the model declared the destination |
| ARTEX's in-process Go HTTP transport | The same managed gateway/policy plus transport instrumentation | Wrapping child processes alone does not cover it |
| An allowed A triggers server-side SSRF to B | Parse and validate recognizable secondary destinations, review semantics with judge, obtain scoped operator approval where required | A's outbound connection is outside the local sandbox |
| RCE causes a remote process to discover/access other hosts | Review the action chain, approved remote scope and capabilities; use target-side network controls when available | Arbitrary remote code cannot be fully understood or contained by the local sandbox |
| Remote MCP, VM/container/Android executor | A separately enrolled runner/gateway or explicit unsupported coverage | Do not label it sandboxed merely because the local client is wrapped |
Judge remains necessary for semantic/indirect-action review but is not a deterministic security boundary. A judge “allow” must not override a hard destination denial. When destination or effect cannot be established, strict mode requires operator review/denial instead of assuming scope. A scope expansion requires an authorized policy change with revision, expiry and audit; target content or model output cannot grant it.
An in-scope hostname also does not authorize every operation or eliminate exfiltration through permitted endpoints. Keep tool/action approvals and secret isolation.
Worker execution boundary
The initial design isolates tool execution, not the whole logical worker or ARTEX process. Model calls, scheduling, judge/approval and audit remain in the trusted control plane. Shell/custom commands and managed local MCP process trees run inside a task/run-bound execution session. Native HTTP uses the same policy gateway; file tools must use an isolated executor or an explicitly constrained file service. Inventory every process, network and file entry point: wrapping only Bash must not leave an alternate host-level path.
Prefer independent workspaces and sessions per worker run, with tested credential and filesystem separation. Whether the implementation keeps a persistent runner or launches one per invocation is a benchmark decision; do not claim that an in-process worker/goroutine is automatically sandboxed. Remote executors still need separate enrollment.
Prompt-injection defense after content retrieval
The four-PR first release explicitly includes this layer; it is not postponed with
advanced deception analytics. Reuse ARTEX's code-owned prompt tails, default-on
nonce-framed tool results, planner/compactor untrusted-data rules, MCP warnings and
judge input boundary. Verify coverage for HTTP/header/browser extracts, downloaded
files when read, shell/scanner output, MCP results and derived summaries.
- PR 2 adds trusted source/attempt/artifact provenance and inert, redacted evidence
views. Target-supplied role labels, task IDs and purported approvals are not authority. - PR 3 preserves external-data framing through extraction/truncation/compaction,
handoffs and memory. It requires the boundary for strict managed execution and
rechecks proposed actions against server-owned scope, approvals and budgets.
Summaries cannot convert target text into goals, policy, trusted roles or grants;
a judge's result cannot override hard denials. - PR 4 enforces process/filesystem/egress/resource limits even if a model proposes
an induced action. Link source, proposal, verdict and actual outcome separately.
Synthetic webpage/header, tool/MCP-output and inert-file fixtures cover fake system
messages, forged approvals, delimiter-like text, secret/callback requests and
summary-to-next-turn propagation. Include benign quoted instructions and test both
rendered trust boundaries and independent authorization/containment. Evidence views
must not run scripts or automatically fetch embedded content. Prompt delimiters,
keyword removal and LLM screening alone do not guarantee injection resistance.
The detailed ADR records current source paths and residual risks.
Deception resilience and counter-exploitation (anti-honeypot)
The intended benefits are to limit local damage from hostile target content, preserve trustworthy evidence, and bound wasted effort when a target deliberately misleads the agent. This is not automatic honeypot recognition, anonymity, fingerprint concealment or evasion of target-side logging.
- Contain the executor. Restrict access to host secrets, other task workspaces and unauthorized destinations even when a target induces a tool action. Treat downloaded artifacts as untrusted; execute them only through the existing applicable code/tool approval and isolated runner. Protect the policy and audit services from the executor. Filesystem restrictions must be explicit, and data readable by a tool can still leave through an allowed endpoint.
- Check evidence, not just target claims. Correlate a suspected deceptive response with actual behavior and independently obtained, authorized evidence. Store rule/judge assessments with rationale and uncertainty; do not turn a simulated success banner into a verified finding. Suspicious credentials/honeytokens are not automatically used or checked against external services. Additional verification remains subject to scope, approval and budget; prefer existing evidence first.
- Bound resource consumption. Add run/task wall-clock, request/byte, download/output/workspace, process and CPU/memory budgets, plus control-plane model/tool-step budgets. bubblewrap must not be assumed to provide all quotas: the supervisor/OS limits, gateway and scheduler each enforce their part, including child processes and aggregate concurrent-worker limits. Required but unenforceable limits reject the strict profile.
- Stop and investigate. A hard budget/policy limit stops affected execution and further scheduling; an evidence-based suspicion can pause it for operator review under a documented policy. Preserve the reason, usage, attempt/artifact references and coverage before cleanup where possible. Resume requires authorized review and, where needed, a revised policy/budget; the model cannot auto-escalate. Handle ordinary errors and benign unusual services without declaring them honeypots.
These controls do not guarantee containment of a kernel/runtime vulnerability, prevent prompt injection from reaching the model, control a remote SSRF/RCE second hop, or stop a permitted target recording requests. Additional CPU/memory/disk accounting, review friction and evidence retention add cost; measure false positives, containment/stop latency, budget overshoot and useful-work impact.
The first release uses four PRs total, including design PR #555. PR 2 delivers searchable evidence and budget/decision events; PR 3 enforces gateway scope and network budgets while reusing judge/operator review; PR 4 delivers the complete Linux sandbox, resource stops and regression fixtures. Native Windows/macOS adapters and advanced automated corroboration/pause workflows are explicit follow-ups. Planned controls are not claims of existing protection.
Selected implementation: ARTEX-owned Go/bubblewrap backend
Implement a narrow Go supervisor invoking a supported external bwrap executable.
Do not fork bubblewrap, reimplement kernel isolation, or introduce Node/SRT/Fence
as a dependency of this backend. Existing Node-dependent tools remain separate.
ARTEX owns launch policy, filesystem exposure, task lifecycle, resource domains,
gateway binding and security regression tests. Bubblewrap remains the maintained
OS isolation primitive, with package/artifact and capability versions qualified
by the implementation PRs. Its official security model
explicitly leaves the security policy to the caller.
This choice fits ARTEX's single gateway, task/run provenance and strict failure
semantics. Higher-level runtimes can reduce compatibility work but do not remove
these integration responsibilities. The tradeoff is ARTEX ownership of the Linux
support matrix, profiles, lifecycle and regression tests; a smaller Go wrapper is
not inherently a stronger security boundary. SRT/Fence remain references or future
adapter candidates, not implementation requirements.
The PR #555 review
raised the proposed Node research-preview dependency. This revised Linux plan
removes that dependency, while retaining a backend acceptance gate: reproducible
installation, trusted executable/helper paths, bwrap/kernel/distro/container
capability tests, license/SBOM review, measured overhead, diagnostic behavior and
maintenance/update/rollback ownership before merge. No task-time downloads.
Upstream distribution and migration
Preserve Linux amd64/arm64, macOS amd64/arm64 and Windows amd64 release builds and
both Linux container architectures. Keep portable Runner/policy/audit contracts
independent of Linux-only imports and optional backend installation. Existing
startup safety checks and privilege dropping remain in force; an enabled strict
profile cannot fall back to degraded or unsandboxed execution.
At focused main baseline e5c7bfc,
Docker already installs Node while Go ZIPs do not bundle it. Neither makes Node a
requirement of this selected backend. Keep existing tools' requirements intact.
PR 4 includes installation/preflight, Linux packaging and qualification together
with the backend; there is no separate packaging PR. Retain container no-new-privileges,
execution identity and credential separation without requiring blanket privilege.
Reuse agent/budget.go, server/engine_budget.go, the existing task clock and
startup/isolation status. Add network/OS dimensions rather than a competing ledger.
Record supported host/guest/capability versions, reject missing required mechanisms,
and retain audit data through upgrade/rollback. The target is upstream deployment
support, not the configuration of any single machine.
Cross-platform support and ecosystem evaluation
The release baseline includes macOS amd64/arm64 as well as Linux and Windows. Preserve those builds and existing behavior; advertise macOS sandbox capabilities only after actual platform acceptance, not merely because SRT offers a Seatbelt backend.
Preserve ARTEX's Linux/Windows builds and keep policy/audit contracts separate from OS-specific runner adapters. SRT is cross-platform, but its v0.0.83 Windows support is alpha. The published npm archive includes x64/ARM64 Windows helpers; packaging is not evidence that strict containment holds. Its documented native Windows network residuals mean a successful initialization cannot by itself qualify arbitrary untrusted tool code for strict mode. The experimental MXC integration is a separate capability profile.
Distinguish native Windows execution, a Linux guest on Windows (VM/WSL2), and a Windows controller dispatching to an authenticated Linux runner. A Linux guest does not support native Windows tools merely because its host is Windows. Missing guarantees must reject the strict task, not trigger an unsandboxed fallback. Keep unrelated management/audit operations independent of optional runners without weakening existing startup security checks.
The design evaluation compares SRT; Microsoft MXC with OS-specific backends and JSON executors; gVisor and runc; Go/bubblewrap wrappers; nono; OpenShell; microsandbox; VM and orchestration/service alternatives. Go-based, a Go SDK, a cross-platform client and a cross-platform local execution boundary are different claims. Use the ARTEX-owned Go/bwrap adapter for the first Linux implementation; evaluate native Windows and stronger-isolation profiles separately. No candidate has been runtime-qualified by this documentation work.
Require native Windows acceptance tests as well as cross-builds: PowerShell/cmd/native tools, quoting/Unicode paths, ACL/reparse points, cancellation of descendants, credentials, task separation, network/TLS, revocation, quotas and unavailable backends. Declare host/guest OS, architecture, backend version and effective capabilities in both UI and audit records. Do not count mocked or cross-compiled tests as Windows containment validation.
Proposed integration
Use one authoritative ARTEX egress gateway for policy, pacing, audit and optional
TLS capture. The Go/bwrap supervisor restricts tools and descendants to a separate
network namespace with a task-private authenticated bridge to that gateway. Both
allowed and denied target traffic use the same policy authority. A bridge is a
narrow transport, not a second allowlist or a route to arbitrary host services.
- Build structured executable/argv, cwd, environment and mount specifications;
do not concatenate shell commands in the adapter or trust workspace-owned policy.
Shell tools explicitly request a managed shell. - Use controlled read-only tool paths, separate workspaces/temp/output storage,
minimal environment and deliberate inherited descriptors. Protect controller
secrets, sibling tasks and host IPC; read-only mounts can still disclose data.
Test symlink/path races and cross-task access. - Required namespace creation must succeed. Missing bwrap, blocked user/network
namespaces or unsupported required capabilities reject strict execution; proxy
variables alone are not containment and host networking is not a fallback. - Establish required resource domains before the first untrusted instruction.
Demonstrate cgroup/delegation or equivalent host support, aggregate descendant
limits and separate output/workspace controls. Unsupported required quotas fail
admission; bubblewrap is not the resource manager. - Own process trees, helper/bridge connections and existing proxy tunnels through
cancellation, policy revocation, crashes and supervisor restart. Closing only a
listener or killing only the immediate child is insufficient. - Bind each session to server-owned policy/identity outside agent-supplied headers.
Keep control-plane traffic separate and infrastructure grants narrow. Native Go
HTTP/file paths and remote/shared MCP must have explicit managed coverage. - Required metadata audit operates even with body capture off. Opaque protocols
report only observable host/IP/port data; full URL/path claims need qualified
plaintext/TLS visibility. Unsupported strict profiles reject execution.
The design PR's backend plan specifies the launch, gateway, lifecycle and platform
acceptance contracts. Initial network support targets HTTP(S) and supported
proxied TCP tools; raw/UDP/ICMP/QUIC, browsers and nested containers need explicit
profiles rather than automatic privilege expansion.
Policy semantics to agree before implementation
- Explicit deny wins. In enforce mode an absent/empty target allowlist permits no target access. Existing deployments migrate explicitly through observe/enforce modes; observe is not advertised as enforcement.
- Treat domain patterns, IP/CIDR, ports, protocols and optional HTTP method/path constraints as typed rules. Separate hostname authorization from resolved-address constraints; do not silently reinterpret current URL substring rules.
- Check the actual destination address at the final dial, including IPv4/IPv6 and new DNS answers. Preserve pin/version semantics. With an upstream proxy, require equivalent enforcement there or refuse policies that need IP guarantees.
- Recheck each HTTP request/redirect hop and each new connection. Account for pooled connections, long-lived tunnels and revocation: stop affected work/connections when policy is revoked, with bounded and observable propagation.
- URL/path policy needs visible plaintext or explicitly selected TLS interception. Pinned TLS/mTLS and opaque tunnels cannot promise path enforcement. Record raw and canonical targets; do not silently normalize or rewrite security-test requests.
- Prompt/approval hooks may request a change, never self-expand the enforced policy. Backend capability/configuration mappings are version-tested, not assumed equivalent to ARTEX semantics.
Costs, compatibility and non-goals
- Maintaining the Go adapter, Linux namespaces/bubblewrap, resource delegation, container nesting and host restrictions add deployment/upgrade work. Start with a declared Linux support matrix and capability self-test; do not solve incompatibility by requesting blanket privileged containers or silently disabling containment.
- DNS/HTTP proxy semantics, TLS CA trust, signed requests, nonstandard HTTP, WebSockets/SSE, scanners and upstream proxies need regression fixtures. Raw UDP/ICMP/SYN scanners and device/remote workloads may need a separately designed runner profile; a normal TCP proxy is not enough.
- Full bodies and TLS inspection increase storage/CPU and may expose secrets. Use lightweight audit metadata separately, opt-in payload retention and explicit redaction/access controls.
- Measure startup overhead, throughput, p95 latency, resource usage, attribution under concurrency and proxy failure behavior. Preserve current rewrite history, archives, HAR and noise-governor semantics.
- The local sandbox does not enforce a remote target's own network, make arbitrary RCE payloads safe, prove that a backend processed a request, or replace the judge/operator workflow.
Four-PR delivery plan
Four PRs total, including existing design PR #555; only three subsequent
implementation PRs. Each is a usable feature boundary, with tests, packaging,
diagnostics and rollback included rather than split into separate phases.
| PR | Deliverable | Dependencies | Exit criterion |
|---|---|---|---|
| 1 | Existing design PR #555: scope, policy/audit/Runner contracts and support boundaries | — | Agree the bounded first release; documentation only, no new runtime dependency or default |
| 2 | Searchable access audit end to end: trusted access/content provenance, existing producers, URL/time API and minimal inert evidence UI | 1 | Trace a synthetic URL to its task/tool and outcome with body capture off; truthful gaps, redaction, restart/spool-full, retention/archive references and query limits |
| 3 | Authoritative gateway and action authorization: scope, network budgets, existing judge/approval and untrusted-content boundaries | 1, 2 | Final-dial/DNS/redirect/revocation and deny precedence; trusted sessions and secondary-target checks; remote-content framing/summary propagation and independent action-authorization regressions; coverage limited to enrolled paths |
| 4 | Complete opt-in Go/bwrap Linux backend: process/filesystem isolation, private gateway bridge, resource enforcement, packaging and qualification | 2, 3 | No direct-egress bypass; pre-exec descendant/task limits; complete process/tunnel cleanup; supported amd64/arm64 host/container tests, install/absence diagnostics, basic overhead/security fixtures and rollback; unsupported profiles fail closed |
First-release scope and explicit follow-ups
The first release is a usable Linux audit-and-enforcement path, not the entire
sandbox ecosystem roadmap. PR 2 provides immediate investigation value on existing
managed producers, without waiting for bwrap. PR 3 enforces enrolled transports;
it must not claim confinement of arbitrary host processes before PR 4. PR 4 is
enabled opt-in only after its combined isolation, gateway, cleanup, resource and
platform acceptance passes.
Keep all five controller release builds and preserve existing security startup
checks. Native Windows/macOS sandbox implementations and new managed Linux-guest/
remote-executor deployments are follow-ups, not hidden subprojects in PR 4. Until
qualified, those strict local profiles report unsupported; no host fallback.
Raw/UDP/ICMP/QUIC, general browser/nested-container compatibility and stronger
VM/gVisor profiles are also outside the initial declared tool matrix.
First-release deception resilience consists of containment, trusted evidence links,
budget stops and reuse of existing judge/operator approvals. Known secondary
destinations receive deterministic scope checks; uncertain indirect actions still
require existing review/denial, and hard denies cannot be overridden. New automated
deception classifiers, generalized evidence-corroboration engines, rich investigation
workflows and suspicion-triggered pause/resume automation are follow-ups. No
honeypot-detection, anonymity or remote-second-hop containment claim is introduced.
Remote-content prompt-injection defense is explicitly in the first release:
trusted provenance in PR 2, existing input-boundary/action-authorization integration
in PR 3, and hard execution containment in PR 4. It is distinct from deferred
automatic deception classification. See the ADR for ingestion, summary/memory and
synthetic-fixture requirements.
Tests, deployment diagnostics, dependency provenance/SBOM updates, basic overhead
measurements and rollback belong to the PR that introduces the behavior. There is
no separate packaging or benchmark PR. Advanced cross-platform/fleet benchmarks
and richer analytics can follow; required security tests cannot be deferred.
Review PR 4 through commits/checklists for supervisor/filesystem, protected bridge,
then resource/platform qualification. Do not expose a partially completed strict
profile. Shared/remote MCP remains unmanaged unless execution ownership and
attribution are actually enrolled. Reuse the existing capture proxy where suitable;
metadata audit does not depend on TLS decryption or SRT features.
Roll out opt-in on a controlled task set, then evaluate changing defaults separately. Enforce mode fails closed on runtime/policy/gateway failure. Rollback stops managed tasks and reverts compatible components; it must not resume them unsandboxed or remove the audit history.
Minimum integration test matrix
Use synthetic local targets and authoritative test DNS, not live third-party targets: allowed/denied domain and port; IP/CIDR and IPv6; DNS changes; redirect to denied destination; hostname/IP disagreement; untrusted proxy metadata; two concurrent tasks; child processes; ignored/removed proxy environment; native HTTP; approved upstream proxy; TLS pinning/mTLS; opaque SOCKS; unavailable namespaces; gateway crash; full audit spool; cancellation; policy revocation; and a mock A→B server-side request demonstrating that local containment does not observe/control the second hop.
Also exercise pre-exec resource-domain entry, descendant/task-wide limits, path races, unintended file descriptors, helper failure, supervisor restart, and cancellation/revocation of established tunnels. A promised enforcement property failing must fail its test; unsupported environments are diagnosed separately. No operational exploit payloads are needed to test the trust boundary.
Add controlled deception fixtures: target text requesting a fake host-secret read or out-of-scope callback; a false success claim; inert downloaded content; bounded crawl/redirect/output/resource traps; two workers attempting cross-workspace access; and a benign unusual response. Assert protection at each file/network/process entry point, bounded task-wide resource use, auditable stop/review/resume, unchanged hard-deny precedence and no automatic honeypot classification. Never use real secrets, real exploits or third-party targets for these fixtures.
Design PR (PR 1; no runtime changes): https://github.com/BaaRai/ARTEX/pull/555
- Lenguaje dominante
- Go
- Estrellas
- 18.7k
- Forks
- 7k
- Merge medio
- 10 h 41 min
- PR fusionados (30 d)
- 342
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de BaaRai/ARTEX
-
Task retarget keeps the old host in task scope and adds the new host in a form that matches nothingPosiblemente ocupada @chaitanya0305 la tomó hoy. Abiertobug P2
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
BaaRai/ARTEX#652 · 1 comentario · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
A finding reported with severity "High" is stored as-is, so it is missing from severity counts and min_severity channels drop itPosiblemente ocupada @chaitanya0305 la tomó hoy. Abiertobug P2
Dificultad 3/5 1-2 días Aptitud para principiantes 22/100
BaaRai/ARTEX#650 · 1 comentario · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
feature
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
BaaRai/ARTEX#648 · 1 comentario · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
Stateful guard misreads curl flags: `curl -f` GET is refused, `--json` / `-d@file` / `-T` POSTs skip the leasePosiblemente ocupada @chaitanya0305 la tomó hoy. Abiertobug P1
Dificultad 2/5 1-3 horas Aptitud para principiantes 30/100
BaaRai/ARTEX#644 · 1 comentario · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
question
Dificultad 4/5 1-2 días Aptitud para principiantes 20/100
BaaRai/ARTEX#620 · 1 comentario · 1 reacción ·
Los mantenedores suelen responder en 1 día
Todos los issues de BaaRai/ARTEX
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
compiler-explorer/compiler-explorer#9710 ·
Los mantenedores suelen responder en 1 día
-
Add govulncheck workflowAbiertoenhancement good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
losisin/helm-values-schema-json#437 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
kubernetes-sigs/controller-runtime#3704 ·
Los mantenedores suelen responder en 1 día