Commit 18d84c7
ci: add Claude Code on-demand workflow for PRs (#818)
* ci: add Claude AI workflow for PR security review and on-demand assistance
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* ci: align Claude workflow permissions with official docs
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* add more tighter claude triggers
* ci: simplify Claude workflow to on-demand only
Replace the dual-job setup (deprecated security-review action + on-demand)
with a single job using claude-code-action@v1, matching the official docs.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* ci: restrict Claude workflow to PR collaborators only
Drop unused permissions (issues, id-token) and add author_association
guard so only OWNER/MEMBER/COLLABORATOR can trigger Claude. Also filter
out standalone issue comments to limit usage to PRs.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* ci: restrict Claude workflow to read-only code review
Downgrade contents permission from write to read and whitelist only
review-related tools (Read, Glob, Grep, inline comments, PR comments)
so Claude cannot modify code or push changes.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* add system prompt
* new claude code prompt
* fix: add trailing newline to claude.yml
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* ci: remove issues trigger from claude workflow
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* ci: restrict claude workflow to comment triggers only
* ci: fix trailing || in if condition
* ci: harden claude workflow permissions and checkout
- Restrict --allowedTools to read-only git subcommands and remove broad gh api:*
- Add author_association check to limit triggers to OWNER/MEMBER/COLLABORATOR
- Fix issue_comment checkout to use PR head SHA instead of default branch
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* ci: harden claude workflow permissions and update prompt
Pin action versions to specific SHAs, add persist-credentials: false,
and align system prompt with wormhole repo (security-focused review).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* ci: switch claude workflow from OAuth to API key auth
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* ci: temporarily add pull_request trigger for testing
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* ci: simplify pull_request condition for debugging
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* ci: add back id-token permission needed by claude-code-action for GitHub OIDC
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* ci: remove temporary pull_request trigger after successful test
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* ci: test removing id-token permission from claude workflow
- Remove id-token: write to verify it's not needed with API key auth
- Add pull_request trigger temporarily for testing
* ci: simplify pull_request condition for testing
* ci: revert test changes, id-token: write confirmed required
* ci: use github_token for Claude workflow and remove id-token/actions permissions
* ci: relax Claude review triggers to test workflow execution
* ci: add temporary pull_request trigger to test Claude workflow
* ci: gate Claude workflow test runs on actor only
* ci: simplify Claude PR triggers after github_token auth test
* ci: tighten Claude workflow tool scope and concurrency
* ci: add debug logging for Claude trigger payloads
* ci: move Claude trigger checks to step-level for payload debugging
* ci: document Claude trigger, auth, and scope decisions
* ci: align Claude Code workflow with wormhole repo
Adopt the canonical workflow from wormhole-foundation/wormhole#4686:
- Replace author_association check with API-based collaborator permission check
- Add PR_NUMBER env var and scope gh pr commands to it
- Add github_token to avoid OIDC dependency
- Add prompt injection guard to system prompt
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* ci: remove SAFETY_CRITICAL_MODE.md reference (file does not exist)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent 924730a commit 18d84c7
1 file changed
+132
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
0 commit comments