Give swarm external voices file-read + web research (0.6.0)#46
Open
gering wants to merge 2 commits into
Open
Conversation
Externals (codex, grok) were tool-less/inline-only — blind to out-of-diff bugs (callers, config, types, CVE/library knowledge). Grant file-read + web without re-opening the secret-exfil hole: - codex: `-s read-only -C <repo> -c tools.web_search=true` (web is model-native, works under read-only — no sandbox loosen). - grok: strict `--tools read_file,list_dir,grep,web_search,web_fetch` allowlist + `--cwd <repo>`; drop `--tools ""` / `--disable-web-search`. No write/shell tools for either voice. - Keep + extend the OS secret-jail: repo-root `.env*`/`data/`/key files join the HOME denylist (root-level only — nested via SWARM_DENY_PATHS). - Egress guard (prompt policy, outside the diff fence): web is for external general knowledge only, never put repo content into a query/URL. Model- cooperation-dependent, not transport-enforced — the jail is the hard boundary; scrub_secrets/output gate stay as output-only backstops. - Run-start notice once per review when external voices are live. - New test_sandbox_deny.py: denylist unit asserts + macOS e2e (sandboxed cat of a temp .env is blocked). Docs/knowledge rewritten off the old posture. Bumps swarm 0.5.1 → 0.6.0. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01B2y4GsnrE87L89uGHE5dGX
15 findings from a /swarm:review dogfooding run over the 0.6.0 diff (2 critical consensus among them), applied: - FAIL CLOSED without the OS jail (the critical): on hosts with neither sandbox-exec nor bwrap, run_codex/run_grok now degrade to the 0.5.x flags (grok tool-less/no-web, codex without web search) via the new _jail_available() gate, with an audible warning — read+web never runs without its hard boundary. 0.5.x was safe there by flags; 0.6.0 now is again. - E2E sandbox test gains a positive control (non-denied read must pass, rc asserted) so "jail never ran" can no longer pass as "jail denied". - Prompt hardening: all tool output declared untrusted DATA (file-read channel cannot be nonce-fenced — now a named residual); EPERM on secret paths flagged as expected; run-start notice names the root-only deny scope + SWARM_DENY_PATHS and no longer mis-renders as a bullet. - Named residuals documented: unfenced file-read channel, own-backend token readability; grok tool-id leniency (live-verified) replaces the stale degrade-promise in the adapter doc. - Cleanups: _repo_root() reused in _sandbox_deny_paths, redundant nullglob block dropped, honest test-runner comment, CLAUDE.md + root README posture sync, knowledge frontmatter per curate convention. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01B2y4GsnrE87L89uGHE5dGX
gering
force-pushed
the
task/open-swarm-external-exploration
branch
from
July 23, 2026 12:52
ae77504 to
2ce9a15
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.env*/data//key files join the HOME denylist; fail closed — without sandbox-exec/bwrap the externals degrade to the 0.5.x tool-less/no-web flags instead of running read+web bare./swarm:reviewdogfooding); 15 findings applied, incl. the fail-closed gap (cross-family consensus critical).Changes
agents.sh: grok--tools read_file,list_dir,grep,web_search,web_fetch --cwd <repo>(was--tools "" --disable-web-search); codex-C <repo> -c tools.web_search=trueunder unchanged-s read-only;_jail_available()fail-closed gate; repo-root secret globs in_sandbox_deny_paths; named residuals in comments.SKILL.md: exploration permission + HIGH-PRIORITY egress guard in the external prompt header (outside the diff fence); all tool output declared untrusted DATA; once-per-run notice (web + egress + jail +SWARM_DENY_PATHShint).test_sandbox_deny.py(new): denylist unit asserts + macOS e2e with positive control (non-denied read must pass — "jail never ran" can't masquerade as "jail denied").Readiness
origin/maincheck-structure.py: 0 errorsTest plan
python3 plugins/swarm/scripts/test_sandbox_deny.py— denylist + e2e green on macOSbash plugins/swarm/scripts/agents.sh list— codex + grok ready/swarm:reviewon any diff: run-start notice appears; externals return findings (file-read + web live)🤖 Generated with Claude Code
https://claude.ai/code/session_01B2y4GsnrE87L89uGHE5dGX