mirror of
https://github.com/fabro-sh/fabro.git
synced 2026-09-05 08:10:39 +00:00
The worker subprocess is spawned with env_clear+allowlist by the server, so the only sensitive value in its env is FABRO_WORKER_TOKEN itself. Read the token and remove_var it from the process env in main() before Tokio starts worker threads, then thread it explicitly through runner::execute(&str). Every descendant (hooks, local sandbox, devcontainer initializeCommand, MCP stdio, etc.) now inherits a worker env with no bearer in it, so an unscrubbed spawn site cannot leak the token. This makes the prior denylist scrub in fabro-hooks and fabro-sandbox redundant — delete it and the shared WORKER_SECRET_ENV_DENYLIST constant. The sandbox keeps its _api_key/_secret/ _token/_password/_credential suffix heuristic for user-supplied env_vars hygiene. Extend the server-dispatched-worker env-leak integration test to also assert a Bash stage running in the worker does not observe FABRO_WORKER_TOKEN. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| src | ||
| tests/it | ||
| build.rs | ||
| Cargo.toml | ||