From da7a62945ce6a08c9863bdf7a327a2101a409079 Mon Sep 17 00:00:00 2001 From: Enrico Ros Date: Thu, 16 Oct 2025 11:32:37 -0700 Subject: [PATCH] workflows: CC: enable reviews and triaging, not DMs --- .github/workflows/claude-dm.yml | 7 +++---- .github/workflows/claude-issue-triage.yml | 2 +- .github/workflows/claude-pr-review.yml | 3 +++ 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/claude-dm.yml b/.github/workflows/claude-dm.yml index a80c5b4b2..a3f98d436 100644 --- a/.github/workflows/claude-dm.yml +++ b/.github/workflows/claude-dm.yml @@ -24,7 +24,7 @@ jobs: permissions: contents: read pull-requests: write - issues: read + issues: write id-token: write actions: read # Required for Claude to read CI results on PRs @@ -39,9 +39,8 @@ jobs: uses: anthropics/claude-code-action@v1 with: claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} - # Allow external users to trigger Claude assistance via @claude mentions - github_token: ${{ secrets.GITHUB_TOKEN }} - allowed_non_write_users: '*' + + # Security: Only users with write access can trigger (DMs allow code execution) # This is an optional setting that allows Claude to read CI results on PRs additional_permissions: | diff --git a/.github/workflows/claude-issue-triage.yml b/.github/workflows/claude-issue-triage.yml index 3aa2a0106..e534dee99 100644 --- a/.github/workflows/claude-issue-triage.yml +++ b/.github/workflows/claude-issue-triage.yml @@ -30,7 +30,7 @@ jobs: uses: anthropics/claude-code-action@v1 with: claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} - # Allow external users to trigger Claude assistance on issues + # Security: Allow any user to trigger triage (automated issue help is safe) github_token: ${{ secrets.GITHUB_TOKEN }} allowed_non_write_users: '*' # track_progress: true # Enables tracking comments diff --git a/.github/workflows/claude-pr-review.yml b/.github/workflows/claude-pr-review.yml index 1e60a00bf..8158d9cf5 100644 --- a/.github/workflows/claude-pr-review.yml +++ b/.github/workflows/claude-pr-review.yml @@ -39,6 +39,9 @@ jobs: uses: anthropics/claude-code-action@v1 with: claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} + # Security: Allow any user to trigger reviews (read-only PR analysis is safe) + github_token: ${{ secrets.GITHUB_TOKEN }} + allowed_non_write_users: '*' # track_progress: true # Enables tracking comments # This setting allows Claude to read CI results on PRs