Skip to content

Harden Claude review workflow#1865

Merged
leighmcculloch merged 1 commit into
mainfrom
harden-claude-review-action
May 12, 2026
Merged

Harden Claude review workflow#1865
leighmcculloch merged 1 commit into
mainfrom
harden-claude-review-action

Conversation

@leighmcculloch
Copy link
Copy Markdown
Member

What

Apply the best practices to the Claude review workflow:

  • Add --max-turns 30 to bound token spend per invocation.
  • Scope the allowed gh pr commands to this PR's number so a misfire can't reach into another PR.

Why

Brings this workflow in line with the Claude-action best practices: capped turns and per-PR-scoped tool patterns. Existing fork exclusion is preserved — fork PRs from outside contributors will not trigger Claude.

Copilot AI review requested due to automatic review settings May 8, 2026 14:05
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR hardens the repository’s Claude-based PR review GitHub Action by bounding agent iteration cost and constraining the GitHub CLI tool allowlist to the current pull request, reducing risk of unintended cross-PR operations.

Changes:

  • Add --max-turns 30 to cap the number of Claude tool-use cycles per run.
  • Scope allowed gh pr commands (comment, diff, view) to the current PR number via ${{ github.event.pull_request.number }}.
  • Document the intent of these safeguards inline in the workflow.

@leighmcculloch leighmcculloch added this pull request to the merge queue May 12, 2026
Merged via the queue into main with commit d6864d2 May 12, 2026
202 of 203 checks passed
@leighmcculloch leighmcculloch deleted the harden-claude-review-action branch May 12, 2026 03:53
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.

3 participants