[Tooling] Secure Claude workflows#23056
Open
iangmaia wants to merge 5 commits into
Open
Conversation
Collaborator
Generated by 🚫 Danger |
Contributor
|
|
Contributor
|
|
Contributor
There was a problem hiding this comment.
Pull request overview
Hardens the claude-review GitHub Actions workflow to reduce exposure when triggered via issue_comment by ensuring Claude and checkout do not run for external/fork PRs, while also pinning action references and constraining review output to inline-only.
Changes:
- Adds an early PR-origin check (via
gh api) and gates both checkout and Claude execution to internal PRs only. - Pins
actions/checkoutandanthropics/claude-code-actionto immutable SHAs and disables credential persistence on checkout. - Updates the Claude prompt/tooling to use the issue_comment PR number and removes top-level PR commenting capability.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
7e96ab4 to
7bd88fa
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.


Summary
@claudereview comments only from trusted commenters and skip Claude workflows on fork/external PRs before checkout or Claude execution.