host-fetch-grant
为受限沙箱提供可控的 host 代取,强调 SSRF/injection gate。
需要 host 侧执行网络请求,若授权或校验不足可能被滥用或导致外部请求风险。
主机端读取 box 写入的 fetch 请求并用 SSRF-safe 核心执行代理请求并返回结果。
宿主机端读取箱内写的抓取请求,先把目标 URL 给人工核验,然后用 SSRF-safe 的 fetch 核心以 GET/HEAD 执行代理抓取。抓取时会屏蔽私网/回环/链路本地等不安全目标,禁止重定向和凭证,响应体被写成独立的 artifact 并只返回元数据。它是 host 侧的人为放行与安全执行环节,确保代理抓取可控且不会把攻击者控制的内容暴露给宿主模型。
▸ 展开 SKILL.md 英文原文
On the host side, grant (execute) a box's web-fetch request written by a box-internal `/host-fetch` to `.claude/host-bridge/fetch-req-<box>-<topic>-<seq>.md`. Extracts the target URL/method WITHOUT reading the raw box request into context (2-stage grep count-gates, like /box-session-resume-grant), displays the URL for the human to eyeball, runs the SSRF-safe fetch core `scripts/internal/host-fetch.js` (which blocks private/loopback/link-local/ULA/IPv4-mapped targets, forbids redirects/credentials, GET/HEAD only, TLS-verified). The fetched body is never inlined — the core writes it to an artifact file (O_EXCL, no symlink follow) and returns only metadata, so the host model never reads attacker-controlled content; the grant writes those metadata to `fetch-ans-...md` and touches a done sentinel so the box auto-picks it up and reads the artifact over the bind mount. The host-side, user-triggered SSRF/injection gate for box→host fetch delegation — the human running this is the gate. Counter
帮我安装这个 skill:https://raw.githubusercontent.com/kanka-jp/coding-agent-playbook-20260707/main/.claude/skills/host-fetch-grant/SKILL.mdcurl -fsSL "https://raw.githubusercontent.com/kanka-jp/coding-agent-playbook-20260707/main/.claude/skills/host-fetch-grant/SKILL.md"# host-fetch-grant box 内 `/host-fetch` が `.claude/host-bridge/fetch-req-<box>-<topic>-<seq>.md` に書いた fetch 依頼を host で読み、**SSRF-safe core (`scripts/internal/host-fetch.js`) で取得**して ans を返す skill。box→host fetch 委譲の**host 側・user-trigger の SSRF/injection gate**で、これを人間が叩くこと自体が gate。 `/host-fetch` の counterpart。`/host-answer`(調査を返す) の action 版で、read-only 調査でなく「host の直結 network で 1 URL を取得して返す」state-less action。 ## なぜ user-trigger の gate か (信頼境界) box は untrusted (公開 issue / web 取得物を context に取り込む injection 経路)。box が指定した URL を host が踏む = **SSRF** (box は host からしか見えない `169.254.169.254` metadata / `localhost` の admin / LAN host を host に踏ませられる)。従って: 1. **host 側は auto-pickup しない** — user が `/host-f