-
Notifications
You must be signed in to change notification settings - Fork 0
Add Claude Code GitHub Workflow #30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,44 @@ | ||||||||
| name: Claude Code Review | ||||||||
|
|
||||||||
| on: | ||||||||
| pull_request: | ||||||||
| types: [opened, synchronize, ready_for_review, reopened] | ||||||||
| # Optional: Only run on specific file changes | ||||||||
| # paths: | ||||||||
| # - "src/**/*.ts" | ||||||||
| # - "src/**/*.tsx" | ||||||||
| # - "src/**/*.js" | ||||||||
| # - "src/**/*.jsx" | ||||||||
|
|
||||||||
| jobs: | ||||||||
| claude-review: | ||||||||
| # Optional: Filter by PR author | ||||||||
| # if: | | ||||||||
| # github.event.pull_request.user.login == 'external-contributor' || | ||||||||
| # github.event.pull_request.user.login == 'new-developer' || | ||||||||
| # github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR' | ||||||||
|
|
||||||||
| runs-on: ubuntu-latest | ||||||||
| permissions: | ||||||||
| contents: read | ||||||||
| pull-requests: read | ||||||||
| issues: read | ||||||||
| id-token: write | ||||||||
|
|
||||||||
| steps: | ||||||||
| - name: Checkout repository | ||||||||
| uses: actions/checkout@v4 | ||||||||
| with: | ||||||||
| fetch-depth: 1 | ||||||||
|
|
||||||||
| - name: Run Claude Code Review | ||||||||
| id: claude-review | ||||||||
| uses: anthropics/claude-code-action@v1 | ||||||||
| with: | ||||||||
| claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} | ||||||||
| plugin_marketplaces: 'https://github.com/anthropics/claude-code.git' | ||||||||
| plugins: 'code-review@claude-code-plugins' | ||||||||
| prompt: '/code-review:code-review ${{ github.repository }}/pull/${{ github.event.pull_request.number }}' | ||||||||
| # See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md | ||||||||
| # or https://code.claude.com/docs/en/cli-reference for available options | ||||||||
|
|
||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove trailing blank line — YAMLlint reports this as an error. 🛠️ Proposed fix # See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
# or https://code.claude.com/docs/en/cli-reference for available options
-📝 Committable suggestion
Suggested change
🧰 Tools🪛 YAMLlint (1.38.0)[error] 44-44: too many blank lines (1 > 0) (empty-lines) 🤖 Prompt for AI Agents |
||||||||
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,50 @@ | ||||||||
| name: Claude Code | ||||||||
|
|
||||||||
| on: | ||||||||
| issue_comment: | ||||||||
| types: [created] | ||||||||
| pull_request_review_comment: | ||||||||
| types: [created] | ||||||||
| issues: | ||||||||
| types: [opened, assigned] | ||||||||
| pull_request_review: | ||||||||
| types: [submitted] | ||||||||
|
|
||||||||
| jobs: | ||||||||
| claude: | ||||||||
| if: | | ||||||||
| (github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) || | ||||||||
| (github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) || | ||||||||
| (github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) || | ||||||||
| (github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude'))) | ||||||||
| runs-on: ubuntu-latest | ||||||||
| permissions: | ||||||||
| contents: read | ||||||||
| pull-requests: read | ||||||||
| issues: read | ||||||||
| id-token: write | ||||||||
| actions: read # Required for Claude to read CI results on PRs | ||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix inline comment spacing — YAMLlint expects two spaces before 🛠️ Proposed fix- actions: read # Required for Claude to read CI results on PRs
+ actions: read # Required for Claude to read CI results on PRs📝 Committable suggestion
Suggested change
🧰 Tools🪛 YAMLlint (1.38.0)[warning] 26-26: too few spaces before comment: expected 2 (comments) 🤖 Prompt for AI Agents |
||||||||
| steps: | ||||||||
| - name: Checkout repository | ||||||||
| uses: actions/checkout@v4 | ||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Pin both actions to full-length commit SHAs — same supply-chain risk as in 🔒 Proposed fix- uses: actions/checkout@v4
+ uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2- uses: anthropics/claude-code-action@v1
+ uses: anthropics/claude-code-action@<sha> # v1 - resolve current SHA for the v1 tagAlso applies to: 35-35 🤖 Prompt for AI Agents |
||||||||
| with: | ||||||||
| fetch-depth: 1 | ||||||||
|
|
||||||||
| - name: Run Claude Code | ||||||||
| id: claude | ||||||||
| uses: anthropics/claude-code-action@v1 | ||||||||
| with: | ||||||||
| claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} | ||||||||
|
|
||||||||
| # This is an optional setting that allows Claude to read CI results on PRs | ||||||||
| additional_permissions: | | ||||||||
| actions: read | ||||||||
| # Optional: Give a custom prompt to Claude. If this is not specified, Claude will perform the instructions specified in the comment that tagged it. | ||||||||
| # prompt: 'Update the pull request description to include a summary of changes.' | ||||||||
|
|
||||||||
| # Optional: Add claude_args to customize behavior and configuration | ||||||||
| # See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md | ||||||||
| # or https://code.claude.com/docs/en/cli-reference for available options | ||||||||
| # claude_args: '--allowed-tools Bash(gh pr:*)' | ||||||||
|
|
||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove trailing blank line — YAMLlint reports this as an error, same as in 🛠️ Proposed fix # or https://code.claude.com/docs/en/cli-reference for available options
# claude_args: '--allowed-tools Bash(gh pr:*)'
-📝 Committable suggestion
Suggested change
🧰 Tools🪛 YAMLlint (1.38.0)[error] 50-50: too many blank lines (1 > 0) (empty-lines) 🤖 Prompt for AI Agents |
||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: libar-dev/delivery-process
Length of output: 364
🌐 Web query:
CVE-2025-30066 tj-actions changed-files March 2025 supply chain attack secrets💡 Result:
What happened (March 2025)
tj-actions/changed-files(a widely used GitHub Action) was hit by a supply-chain compromise tracked as CVE-2025-30066. Attackers retagged many existing version tags (e.g.,v1…v45.x) to point to a malicious commit (notably `0e58ed8671d6b60d0890c21b07f8835ace038e67). The injected code fetched and ran a script intended to extract secrets from the GitHub Actions runner (Runner Worker) process memory and print them into workflow logs (often as double-base64 output). [1] [2] [3]What “secrets” were exposed
When it mattered (compromise window)
tj-actions/changed-filesduring 2025-03-12 00:00 UTC to 2025-03-15 12:00 UTC. [1]Scope / who was at highest risk
Patch / fixed version
Related compromise (likely enabling factor)
tj-actions/changed-filescompromise may have been enabled by a compromise ofreviewdog/action-setup@v1(CVE-2025-30154) during March 11, 2025 18:42–20:31 UTC, potentially affecting other Reviewdog actions. [1]What to do (practical response)
tj-actions/changed-filesin the window above and inspect the logs for suspicious/double-base64 blobs. [1] [2]tj-actions/changed-files@v46.0.1(or later) and pin actions to immutable commit SHAs going forward. [1] [2]gist.githubusercontent.com(a key indicator noted in incident writeups) and other unexpected network destinations during workflow runs. [2] [3]Sources: CISA alert and timelines [1], GitHub Advisory Database entry (GHSA-mrrh-fwg8-r2c3 / CVE-2025-30066) [2], StepSecurity incident analysis [3], Wiz incident analysis [4].
References
tj-actions/changed-files(CVE-2025-30066) andreviewdog/action-setup@v1tj-actions/changed-filessupply chain attack analysisPin both actions to full-length commit SHAs to prevent supply-chain attacks.
Both
actions/checkout@v4andanthropics/claude-code-action@v1use mutable version tags. If an attacker gains access to the account that publishes an action, they can commit malicious code and update existing Git tags to point to the new malicious commit — exactly what happened in March 2025 whentj-actions/changed-fileswas compromised, affecting more than 23,000 repositories. Attackers retagged multiple versions to point to a malicious commit that extracted secrets from the GitHub Actions runner environment.Pinning an action to a full-length commit SHA is the only way to guarantee immutable release execution. This is critical here because the
CLAUDE_CODE_OAUTH_TOKENsecret is in scope for both actions.🔒 Proposed fix: pin both actions to commit SHAs
Also applies to: 36-36
🤖 Prompt for AI Agents