[HDX] Harden deep-review workflow for fork PRs - #283
Conversation
Port the hardened deep-review workflow from hyperdx, adapted for this repo: - fork-safe PR checkout without persisted credentials - full base fetch plus merge-base and file-list checks so the reviewed diff matches the PR - skip re-reviews when the effective diff is unchanged (diff-hash gate) - prior review comments fetched in trusted shell instead of `gh api` - Claude Code CLI pinned to 2.1.215 and verified by SHA-512 - reviewer confined: user-only setting sources, strict MCP config, and a tight git/gh allowlist (drops helm and `gh api`) - sandbox health and model-tier checks on the execution transcript Keeps the Helm prompt and rubric, and leaves out `id-token: write`. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Deep Review🔴 P0/P1 -- must fix
🟡 P2 -- recommended
🔵 P3 nitpicks (6)
Reviewers (4): correctness, security, adversarial, reliability Testing gaps:
|
- refuse to write prior review comments when the PR checkout already contains `.deep-review`, and create the dir and file exclusively, so a fork cannot redirect the write through a symlink - page through the REST PR files endpoint in the file-list check; `gh pr view --json files` stops at 100 files - feed the review step's --model from ANTHROPIC_DEFAULT_SONNET_MODEL so the model is set in one place Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Addressed the deep review findings in ff69c0b:
Fixed differently. The step now refuses to write if
Fixed. Confirmed on kubernetes/kubernetes#142173 (167 files):
Fixed. |
Summary
Ports the hardened deep-review workflow from hyperdx. Fork PRs are checked out without a persisted token, and the reviewer is locked to a short allowlist of read-only
gitandghsubcommands. That list dropshelmandgh api, becausehelm template --post-rendererwould let a fork PR run its own code. The job also confirms the local diff matches the PR's file list before reviewing, then skips the whole fan-out on later pushes if the merge-base diff hash hasn't changed.I kept this repo's Helm prompt and severity rubric.
id-token: writestays out (it was removed in #282), and so do the references to hyperdx-only files.Testing
Not run yet. PR events use main's copy of the workflow, so the only real test before merge is a manual
workflow_dispatchrun from this branch.🤖 Generated with Claude Code