worktools / worktools/hoya

[P0] 统一 JS/WASM 默认禁网与受控出站策略

Open
#8 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

priority:P0 type:feature
Dominant language
Rust
Stars
0
Forks
0
Avg merge
25m
Merged PRs (30d)
3

Description

用户问题与代码依据

JS fetch 仅做少量主机名黑名单且完整读取响应后检查大小;WASM fetch 未见同等目标校验;legacy /execute 直接 reqwest::get 下载代码。

评估基线:2026-09-06,Hosta 666eca9 / Hoya 2234baa。此项记录待实现目标,不表示已完成。

验收标准

  • 执行请求默认没有网络能力,JS/WASM 共同使用显式授权策略;legacy 远程代码下载默认关闭。
  • 校验协议、端口、DNS 解析后的地址及每次重定向,覆盖私网、loopback、link-local、IPv6 和 DNS 重绑定;连接必须使用已校验目标。
  • 流式读取时限制响应字节数、重定向次数及总超时,不先无限读入内存;代理行为显式配置。
  • 使用本地受控 fixture 测试允许/拒绝、重定向到内网、超大/慢响应和 JS/WASM 一致性,不访问真实内网服务。

归属与范围

归属:worktools/hoya。阶段:A0 · 双运行时执行基线。维护者已确认:CLI/API 优先,前期全命令行验收,UI 先只读展示,网页交互后续评估。沿用独立 Hoya 引擎与 Hosta 控制面边界;本项不扩展到多租户、计费、DAG 或全球调度。

依赖

下游验收

实施进展(2026-09-06)

PR #13 的 v1 默认完全不提供网络,非空 network capabilities 显式拒绝;engine 模式不暴露 legacy URL 下载入口。JS fetch 和 WASM env.fetch 不可用并有测试。受控放行、DNS/IP/重定向绑定与流式响应限制尚未实现,不能把默认拒绝视作完整 egress 策略。

PR 跟进(2026-09-06 02:37 CST)

Hoya #13 已合并,PR 的 Rust Test、Docker 构建及合并后的 main Test 均通过;#12 也已合并。Hosta #14 当前 CI 全通过、无合并冲突,已有审查讨论均已解决。此项剩余验收仍按上面的范围继续跟踪,不因首个切片合并而提前关闭。

Contributor guide

No contributing guide indexed for this repository

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.

Research direction

Start by reading the existing JS fetch, WASM env.fetch, and legacy /execute paths, along with the tests from merged PR #13. Compare the current default-deny behavior with the remaining acceptance criteria for controlled egress, validated redirects and addresses, streaming limits, and local fixtures. Done means the listed JS/WASM and legacy-download cases are covered without contacting real internal services.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, rust, wasm
Domain
backend, networking, security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.