Task-level block rules do not constrain sandbox egress, so a deny rule is bypassable by Bash in the default mode
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- docker, go
- 領域
- networking, security
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- Go
- スター
- 18.7k
- フォーク
- 7k
- 平均マージ
- 10時間 57分
- マージ済み PR(30日)
- 494
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
BaaRai/ARTEX のほかの issue
-
bug P2
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
BaaRai/ARTEX#981 · コメント 2 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug P2
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
BaaRai/ARTEX#980 · コメント 2 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug P2
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
BaaRai/ARTEX#812 · コメント 2 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
question
難易度 4/5 1〜2日 初心者へのやさしさ 35/100
BaaRai/ARTEX#983 · コメント 4 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug P2
難易度 3/5 1〜2日 初心者へのやさしさ 20/100
BaaRai/ARTEX#977 · コメント 2 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
似ている issue
-
BUG: Backend Docker build fails due to Go version mismatch対応中かも @Aakriti0207 が今日担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 93/100
gittuf/visualizer#203 ·
メンテナーはふだん 2 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 3 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
agent:ready
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
turbot/flowpipe#1162 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信