Repository navigation
feat(review): give reviewers allowlisted network access and a truthful capability prompt - #1487
Conversation
…l capability prompt The review prompt promised network access and a GitHub token that the read-only sandbox never had. Reviews now select the clawsweeper-review Codex permission profile: a read-only filesystem, managed proxy in limited mode, a checked-in host allowlist, and no token. They use default_permissions instead of the legacy --sandbox override that suppresses the proxy. The setup smoke proves allowed HTTPS, proxy-denied HTTPS, and denied checkout writes before any review can publish.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 8, 2026, 1:56 AM ET / 05:56 UTC. ClawSweeper reviewWhat this changesAdds allowlisted public network access for hosted reviewers, preserves the configured sandbox across execution paths, and makes reviewer prompts describe each runner’s actual capabilities. Merge readiness✅ Ready for maintainer review This remains useful work absent from the pinned main branch. The earlier runner-capability finding is resolved, the supplied enforcement proof covers the changed boundary, and no actionable patch defect was found. Priority: P2 Review scores
Verification
How this fits togetherClawSweeper’s review runner combines repository and GitHub evidence into maintenance recommendations. Workflow setup configures its execution boundary, while the runtime launches reviewers and describes which evidence they can access. flowchart TD
A[Review workflow] --> B[Configure permission profile]
B --> C[Verify network and write restrictions]
C --> D[Launch reviewer]
E[Repository and prefetched evidence] --> D
D --> F[Allowlisted public research]
D --> G[Maintenance recommendation]
Before mergeNone. Agent review detailsSecurityNone. Review metrics
Technical reviewBest possible solution: Keep one bounded reviewer permission profile, preserve it across both Codex execution paths, and retain enforcement checks alongside accurate runner-specific prompts. Do we have a high-confidence way to reproduce the issue? Not applicable as a feature review; the supplied before/after exec traces demonstrate the network difference between the legacy sandbox override and the new profile. Is this the best way to solve the issue? Yes. Reusing Codex’s permission profile and a shared capability selector avoids a separate networking implementation, while preserving other callers’ sandbox behavior. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 175d75537c5f. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (3 earlier review cycles)
|
…ew sandbox on Linux
What Problem This Solves
Fixes an issue where issue/PR reviewers could publish inaccessible-evidence judgments after their prompt promised network access and a GitHub token that the review sandbox did not provide.
Why This Change Was Made
Hosted Codex review setup installs the
clawsweeper-reviewprofile in its isolated CODEX_HOME. It extends read-only filesystem permissions and enables a managed proxy in limited mode for the single checked-in host allowlist. Review exec and app-server calls preserve the configured policy instead of overriding it with a legacy read-only sandbox. The reviewer receives no GitHub inspection token, and its prompt describes public endpoints, blocked hosts, pre-fetched context, and downloaded media accurately.Setup runs an enforcement smoke before any review can publish. It requires allowed HTTPS to succeed, unlisted HTTPS to receive a proxy rejection, and checkout writes to fail. Non-review callers retain their existing sandbox behavior.
Capability selection now follows the active runner before the Codex sandbox argument. Both prompt paths use the shared runner selector: Codex plus
clawsweeper-reviewdescribes the allowlisted proxy, OpenClaw describes network access through gateway execution, and other Codex settings retain the no-review-tool-network statement. OpenClaw receives no GitHub token; its existing execution policy is unchanged, and its checkout guidance is explicitly instructional. The newreview-network-smokePR CI job proves the unchanged enforcement smoke on Linux bubblewrap without secrets.User Impact
Codex reviewers can research public GitHub, npm, Node, MDN, and OpenClaw documentation while remaining confined to the listed hosts and a read-only checkout. Blocked hosts do not count as evidence against a PR. Offline local reviews retain an offline capability statement.
OpenClaw Bay Impact
Bay is unaffected: no dashboard/public API schema, lifecycle, action, or status contract changes. Existing report front matter
review_sandboxnow recordsclawsweeper-reviewfor these jobs; Bay has no consumer of that field. Bay remains observer-only.Documentation Impact
Updated active README security guidance and the active reviewer-network section in
docs/pr-review-comments.md, plus the Unreleased changelog. The documentation names ClawSweeper maintainers as owner, the checked-in permission TOML as source of truth, Codex 0.153.3 as verified runtime, and CLI/profile/credential/smoke changes as update triggers. Reviewed the docs map and repository validation rules.Evidence
Original implementation head:
114b9408b6e870bd17115e64b97d93b4e97fbe12. Detailed results and source citations are in.artifacts/review-network-profile/report.md. Build, format, lint, static checks, coverage thresholds, and independent Codex P0–P2 review passed. The unit run had 3891 passes / 19 failures / 6 skips; the full check had 5491 passes / 18 failures / 13 skips. Failures were confined to the workflow-subprocess and terminal/live-proof categories described in the work order. One additional focused installer-validatorkill EPERMfailure passed on isolated retry and in both broad runs; it is explicitly recorded in the report. All changed-network tests passed.Follow-up head:
1e8c79b519544e8b1ce709fb323218fea8641be8. The pre-commit P0–P2 autoreview is scoped-clean. The two follow-up findings are addressed by runner-aware capability selection and the newreview-network-smokeCI job. Focused validation passed all 140 tests, including the three capability selections, prompt rendering, OpenClaw credential filtering, and unchanged runner execution policy. The workflow reads Codex 0.153.3 from the setup action pin rather than duplicating it. Hosted Linux review-network-smoke passed on this head in 15 seconds (smoke/install step: 6 seconds). Its exact result lines are quoted below. CI for this head passed without retries:pnpm check,review-network-smoke, sparse repair build smoke, and Windows Codex launcher all succeeded; the dispatch-only hosted review scan was skipped.Real Behavior Proof
Runner capability probe: the built runtime selector and prompt builder were exercised for
codex+clawsweeper-review,openclaw+clawsweeper-review, andcodex+read-only. The emitted capabilities are respectivelyallowlisted-proxy,unrestrictedgateway execution, andnone; all three state that no GitHub token is supplied. Artifact:.artifacts/runner-capability-proof.log. This proves prompt generation, not model inference.Linux enforcement:
review-network-smokein.github/workflows/ci.ymluses GitHub-hostedubuntu-24.04, Node 24, a temporary npm prefix, and a fresh isolated Codex home containing onlymodel = "gpt-5.4"before configuration. It reads the setup action pin, applies the same user-namespace/AppArmor prerequisites, then runsconfigure-review-network.mjsandsmoke-review-network.shunchanged withGITHUB_WORKSPACEset to the checkout. No secrets, inference, or remote lease are used. The three-minute job fails on every smoke failure. Hosted job passed on follow-up head1e8c79b519544e8b1ce709fb323218fea8641be8in 15 seconds. Its exact output:The rejected host also emitted
curl: (56) CONNECT tunnel failed, response 403. Artifact:.artifacts/findings-linux-smoke.log.Claim: the pinned reviewer CLI provides bounded public HTTPS research without network approval prompts and keeps the target checkout read-only.
Surface: actual Codex 0.153.3 permission config loader, managed network proxy, curl, and macOS Seatbelt; the committed smoke script and configuration writer were executed unchanged.
Fixture: this worktree at base
175d75537c5fd3e68cde68e2098157957265fb51plus the uncommitted changes. Synthetic local Responses fixtures supply fixed tool calls for exec/app-server probes; no model credentials or real model inference are used.Environment: macOS 27.0 (arm64), Node v24.20.0, pnpm 11.10.0, codex-cli 0.153.3. Local provider: native Seatbelt, no remote lease/image.
Installation:
PATH=$PATH npm install --prefix "$PWD/.artifacts/review-network-profile/codex-0.153.3" --no-save --no-audit --no-fund --ignore-scripts @openai/[email protected]; global installations unchanged.Config: create
.artifacts/review-network-profile/codex-home/config.tomlcontainingmodel = "gpt-5.4", then runCODEX_HOME="$PWD/.artifacts/review-network-profile/codex-home" node .github/actions/setup-codex/configure-review-network.mjs.Smoke command:
CODEX_HOME="$PWD/.artifacts/review-network-profile/codex-home" GITHUB_WORKSPACE="$PWD" PATH="$PWD/.artifacts/review-network-profile/codex-0.153.3/node_modules/.bin:$PATH" bash .github/actions/setup-codex/smoke-review-network.sh.Observed: api.github.com/zen returned a zen string and exit 0; example.com returned
curl: (56) CONNECT tunnel failed, response 403; checkout creation returnedOperation not permitted; smoke exit 0.Exec command:
PATH=$PATH node .artifacts/review-network-profile/probe-exec.mjs. The real exec tool returned allowed_exit=0; blocked_exit=56 plusdomain is not on the allowlist for the current sandbox mode; write_exit=1. No approval event occurred. Also repeated with the review's--add-dirscratch argument.Negative comparison: repeat the exec harness with
--sandbox read-only. Both hosts fail with curl exit 6 (Could not resolve host); the checkout write still fails. This proves the legacy override suppresses the useful configured network path.App-server proof:
node .artifacts/review-network-profile/probe-app-server.mjsalso preserved the profile, denied the unlisted host without prompting, and denied writes. GitHub returned its unauthenticated rate-limit response in this extra probe (allowed transport, not available API capacity).Artifacts:
app-server-proof.log,smoke-proof.log,exec-profile-proof.log,exec-profile-scratch-proof.log,exec-override-proof.log, and reproducible harnesses under.artifacts/review-network-profile/.Limits: local proof exercises Seatbelt, not Linux bubblewrap. Linux bubblewrap enforcement passed in the dedicated PR CI smoke on the follow-up head. The proof exercises public endpoints and policy enforcement, not private GitHub access, all 15 individual hosts, inference quality, or real PR publication. No version bump was needed.