Skip to content

ci(claude): rebuild review and triage so Claude has no shell, network or GitHub token - #895

Merged
superuser404notfound merged 1 commit into
mainfrom
ci/claude-v2
Oct 26, 2026
Merged

superuser404notfound merged 1 commit into
mainfrom
ci/claude-v2

Conversation

@superuser404notfound

Copy link
Copy Markdown
Owner

Replaces the claude-code-action setup, which never posted a review in five live runs (sandbox, network and read-denial conflicts). Fetch into files with plain shell, run the pinned Claude Code CLI with Read/Glob/Grep only and structured JSON output, post with plain shell. Both paths tested end to end locally against #879 and #886 (posting dry-run). Details in the commit message.

🤖 Generated with Claude Code

https://claude.ai/code/session_01WJcXkGQrMiBPixVEFTSBJS

… or GitHub token

The action-based setup gave Claude gh and git on fork content with secrets
present, and every protective layer (read denials, the action's sandbox, a
network allowlist, nested isolation) broke the next command: five live runs,
no review posted.

Now each job is split in three:
- plain shell steps with the GitHub token fetch the PR or issue into files
  (fetch-pr.sh reads the head from git objects, never checks it out, and
  renames instruction files a PR adds so they cannot act as instructions);
- the pinned Claude Code CLI runs with Read, Glob and Grep only, reading the
  base checkout plus that data directory, with credential paths denied, and
  returns structured JSON (run-claude.sh); a denied read inside the data
  directory fails the run instead of posting an empty review;
- plain shell steps post the result: one PR review with inline comments that
  falls back to listing them in the body when GitHub refuses a line
  (post-review.sh), or allowlisted labels plus one comment (post-triage.sh).

claude-code-action, the helper scripts and the @claude workflow are gone.
Both paths were run end to end locally against #879 and #886 with posting in
dry-run mode.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WJcXkGQrMiBPixVEFTSBJS
@superuser404notfound
superuser404notfound merged commit 23855dc into main Oct 26, 2026
@superuser404notfound
superuser404notfound deleted the ci/claude-v2 branch October 26, 2026 09:38
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