github-outside-sandbox
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseGitHub Outside Sandbox
GitHub 沙箱外执行指南
- Start normally. Escalate only the blocked command and only within the user's authorization.
- If sandboxed fails, rerun it outside the sandbox before claiming authentication is broken. Never expose or copy tokens.
gh auth status - Run GitHub CLI network operations outside the sandbox when required: ,
gh repo ..., and relatedgh pr ...commands.gh - Run Git writes outside the sandbox when is outside writable roots or errors mention
.gitorindex.lock:Operation not permitted,git add, andgit commit.git push - Use the harness's official host-execution mechanism. In Codex, set , give a concrete
sandbox_permissions: "require_escalated", and use only a narrow safejustificationwhen appropriate.prefix_rule - Never use shell wrappers, credential copying, or broad approval prefixes to bypass the sandbox.
- Verify from the host context with ,
git status -sb, and the relevantgit remote -vcommand. Ask the user to authenticate only if the host-context check also fails.gh ... view
- 正常启动流程。仅在用户授权范围内,对被阻止的命令进行权限提升。
- 如果沙箱内执行失败,需先在沙箱外重新运行该命令,再判定认证是否失效。严禁暴露或复制令牌。
gh auth status - 当需要时,在沙箱外执行GitHub CLI网络操作:、
gh repo ...及相关gh pr ...命令。gh - 当目录位于可写根目录之外,或错误提示包含
.git或“Operation not permitted”时,在沙箱外执行Git写入操作:index.lock、git add和git commit。git push - 使用测试工具的官方主机执行机制。在Codex中,设置,提供具体的
sandbox_permissions: "require_escalated",并在合适时仅使用范围狭窄的安全justification。prefix_rule - 严禁使用Shell包装器、凭据复制或宽泛的批准前缀来绕过沙箱。
- 通过主机上下文使用、
git status -sb及相关git remote -v命令进行验证。仅当主机上下文检查也失败时,才要求用户进行认证。gh ... view