You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
🤖 Claude has reviewed this PR — expand after forming your own opinion
Summary
This PR rewrites the Claude PR-review workflow to use an inline prompt with a sticky single-comment delivery, and adds a small JS helper file.
Findings
Security
Broadened tool scope (Bash(gh api:*)) — claude-review.yml. The allowlist changes from narrowly-scoped commands to gh api:*, which permits any authenticated GitHub API call (with issues: write + pull-requests: write). Combined with the fact that the model ingests attacker-influenceable content via gh pr diff, a prompt-injection payload in a PR diff could induce arbitrary write API calls. The fork-PR guard (head.repo.full_name == github.repository) limits this to same-repo branches, but that still includes any contributor with push access. Consider keeping the API surface narrow (e.g. only the specific comment endpoints needed) rather than gh api:*.
Removed prompt-injection mitigation — the previous config used include_comments_by_actor: "mmiermans" to keep untrusted comments out of context. The new prompt only runs gh pr diff (not gh pr view), so PR comments aren't loaded — good — but the diff content itself is untrusted and is now paired with a much broader tool allowlist (see above). Worth a comment in the workflow documenting this trust boundary.
Removed id-token: write — OIDC was previously used for Claude GitHub App auth. Auth now relies on anthropic_api_key + github.token. This appears intentional, but confirm the App-based path is no longer required.
Bug / Quality
webclient/resources/js/exp-stick-marker.js — pct(part, total) divides without guarding total === 0, returning Infinity/NaN. The inline comment even acknowledges this. Either guard it (return total === 0 ? 0 : (part / total) * 100;) or remove the file.
Dead code — exp-stick-marker.js is not referenced by any JS/HTML in the repo. If it's experimental scaffolding it should not land on the main branch; if it's intended for use, wire it up and add a test.
Tests / Docs
No tests accompany the new helper. The workflow's inline prompt removed the explanatory comments that the previous version had (e.g. why gh pr view is excluded); re-adding brief rationale comments would preserve that context.
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
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.
Sticky-review strategy test. Do not merge.