Task-level block rules do not constrain sandbox egress, so a deny rule is bypassable by Bash in the default mode
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- docker, go
- Ambito
- networking, security
Direzione di ricerca
Start with server/sandbox.go and sandbox/policy.go, then trace how SandboxRunInfo reaches the ARTEX_* container environment and artex-egress-proxy. Read the gate contract in intercept/target_gate_pg_test.go and check how sandbox WebFetch handles URLs and redirects. Done means block rules consistently deny matching sandbox egress, including when a host is also allowed, with the chosen behavior documented in the changelog.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Problem
A task-level block (deny) rule is evaluated in two places: the target gate (intercept/target_gate.go) and asset insertion (db/asset_intercept_match.go). Neither sees the traffic of a sandboxed worker, and the sandbox egress policy does not read block rules at all.
With ARTEX_SANDBOX=required (the default since 0.7.1), Bash runs in artex-worker, whose network is enforced by artex-egress-proxy against sandbox.EgressPolicy. That policy is an allowlist only:
sandbox/policy.go:129—EgressPolicyhasDomainsandCIDRs; there is no deny list field.server/sandbox.go:66-155—taskSandboxRunInfobuilds that list fromtask_scoperows withapproved_by_operator = true, frozen company grants (task_scope_egress), andtask_intercept_ruleswhereaction='allow'. Block rules are never read.
Impact
A task-level deny rule does not stop a worker curl/python/nmap to any host the task already has in scope. Operators reasonably read the rule editor as an enforcement control — the same reading the UI now invites by putting the target gate next to it.
Concretely: task scope approves example.com; an operator adds a block rule for admin.example.com; the planner's worker fetches it with curl and the rule never fires. Only the target gate would stop it, and the gate never sees the socket.
Proposal (needs a design decision, not a quick patch)
- Read
task_intercept_ruleswithaction='block'intaskSandboxRunInfoand propagate them as a deny list throughSandboxRunInfo→EgressPolicy→ARTEX_*container env →artex-egress-proxy, matching the existing "block wins over allow" order documented for the gate. - Decide the semantics for a pattern that is both allowed (scope/company) and blocked (rule): block should win, as it does at the gate.
- Decide whether the deny list also applies to
WebFetchin sandbox mode, which currently enforcesEgressPolicyper URL and redirect hop — it should, for consistency. - Migration/behaviour note: this narrows egress for existing tasks that carry block rules today; that is the intent, but it belongs in the changelog as a security fix.
Related
The gate's own contract is documented in intercept/target_gate_pg_test.go ("Task allow rules play no role in the gate: they neither satisfy it nor restrict it. Block rules, global and of the task, always win."), which is the behaviour the sandbox path should mirror.
- 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
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di BaaRai/ARTEX
-
bug P2
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
BaaRai/ARTEX#981 · 2 commenti · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
bug P2
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
BaaRai/ARTEX#980 · 2 commenti · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
bug P2
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
BaaRai/ARTEX#812 · 2 commenti · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
question
Difficoltà 4/5 1-2 giorni Idoneità per principianti 35/100
BaaRai/ARTEX#983 · 4 commenti · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
bug P2
Difficoltà 3/5 1-2 giorni Idoneità per principianti 20/100
BaaRai/ARTEX#977 · 2 commenti · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di BaaRai/ARTEX
Issue simili
-
area: pipeline priority: low type: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
prime-radiant-inc/evener#8335 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
-
ui: OnTextKey on SearchField never sees keys (it does not reach the inner input)Forse già presa @szluyu99 l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100