Repository navigation
feat(live-proof): verify live inside the review job - #1205
Merged
Merged
Conversation
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.
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. |
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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), andcurl (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, thedispatch-live-proofscomposite action, the dispatch steps,src/live-proof/publication.tsand the dispatch-candidates CLI. Retraction stays available through a newlive-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_suspiciousfor 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 onubuntu-latest, and adopting it would have moved every review job onto paid Blacksmith runners.Two controls compensate, both cheap and kernel-independent:
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.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 buildclean; live-proof/prompt/profile 103/103; workflow audits 123/123; state-writer 8/8; full unit suite 2,343 passed / 0 failed.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.