Skip to content

exp(stick-marker) - #19

Open
mmiermans wants to merge 3 commits into
masterfrom
exp/stick-marker
Open

exp(stick-marker)#19
mmiermans wants to merge 3 commits into
masterfrom
exp/stick-marker

Conversation

@mmiermans

Copy link
Copy Markdown
Owner

Sticky-review strategy test. Do not merge.

@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown
🤖 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.jspct(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 codeexp-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.

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