Skip to content

Commit fae369d

Browse files
committed
chore(ci): use harden runner
1 parent 99f5af6 commit fae369d

2 files changed

Lines changed: 18 additions & 6 deletions

File tree

.github/workflows/claude-code-review.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ jobs:
3232
# Pinned to v1 for supply-chain safety
3333
uses: anthropics/claude-code-action@f2accb9a171bd71f4b5c93bcea23876aa5244edb
3434
with:
35+
allowed_bots: 'renovate[bot]'
36+
claude_args: |
37+
--max-turns 10
38+
track_progress: true
3539
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
3640
plugin_marketplaces: 'https://github.com/anthropics/claude-code.git'
3741
plugins: 'code-review@claude-code-plugins'

.github/workflows/claude.yml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,17 @@ jobs:
3030
cancel-in-progress: true
3131
runs-on: ubuntu-latest
3232
permissions:
33-
contents: read
34-
pull-requests: read
35-
issues: read
36-
id-token: write
33+
contents: read # TODO unclear if needed
34+
pull-requests: write # for progress tracking
35+
issues: write # for progress tracking
36+
id-token: write # needed for OAUTH token
3737
actions: read # Required for Claude to read CI results on PRs
3838
steps:
39+
- name: Harden-Runner
40+
uses: step-security/harden-runner@fe104658747b27e96e4f7e80cd0a94068e53901d # v2.16.1
41+
with:
42+
egress-policy: audit
43+
3944
- name: Checkout repository
4045
uses: actions/checkout@v4
4146
with:
@@ -46,8 +51,12 @@ jobs:
4651
# Pinned to v1 for supply-chain safety
4752
uses: anthropics/claude-code-action@f2accb9a171bd71f4b5c93bcea23876aa5244edb
4853
with:
54+
claude_args: |
55+
--max-turns 10
56+
--allowed-tools 'Bash(gh pr:*),Bash(make:*),Bash(go test:*),Bash(gh stack:*)'
57+
track_progress: true
4958
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
50-
59+
allowed_bots: 'renovate[bot]'
5160
# This is an optional setting that allows Claude to read CI results on PRs
5261
additional_permissions: |
5362
actions: read
@@ -59,4 +68,3 @@ jobs:
5968
# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
6069
# or https://code.claude.com/docs/en/cli-reference for available options
6170
# claude_args: '--allowed-tools Bash(gh pr:*)'
62-

0 commit comments

Comments
 (0)