Skip to content

feat(live-proof): verify live inside the review job - #1205

Merged
steipete merged 1 commit into
mainfrom
steipete/live-verification-one-job
Aug 18, 2026
Merged

steipete merged 1 commit into
mainfrom
steipete/live-verification-one-job

Conversation

@steipete

Copy link
Copy Markdown
Contributor

Summary

Live verification ran in a separate secretless workflow, and the handoff was the fragile part. Over 17 production runs after the always-run change, execute succeeded on essentially all of them while 8 of 13 finished runs failed at attach: record pull_head_sha does not match (the head moved during the 10–15 minute gap), canonical publication tuple references a missing decision packet (attach hydrated without the packet publish-main needs), and curl (22) 403 (the secretless job resolved the PR head unauthenticated and hit the rate limit). All three are artifacts of the split.

Verification now runs inside the review job, immediately after the decision, while the job still knows the exact head it reviewed, and the result travels in the existing review artifact to the existing publication lane. Deleted: live-proof.yml, the dispatch-live-proofs composite action, the dispatch steps, src/live-proof/publication.ts and the dispatch-candidates CLI. Retraction stays available through a new live-proof-maintenance.yml (workflow_dispatch only). R2 upload happens in the publication job, which already holds those secrets; the review job never receives them.

Security posture — stated plainly

Untrusted PR code now runs unsandboxed in a job holding credentials. The maintainer's decision is that the review's own judgment is the gate: the model reads the whole diff and sets declined_suspicious for anything that could exfiltrate, and the prompt now tells it explicitly that its plan will execute on a credentialed machine. Linux containment was built and then removed — it requires unprivileged user namespaces, which are unavailable on ubuntu-latest, and adopting it would have moved every review job onto paid Blacksmith runners.

Two controls compensate, both cheap and kernel-independent:

  • Environment sanitization. The child process inherits an environment stripped of credentials by exact denylist (OPENAI_API_KEY, CLAWSWEEPER_OPENCLAW_OPENAI_KEY, GH_TOKEN, GITHUB_TOKEN, CLAWSWEEPER_WEBHOOK_SECRET) and by *_TOKEN/*_KEY/*_SECRET/*_PASSWORD/AWS_* heuristic, asserted at runtime: [live-proof] sanitized environment assertion passed: credentials=0.
  • Scriptless installs. Installs run with lifecycle scripts disabled unless a repository opts in via allow_install_scripts, because a lockfile bump can execute a postinstall from a dependency that never appears in the reviewed diff — the one attack diff review cannot see.

Containment remains the documented future hardening step.

Validation

  • pnpm build clean; live-proof/prompt/profile 103/103; workflow audits 123/123; state-writer 8/8; full unit suite 2,343 passed / 0 failed.
  • Runner defaults verified back at ubuntu-latest; repair-lane containment code untouched.

Autoreview could not run on this change and I did not skip it silently. The helper fails closed on any diff containing the GitHub App client ID (CLAWSWEEPER_APP_CLIENT_ID) — a public identifier, not a secret — and this change moves it between workflows. The literal exists in eight files on main, so migrating it out is its own refactor and that migration would hit the same rule. Compensating: the full suite above, manual review of the critical surfaces (deletions, runner defaults, sanitization denylist), and CI here as the authoritative gate. Worth a follow-up to move that literal to the repo variable (already created) so future changes in this area are reviewable.

Live verification ran in a separate secretless workflow, and the handoff
was the fragile part: 8 of 13 finished production runs failed on stale
heads, missing decision packets, or unauthenticated 403s while execution
itself succeeded. Verification now runs in the review job, immediately
after the decision, while the job still knows the exact head it reviewed,
and its result travels in the existing review artifact to the existing
publication lane. The separate workflow, dispatch action and attach-publish
path are deleted; retraction stays available as a maintenance workflow.

Untrusted code runs unsandboxed in a credentialed job, gated by the
review's own declined_suspicious judgment. Two controls compensate: the
child process inherits an environment stripped of every credential by
denylist and by *_TOKEN/*_KEY/*_SECRET/*_PASSWORD/AWS_* heuristic, asserted
to zero; and installs run without lifecycle scripts unless a repository
opts in, since a lockfile bump can execute a postinstall the reviewed diff
never shows.
@steipete
steipete requested a review from a team as a code owner August 18, 2026 08:09
@clawsweeper

clawsweeper Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@clawsweeper

clawsweeper Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper status: review started.

I am starting a fresh review of this pull request: feat(live-proof): verify live inside the review job This is item 1/1 in the current shard. Shard 0/1.

This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking.

Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted.

@steipete
steipete merged commit 03c1f45 into main Aug 18, 2026
11 checks passed
@steipete
steipete deleted the steipete/live-verification-one-job branch August 18, 2026 08:11
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