Skip to content

fix(pr-verify): let the capture run control-claude-code's account values source - #13805

Merged
kyle-sexton merged 2 commits into
mainfrom
fix/capture-allow-account-source
Nov 6, 2026
Merged

kyle-sexton merged 2 commits into
mainfrom
fix/capture-allow-account-source

Conversation

@kyle-sexton

Copy link
Copy Markdown
Member

Refs: #11364

session: App Driven PR Verify

Summary

The capture's outer leg runs Bash from an exact allowlist (.github/workflows/pr-verify-capture.yml), and cli/account.mjs, control-claude-code's ## Mask values: source, is not on it. Drive's mask post-check therefore cannot resolve values in CI, and every capture stays not-checked. This PR adds exactly one rule: Bash(node ${{ github.workspace }}/.base/plugins/harness-ops/skills/control-claude-code/cli/account.mjs). The script runs from main's .base copy, never from the head.

Fix

  • .github/workflows/pr-verify-capture.yml: the one allow rule, and the Bash-fence comment.
  • .github/scripts/pr-verify/workflow.test.mjs:
    • the full-set assertion includes the rule;
    • a new case asserts it is the only cli/ rule, and that argument and relative-path forms are refused.

Verification

  • node --test .github/scripts/pr-verify/workflow.test.mjs: 80 pass.
  • Safe to merge before the harness-ops companion: the current account.mjs runs claude auth status in the scrubbed outer leg, gets no login, and exits 1. Captures stay unpublished either way.

Remaining

Related

🤖 Generated with Claude Code

kyle-sexton and others added 2 commits November 6, 2026 13:25
drive's mask post-check runs control-claude-code's `## Mask` `values:`
source, `cli/account.mjs`. The capture's outer leg runs under dontAsk
with a Bash allowlist that did not name it, so the source never ran
and every capture stayed not-checked. Allow exactly main's copy, by
absolute path, with no arguments, and assert in workflow.test.mjs that
it is present and is the only cli/ rule.

Refs: #11364

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-06T19:09:05.894155Z
We couldn’t complete this review. Comment @codex review to try again.
a9e44ce Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

claude-review reviewed a9e44ce2c55cddc6b5eb53b480fc0619b34f134b: read 2 of 2 changed file(s); 0 finding(s), 0 as inline comments.

Code review: no findings

This PR adds one exact Bash allow rule to the capture driver leg: Bash(node ${{ github.workspace }}/.base/plugins/harness-ops/skills/control-claude-code/cli/account.mjs). The rule lets drive's mask post-check resolve the control skill's ## Mask values: source in CI. The PR also updates the Bash-fence comment and the workflow tests.

What I checked

  • Rule matches the hub. plugins/harness-ops/skills/control-claude-code/SKILL.md:112 reads values: `cli/account.mjs` . cli/README.md documents that script as taking no arguments (it exits 2 when given one). An exact rule with no wildcard is the right shape.
  • Path is main's copy. The rule names the .base/ copy by absolute path, like the existing driver rules, so the head cannot supply the script.
  • New test pins the rule. It ties the rule to the hub's values: line, checks it is the only /cli/ rule, and checks that the argument form, the relative .base/ and head/ forms, and other cli/ scripts are all refused.
  • Full-set test stays exact. The existing full-set test now includes the rule through driverRules.push(ACCOUNT_RULE), so the set-equality check still covers every rule.
  • Test strength note, not a defect. The ; curl negative case is checked against the test's whole-string matcher. Claude Code matches each subcommand on its own, so this case shows less than it appears to. Under the real matcher the curl subcommand is still refused, because no rule allows it.

Verification: I read the code but ran nothing. The PR's "80 pass" from node --test is the author's claim and I have not confirmed it. Live proof also depends on the harness-ops companion PR and on PR_VERIFY_CLAUDE_API_KEY credit, as the PR says.

Scope: I left the security side of letting the outer leg print the signed-in account email and organization to the model to the security lane, since this repository runs one.

There are no closing issues: the PR only says Refs: #11364, so there were no acceptance criteria to check. There are no prior findings from this lane, and this was a full review, not a blocking-only one.

@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

claude-security-review reviewed a9e44ce2c55cddc6b5eb53b480fc0619b34f134b: read 2 of 2 changed file(s); 0 finding(s), 0 as inline comments.

Security review: no security issues found

critical-findings: 0

Scope. This was a complete review. I read every hunk of both changed files: .github/workflows/pr-verify-capture.yml (a trusted path, so I read its whole change and the step it gates) and .github/scripts/pr-verify/workflow.test.mjs. There are no prior findings and this was not a blocking-only round. The PR context holds no embedded directives.

What changed. The "Capture the change" step's Bash allowlist gains one exact rule, Bash(node ${{ github.workspace }}/.base/plugins/harness-ops/skills/control-claude-code/cli/account.mjs) (pr-verify-capture.yml#L1132). The diff also updates the fence comment and adds a test.

Trust-control check (Bash fence of a leg that runs PR head code):

  • Who can reach it. The model in the driver leg runs from the head checkout and treats head content as untrusted. The rule names an absolute .base/ (main) path, so a head copy of the script does not match it. The new test confirms that relative .base/ and head/ forms are refused, and so are argument forms and ; curl … chaining.
  • The rule takes no arguments. It ends without *. The script also rejects any argument itself (account.mjs#L6-L10).
  • What it runs. It calls accountValues(), which runs claude auth status --json and prints only email and orgName (driver.mjs#L592-L608). It prints no token, key or other credential.
  • It adds no new capability. The driver.mjs screenshot and record verbs the leg was already allowed to run make the same accountValues() call through maskedFrame (driver.mjs#L728). The new rule only lets the model see those two values in its transcript, and the transcript is sealed before upload.
  • No other changes. Token scope, permissions, the trusted-actor list, the file-tool fences, the skill fence and the merge holds are all unchanged.

Residual note (not a finding). If a later companion change makes account.mjs return real values in CI, the signed-in email and org name will appear in the leg's transcript. That is account metadata, not a credential, and the transcript upload is sealed.

The manifest and instruction-surface checks do not apply: the diff changes no plugin manifests and no standing instructions.

Spend. None. The change adds one allowed command and no runs, turns or billing.

@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 6, 2026
Merged via the queue into main with commit 67e80f9 Nov 6, 2026
91 checks passed
@kyle-sexton
kyle-sexton deleted the fix/capture-allow-account-source branch November 6, 2026 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant