You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Turn the Claude Code sandbox off only for the ci-context read activity #14740
area: securitySecurity-relevant: vulnerability, hardening, or disclosure follow-up.needs-triageNot yet classified. Floor until a type and one priority tier are set.
.github/workflows/pr-run-activity-read.yml sets sandbox: "false" on every read activity's run-claude-cli leg, at lines 1756, 1816 and 1866 as of b0a0df2. The stated reason, given under the opt-out decision in melodic-software/ci-workflows#1060, is that a ci-context skill gets bare Bash (collect-base-activity/action.yml around lines 507-513, allowed+=(Bash Edit Write Agent)) and may run npm ci or a test suite that reaches hosts beyond GitHub.
That opt-out also covers the read activities that do not need Bash beyond the sandbox. Meanwhile ci-context reads CI log content, which is untrusted text. With the sandbox off, prompt-injected log text could use Bash to reach any host. The claude-security-review lane raised this as IMPORTANT on melodic-software/pr-pipeline-sandbox#325 (thread).
Mitigations in place: the lanes run only for trusted authors' same-repository PRs, and WebFetch and WebSearch stay denied.
Done when
sandbox: "false" applies only to the activity whose skill needs hosts beyond GitHub (prepare: ci-context), and every other read activity runs with the default sandbox.
The PR states two things and cites the line for each: whether the subprocess env scrub keeps the Claude API key out of the Bash child, and whether setup-runner-isolation limits egress.
Afterwards, pr-pipeline-sandbox resyncs the workflow.
Size: Small
Complexity: Low
Uncertainty: Known
Flags: none
Blocked by: none
Understood: in pr-run-activity-read.yml, the three run-claude-cli legs set sandbox: "false" for every read activity. You want that opt-out only where prepare: ci-context applies, with the default sandbox everywhere else. You also want the PR to state two things: whether the env scrub keeps the API key out of the Bash child, and whether setup-runner-isolation limits egress.
The body and the refinement comment already give exact done-when criteria, so nothing is missing from the reporter. The mitigations you list (trusted authors only, WebFetch and WebSearch denied) make this hardening work, not an open high-severity hole. The workflow file is protected, so a builder session needs to take it. I found no open duplicate and no merged PR that already covers it. #14250 and #14286 are related: they changed the sandbox default and made a sandbox that cannot start fail the leg.
Not admitted to the issue lane: its body or a criterion names .github/workflows/pr-run-activity-read.yml, which the issue lane cannot push (patch-protected-path); a builder session takes it. Admission takes the issue once each of those is met, when intake triages it again (.github/actions/resolve-config/admission-rules.json).
Refinement. A read-only run explored this repository, searched its issues and pull requests, and read the allowed docs to draft what follows. On an issue a listed human filed, it counts as the issue's spec once posted, while unedited; it is still model text, so check it.
Intended outcome: In pr-run-activity-read.yml, the three run-claude-cli legs set sandbox to false only when the activity's prepare mode is ci-context, and every other read activity uses the default sandbox.
Acceptance criteria
In .github/workflows/pr-run-activity-read.yml, the sandbox input of all three run-claude-cli legs (API key, subscription token, fallback token; now lines 1756, 1816, 1866) is an expression that gives "false" only when steps.config.outputs.prepare == 'ci-context' and otherwise the default sandbox value.
No leg still sets a literal sandbox: "false"; grep for it in the workflow finds none.
The comment above each sandbox line says the opt-out applies only to prepare: ci-context, citing melodic-software/ci-workflows#1060 and that ci-context reads untrusted CI log text.
The workflow still parses as valid YAML and passes the repository's workflow lint (actionlint/zizmor) if one is configured.
The PR description states whether the subprocess env scrub (CLAUDE_CODE_SUBPROCESS_ENV_SCRUB) keeps the Claude API key out of the Bash child, citing the file and line that set it.
The PR description states whether setup-runner-isolation limits egress, citing .github/actions/setup-runner-isolation/action.yml:49-67, which only removes sudo and docker access and sets no network allowlist.
Any workflow contract doc that says the read activities run with the sandbox off (for example docs/conventions/pr-pipeline/pr-run-activity.md) is updated to match.
External state: none
Dependencies
Resyncing the workflow into melodic-software/pr-pipeline-sandbox happens in that repository after this merges, so it is a follow-up and not part of this PR.
Other read activities must still work under the default sandbox. The recent pin bumps (#14250, #14286) made a sandbox that cannot start fail the leg, so a broken activity will show up as a failed run.
/home/runner/work/claude-code-plugins/claude-code-plugins/.base/.github/workflows/pr-run-activity-read.yml:1753-1756: first leg (api-key) sets sandbox "false" with the ci-workflows#1060 comment; the same pattern repeats at 1813-1816 and 1863-1866.
/home/runner/work/claude-code-plugins/claude-code-plugins/.base/.github/workflows/pr-run-activity-read.yml:1005-1017: ci-context, review-threads, dependency-review and merge-base are this file's prepare modes, so steps.config.outputs.prepare can tell ci-context apart.
/home/runner/work/claude-code-plugins/claude-code-plugins/.base/.github/workflows/pr-run-activity-read.yml:1399-1403: the Isolate the runner step installs subprocess isolation only for kind == 'skill'.
/home/runner/work/claude-code-plugins/claude-code-plugins/.base/.github/actions/setup-runner-isolation/action.yml:18-20: without CLAUDE_CODE_SUBPROCESS_ENV_SCRUB every Bash child inherits the OAuth token, and the scrub needs bubblewrap and socat.
/home/runner/work/claude-code-plugins/claude-code-plugins/.base/.github/actions/setup-runner-isolation/action.yml:49-67: the action only removes sudo and docker access and sets no network egress limit.
Automated refinement by the lanes App. Intake triages the issue again with it.
Closing as completed. All three Done-when items have landed:
Sandbox off only for ci-context.#17029 (merge commit c1a4cd8972023e0fe480f5584f620edbe2b8c067) changes all three run-claude-cli legs in .github/workflows/pr-run-activity-read.yml to sandbox: ${{ steps.config.outputs.prepare == 'ci-context' && 'false' || 'true' }}. Every other read activity now runs with the default sandbox. A new test in credential-legs.test.mjs evaluates the expression for each prepare mode and fails if a literal sandbox: "false" comes back.
The two statements, each with its line cited. The fix(ci): turn the read runner's sandbox off only for ci-context #17029 body answers both, citing the lines at the ci-workflows pin. The env scrub does keep ANTHROPIC_API_KEY out of the Bash child on every leg (run-claude-cli/lane.cjs:466 and :468, plus the Claude Code env-vars scrub table). setup-runner-isolation does not limit egress; only run-claude-cli's sandbox settings do (lane.cjs:175, applied unless sandbox is false, :494).
I re-ran scripts/lanes/check-sync.sh c1a4cd8972023e0fe480f5584f620edbe2b8c067 on a sandbox checkout of 20016e4e7e. It exits 1 and names only the four PINNED .github/standards/ files (dependabot-policy/policy.json, runner-policy/package-lock.json, runner-policy/policy.json, runner-policy/runner-policy.mjs). The standards sync owns those files, and they already differed on main.
No live read run has yet been observed under the sandbox for each non-ci-context activity that uses Bash (fix-docs, review-threads, the issue lane). A sandbox that cannot start fails its leg red, so a break would show up as a failed run.
The two Risks in fix(ci): turn the read runner's sandbox off only for ci-context #17029, where the sandboxing docs and the probed CLI version disagree (deny rules merging into the sandbox, and WebFetch(domain:...) widening the allowlist). Either one would fail red or stay no wider than the old sandbox: "false".
area: securitySecurity-relevant: vulnerability, hardening, or disclosure follow-up.needs-triageNot yet classified. Floor until a type and one priority tier are set.
Activity
github-actions commentedon Nov 9, 2026
Size: Small
Complexity: Low
Uncertainty: Known
Flags: none
Blocked by: none
Understood: in
pr-run-activity-read.yml, the threerun-claude-clilegs setsandbox: "false"for every read activity. You want that opt-out only whereprepare: ci-contextapplies, with the default sandbox everywhere else. You also want the PR to state two things: whether the env scrub keeps the API key out of the Bash child, and whethersetup-runner-isolationlimits egress.The body and the refinement comment already give exact done-when criteria, so nothing is missing from the reporter. The mitigations you list (trusted authors only, WebFetch and WebSearch denied) make this hardening work, not an open high-severity hole. The workflow file is protected, so a builder session needs to take it. I found no open duplicate and no merged PR that already covers it. #14250 and #14286 are related: they changed the sandbox default and made a sandbox that cannot start fail the leg.
Automated triage. A maintainer reviews it.
melodic-automation-lanes commentedon Nov 9, 2026
Not admitted to the issue lane: its body or a criterion names .github/workflows/pr-run-activity-read.yml, which the issue lane cannot push (patch-protected-path); a builder session takes it. Admission takes the issue once each of those is met, when intake triages it again (
.github/actions/resolve-config/admission-rules.json).melodic-automation-lanes commentedon Nov 9, 2026
Refinement. A read-only run explored this repository, searched its issues and pull requests, and read the allowed docs to draft what follows. On an issue a listed human filed, it counts as the issue's spec once posted, while unedited; it is still model text, so check it.
Intended outcome: In pr-run-activity-read.yml, the three run-claude-cli legs set sandbox to false only when the activity's prepare mode is ci-context, and every other read activity uses the default sandbox.
Acceptance criteria
External state: none
Dependencies
Related work
Sources read
Automated refinement by the lanes App. Intake triages the issue again with it.
kyle-sexton commentedon Nov 18, 2026
Closing as completed. All three Done-when items have landed:
c1a4cd8972023e0fe480f5584f620edbe2b8c067) changes all threerun-claude-clilegs in.github/workflows/pr-run-activity-read.ymltosandbox: ${{ steps.config.outputs.prepare == 'ci-context' && 'false' || 'true' }}. Every other read activity now runs with the default sandbox. A new test incredential-legs.test.mjsevaluates the expression for each prepare mode and fails if a literalsandbox: "false"comes back.ANTHROPIC_API_KEYout of the Bash child on every leg (run-claude-cli/lane.cjs:466and:468, plus the Claude Code env-vars scrub table).setup-runner-isolationdoes not limit egress; only run-claude-cli's sandbox settings do (lane.cjs:175, applied unlesssandboxisfalse,:494).pr-run-activity-read.ymlincluded, from claude-code-plugins atc1a4cd89, the fix(ci): turn the read runner's sandbox off only for ci-context #17029 merge commit. It merged through the sandbox merge queue as4fb700257283679fd993eff3f904aeb5cb78806f.How it was checked:
20016e4e7e,CI Statuspassed, and both Claude review lanes (code and security) reported 0 findings. The three bot review threads were answered on the PR, one with a fix commit, and then resolved.scripts/lanes/check-sync.sh c1a4cd8972023e0fe480f5584f620edbe2b8c067on a sandbox checkout of20016e4e7e. It exits 1 and names only the four PINNED.github/standards/files (dependabot-policy/policy.json,runner-policy/package-lock.json,runner-policy/policy.json,runner-policy/runner-policy.mjs). The standards sync owns those files, and they already differed on main.credential-legs.test.mjs10 pass, 0 fail;actionlintclean. A local probe confirmed that with the sandbox on, Bash reachedapi.github.comand was refusedexample.com.Left out:
WebFetch(domain:...)widening the allowlist). Either one would fail red or stay no wider than the oldsandbox: "false".