Skip to content

ci: bleeding-edge agentic review pipeline (Claude + CodeRabbit autofix) - #224

Merged
ANcpLua merged 4 commits into
mainfrom
ci/agentic-review-pipeline
May 4, 2026
Merged

ci: bleeding-edge agentic review pipeline (Claude + CodeRabbit autofix)#224
ANcpLua merged 4 commits into
mainfrom
ci/agentic-review-pipeline

Conversation

@ANcpLua

@ANcpLua ANcpLua commented May 4, 2026

Copy link
Copy Markdown
Owner

Summary

Restores Claude Code Review (deleted in #222) using the bleeding-edge code-review@claude-code-plugins skill from Anthropic's plugin marketplace, plus a CodeRabbit autofix-trigger workflow that eliminates the manual "Push a commit to this branch" checkbox.

Files

  • .github/workflows/claude-code-review.yml (new) — PR auto-review on opened/synchronize/ready_for_review/reopened. Uses claude-code-action@v1 + the official code-review skill. Operating mode: agentic — Claude pushes mechanical fixes directly to the PR branch and escalates only structural concerns to humans.
  • .github/workflows/coderabbit-autofix.yml (new) — auto-comments @coderabbitai autofix on every PR open/sync. CodeRabbit then pushes its fix as a commit. No human click needed.
  • .coderabbit.yaml — fixes 3 silent YAML indent bugs at L41/55/185 (parser was likely dropping config from those points). Adds qyl-grade hardening: request_changes_workflow, fail_commit_status, auto_pause_after_reviewed_commits, ~30 explicit tool disables, issue_enrichment, knowledge_base.mcp. Adds path_instructions for rider-respect and release-pilot.

Safety mechanics

  • if: github.actor != 'coderabbitai[bot]' breaks Claude↔CodeRabbit ping-pong loops
  • concurrency: cancel-in-progress kills stale review runs when new pushes land
  • --max-turns 25 bounds compute per workflow run
  • paths-ignore skips lockfile/CHANGELOG-only changes
  • allowed_bots: 'dependabot[bot],renovate[bot]' lets bot PRs get reviewed safely
  • skip-review / skip-autofix label opt-outs for human override

Fork compatibility

Standard secret name (CLAUDE_CODE_OAUTH_TOKEN), zero if author == 'ANcpLua' gates. Anyone forking gets the same pipeline as soon as they set the secret.

Test plan

  • Workflow YAML parses (actionlint will fire via CodeRabbit)
  • Once merged, push to feat/rider-respect triggers Claude review
  • CodeRabbit autofix-trigger comment appears on next PR open
  • No infinite loop: Claude pushing a fix doesn't trigger CodeRabbit autofix → which doesn't re-trigger Claude

- claude-code-review.yml: PR auto-review using anthropics/claude-code-action@v1
  with the official `code-review@claude-code-plugins` skill. Loop-prevention
  via `if: github.actor != 'coderabbitai[bot]'`, concurrency cancels stale runs,
  paths-ignore filters lockfile/CHANGELOG noise. Operating mode: agentic — bot
  pushes mechanical fixes directly to PR branch, escalates structural concerns
  to humans. Bounded by `--max-turns 25` per run.
- coderabbit-autofix.yml: auto-comments `@coderabbitai autofix` on PR open/sync
  to remove the manual checkbox click. Skips bot-authored PRs and the
  `skip-autofix` label opt-out.
- .coderabbit.yaml: fix indent bugs at L41/55/185 (silent parser failures);
  port qyl-grade hardening (request_changes_workflow, fail_commit_status,
  auto_pause_after_reviewed_commits, ~30 explicit tool disables, issue_enrichment,
  knowledge_base.mcp). Add path_instructions for rider-respect and release-pilot.

Standard secret name (CLAUDE_CODE_OAUTH_TOKEN), zero owner-specific gates → forks work.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 4, 2026 18:43
@ANcpLua
ANcpLua enabled auto-merge (squash) May 4, 2026 18:43
@coderabbitai

coderabbitai Bot commented May 4, 2026

Copy link
Copy Markdown
Contributor

Caution

Review failed

Pull request was closed or merged during review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: e7a68b6e-8019-4da7-9b6a-793422289658

📥 Commits

Reviewing files that changed from the base of the PR and between f56b771 and cc358fe.

📒 Files selected for processing (1)
  • .github/workflows/claude-code-review.yml
📜 Recent review details
🧰 Additional context used
📓 Path-based instructions (1)
.github/workflows/**

⚙️ CodeRabbit configuration file

GitHub Actions workflows for CI, auto-merge, and AI code review. Review for: action version pinning (SHA for third-party, tags for first-party GitHub actions), proper secret handling (secrets via env: not inline, no secrets in logs), minimal permissions (principle of least privilege), proper concurrency groups on push-triggered workflows, and that security-sensitive inputs use env: variables to prevent code injection (CWE-94). Flag missing continue-on-error on non-critical steps. Flag workflows that could trigger infinite loops between AI agents.

Files:

  • .github/workflows/claude-code-review.yml
🔇 Additional comments (5)
.github/workflows/claude-code-review.yml (5)

17-17: id-token: write is unnecessary; remove it.

This was already flagged: the workflow uses claude_code_oauth_token authentication, bypassing OIDC. The permission violates least-privilege.


43-52: Action configuration is sound.

SHA-pinned third-party action, bounded --max-turns, allowed bots restricted to known dependency bots. No issues.


25-29: Loop-prevention guards are correct.

Both coderabbitai[bot] and github-actions[bot] are excluded, closing the self-retrigger loop from bot-authored commits. Label and title opt-outs provide human override.


53-75: Prompt is well-structured for agentic operation.

Decision tree clearly separates mechanical fixes (auto-commit) from structural concerns (escalate). References to repo config files (CLAUDE.md, AGENTS.md, .coderabbit.yaml path_instructions) establish authoritative invariants.


38-38: No action required. actions/checkout@v6 is the current stable release (v6.0.2, January 2026) and the correct action to use. Tag-based pinning is acceptable for first-party GitHub actions.

			> Likely an incorrect or invalid review comment.

Summary by CodeRabbit

  • Chores

    • Updated code-review configuration: expanded plugin-area labeling, refined auto-review rules, tightened pre-merge title checks, updated tool defaults, and enhanced knowledge-base and issue-enrichment settings for better PR analysis.
  • New Features

    • Added an automated code-review workflow powered by a review agent with skip controls, safe per-PR concurrency, and configurable plugin/tool settings.
    • Added an autofix-trigger workflow that posts autofix requests for eligible PRs with opt-out controls.

Walkthrough

Adds two GitHub Actions workflows: claude-code-review.yml (an agentic Claude-based PR reviewer that runs on PR events with actor/title/label opt-outs, concurrency per-PR, and a prompt-driven commit/comment decision tree) and coderabbit-autofix.yml (posts the @coderabbitai autofix trigger on PR open/synchronize, with actor and skip-autofix label guards). Substantially updates .coderabbit.yaml: expands labeling and path-specific instructions (new plugin areas and shell script rules), tightens pre-merge title examples, adjusts auto-review behavior and ignore lists, changes the tools enable/disable matrix to a smaller active toolset, enables pull-request knowledge-base scoping and MCP usage, and turns on issue auto-enrichment.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

🚥 Pre-merge checks | ✅ 9
✅ Passed checks (9 passed)
Check name Status Explanation
Title check ✅ Passed Title follows conventional commits format (ci:), includes scope (ci infrastructure), meets length requirement (71 chars < 72), and accurately summarizes the main change: adding Claude + CodeRabbit agentic review pipelines.
Description check ✅ Passed Description directly addresses the changeset: restores Claude Code Review, documents two new workflows and .coderabbit.yaml modifications, explains safety mechanics, and provides test plan—all aligned with the code changes.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Changelog Updated ✅ Passed PR contains only CI workflow and configuration changes with CHANGELOG.md proactively updated in [Unreleased] section.
No Hardcoded Absolute Paths ✅ Passed No hardcoded absolute paths found in changed files; documentation examples in .coderabbit.yaml are explicitly permitted.
No C# Or .Net Code ✅ Passed No C# source files or project files added; changes are configuration, documentation, and plugin metadata only.
Skill.Md Frontmatter Required ✅ Passed PR modifies only configuration and workflow files without adding or modifying SKILL.md files, satisfying the requirement.
Plugin Version And Marketplace Sync ✅ Passed PR contains only configuration and workflow file changes with no modifications to existing plugin code, satisfying the check condition.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Review rate limit: 2/5 reviews remaining, refill in 34 minutes and 49 seconds.

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

github-actions Bot commented May 4, 2026

Copy link
Copy Markdown
Contributor

@coderabbitai autofix

@coderabbitai

coderabbitai Bot commented May 4, 2026

Copy link
Copy Markdown
Contributor

Note

Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it.

Autofix skipped. No unresolved CodeRabbit review comments with fix instructions found.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Restores automated PR review for this plugin marketplace by reintroducing a Claude-driven review workflow, adding a CodeRabbit autofix trigger, and tightening CodeRabbit repository policy/configuration.

Changes:

  • Adds a new Claude Code review workflow intended to review PRs automatically and push mechanical fixes.
  • Adds a CodeRabbit autofix-trigger workflow that comments @coderabbitai autofix on PR updates.
  • Expands and hardens .coderabbit.yaml with new review behaviors, path instructions, and tool configuration.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 7 comments.

File Description
.github/workflows/coderabbit-autofix.yml New workflow that auto-comments on PRs to trigger CodeRabbit autofix.
.github/workflows/claude-code-review.yml New Claude review workflow for PR events with agentic/fix-forward behavior.
.coderabbit.yaml Updates CodeRabbit review policy, path instructions, auto-review settings, and tool toggles.

- name: Checkout PR head
uses: actions/checkout@v6
with:
ref: ${{ github.event.pull_request.head.ref }}
Comment on lines +42 to +45
uses: anthropics/claude-code-action@v1
with:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
allowed_bots: 'dependabot[bot],renovate[bot]'
Comment on lines +25 to +37
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: Comment "@coderabbitai autofix"
uses: actions/github-script@v7
with:
script: |
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
body: '@coderabbitai autofix'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Skipped: comment is from another GitHub bot.

Comment thread .coderabbit.yaml
# Stack: Markdown + YAML frontmatter (skills/commands/agents) + Shell (hooks/scripts)
# CI: claude plugin validate, shellcheck, markdownlint, actionlint, jq
# Scope: 13 plugins, 28 commands, 6 skills, 25 agents — NO C#/.NET code
# Scope: 16 plugins — NO C#/.NET code
Comment thread .coderabbit.yaml
Comment on lines +63 to +64
- label: area:rider-respect
instructions: Apply when the PR modifies files under plugins/rider-respect/.
Comment thread .coderabbit.yaml
Comment on lines +213 to +222
- path: plugins/rider-respect/**
instructions: >-
Rider IDE dry-run plugin. Review for: hard invariant that the skill
NEVER commits, pushes, merges, or suppresses (#pragma / NoWarn /
SuppressMessage). Scope must be captured BEFORE any git stash
(stash-after-scope ordering bug). Discard command must clean
untracked files (git clean -fd) since Rider refactors can create
new .cs files. Flag any "fix" that adds suppression rather than
rewriting the diagnostic.

Comment thread .coderabbit.yaml
Comment on lines +233 to +238
- path: plugins/**/bin/*.sh
instructions: >-
Shell scripts under plugin bin/ directories — executed by skills and
commands. Same shellcheck rules as scripts/. Pay special attention
to release-pilot/bin/ scripts which interact with git tags and
NuGet — flag any retag or tag-deletion logic.
coderabbitai[bot]
coderabbitai Bot previously requested changes May 4, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.coderabbit.yaml:
- Around line 481-482: Enable yamllint by setting the yamllint.enabled flag to
true in the .coderabbit.yaml config (replace the current "yamllint: enabled:
false" entry), or if you need to limit scope, change the yamllint config to true
and add excludes for directories where it causes noise; reference the yamllint
"enabled" key in the file to locate and update the setting so YAML frontmatter
and non-workflow YAML files are linted.

In @.github/workflows/claude-code-review.yml:
- Around line 42-48: Replace the third-party action tag with a pinned commit
SHA: update the uses entry that currently reads
"anthropics/claude-code-action@v1" to the specific commit SHA for that release
(e.g., "anthropics/claude-code-action@<SHA>") so the workflow uses an immutable
reference; keep the existing inputs (claude_code_oauth_token, allowed_bots,
track_progress, plugin_marketplaces, plugins) unchanged and verify the SHA by
running git ls-remote against the anthropics/claude-code-action repo before
committing.
- Line 44: Move the secret claude_code_oauth_token out of the action's with:
block and expose it via an env: mapping instead (e.g., set an env key like
CLAUDE_CODE_OAUTH_TOKEN = ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}), then update
the action invocation to read that environment variable rather than the with:
input; confirm the action used in this workflow supports reading the token from
process.env (if it does not, keep the with: input but add a short comment
explaining why and ensure logging/sanitization).

In @.github/workflows/coderabbit-autofix.yml:
- Around line 17-21: Update the workflow's conditional that filters actors in
the `if:` block to also exclude Claude by adding the check `github.actor !=
'claude[bot]'` alongside the existing actor checks (the block containing
`github.actor != 'coderabbitai[bot]'`, `github.actor != 'dependabot[bot]'`,
`github.actor != 'renovate[bot]'`) so the `anthropics/claude-code-action` pushes
won't trigger the autofix comment; keep the existing
`!contains(github.event.pull_request.labels.*.name, 'skip-autofix')` label check
intact.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: efcc1a8c-196a-4848-8360-03d981a47b65

📥 Commits

Reviewing files that changed from the base of the PR and between c683c55 and dac549f.

📒 Files selected for processing (3)
  • .coderabbit.yaml
  • .github/workflows/claude-code-review.yml
  • .github/workflows/coderabbit-autofix.yml
📜 Review details
🧰 Additional context used
📓 Path-based instructions (1)
.github/workflows/**

⚙️ CodeRabbit configuration file

GitHub Actions workflows for CI, auto-merge, and AI code review. Review for: action version pinning (SHA for third-party, tags for first-party GitHub actions), proper secret handling (secrets via env: not inline, no secrets in logs), minimal permissions (principle of least privilege), proper concurrency groups on push-triggered workflows, and that security-sensitive inputs use env: variables to prevent code injection (CWE-94). Flag missing continue-on-error on non-critical steps. Flag workflows that could trigger infinite loops between AI agents.

Files:

  • .github/workflows/coderabbit-autofix.yml
  • .github/workflows/claude-code-review.yml
🔇 Additional comments (7)
.github/workflows/coderabbit-autofix.yml (1)

29-38: LGTM.

The github-script action is first-party (tags acceptable), permissions are minimal, and the script uses GitHub-controlled context variables — no injection risk.

.coderabbit.yaml (4)

195-221: Path instructions for hookify, release-pilot, and rider-respect are well-structured.

The instructions capture critical invariants:

  • release-pilot: ghost-tag handling, bounded auto-fix, allowlist constraints
  • rider-respect: hard no-commit invariant, stash-after-scope ordering, clean untracked files

These match the pre_merge_checks.title.requirements scopes added at line 343.


387-490: Tools configuration is schema-compliant and stack-appropriate.

Enabled: shellcheck, actionlint, markdownlint, gitleaks, github-checks, ast-grep — matches the CI comment at line 5. All 30+ disabled tools are correctly set to enabled: false with valid schema keys.


524-525: MCP usage set to auto — disables for public repos.

If this is a public repo and MCP integration is desired, set usage: enabled. Current auto setting will disable MCP for public repositories per schema description.


527-535: Issue enrichment config is schema-compliant.

auto_enrich.enabled: true with auto_planning.enabled: false — enriches issues without auto-generating plans. labeling.auto_apply_labels: true enables label suggestions.

.github/workflows/claude-code-review.yml (2)

34-38: ⚡ Quick win

No action required — actions/checkout@v6 is the latest stable version.

v6.0.2 was released 2026-01-09 and is the current stable branch. Version pinning via tag is appropriate for first-party GitHub actions.

			> Likely an incorrect or invalid review comment.

49-49: ⚡ Quick win

claude-opus-4-7 is a valid current model identifier as of 2026. No change needed.

			> Likely an incorrect or invalid review comment.

Comment thread .coderabbit.yaml
Comment on lines +481 to +482
yamllint:
enabled: false

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial | 💤 Low value

yamllint disabled despite this being a YAML-heavy repo.

Disabled at line 482, but the repo contains .coderabbit.yaml, workflow files, and plugin YAML frontmatter. actionlint covers workflow YAML; general YAML linting could catch frontmatter issues in SKILL.md files.

Not blocking — actionlint + markdownlint likely sufficient. Flag if YAML frontmatter errors slip through.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.coderabbit.yaml around lines 481 - 482, Enable yamllint by setting the
yamllint.enabled flag to true in the .coderabbit.yaml config (replace the
current "yamllint: enabled: false" entry), or if you need to limit scope, change
the yamllint config to true and add excludes for directories where it causes
noise; reference the yamllint "enabled" key in the file to locate and update the
setting so YAML frontmatter and non-workflow YAML files are linted.

Comment thread .github/workflows/claude-code-review.yml Outdated
Comment thread .github/workflows/claude-code-review.yml Outdated
Comment on lines +17 to +21
if: |
github.actor != 'coderabbitai[bot]' &&
github.actor != 'dependabot[bot]' &&
github.actor != 'renovate[bot]' &&
!contains(github.event.pull_request.labels.*.name, 'skip-autofix')

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check what actor identity anthropic's action typically uses
# by looking at recent PR activity or action documentation
gh api repos/anthropics/claude-code-action/readme --jq '.content' | base64 -d | grep -i "bot\|actor\|identity" || echo "No direct mention found in README"

Repository: ANcpLua/ancplua-claude-plugins

Length of output: 166


🏁 Script executed:

# First, examine the full workflow file to see complete context
cat -n .github/workflows/coderabbit-autofix.yml

Repository: ANcpLua/ancplua-claude-plugins

Length of output: 1652


🌐 Web query:

anthropics/claude-code-action GitHub actor identity bot username

💡 Result:

The Claude Code GitHub Action’s default bot identity is: - Username: claude[bot] - GitHub user ID (bot_id): 209825114 In anthropics/claude-code-action, the action input bot_name defaults to claude[bot], and the relevant bot user ID shown for claude[bot] is 209825114. (There’s also documentation/issues noting a historical mismatch where the bot_id default may have been set incorrectly to the github-actions[bot] ID, but the intended claude bot username is still claude[bot].)

Citations:


Add claude[bot] to the exclusion list to prevent redundant autofix comments.

When Claude pushes a fix via anthropics/claude-code-action, the synchronize event triggers this workflow and posts another @coderabbitai autofix comment because Claude's actor (claude[bot]) is not excluded.

Add the condition: github.actor != 'claude[bot]'

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/coderabbit-autofix.yml around lines 17 - 21, Update the
workflow's conditional that filters actors in the `if:` block to also exclude
Claude by adding the check `github.actor != 'claude[bot]'` alongside the
existing actor checks (the block containing `github.actor !=
'coderabbitai[bot]'`, `github.actor != 'dependabot[bot]'`, `github.actor !=
'renovate[bot]'`) so the `anthropics/claude-code-action` pushes won't trigger
the autofix comment; keep the existing
`!contains(github.event.pull_request.labels.*.name, 'skip-autofix')` label check
intact.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: dac549f8a7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +44 to +45
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
allowed_bots: 'dependabot[bot],renovate[bot]'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Skip Claude review on fork/Dependabot pull_request runs

This job always runs on pull_request, but in forked PR contexts (including Dependabot PRs) GitHub does not provide repository secrets and downgrades write scopes, so claude_code_oauth_token is unavailable and the agentic write path fails. The result is a consistently failing review check for those PRs instead of a clean skip; add a guard for forked heads/Dependabot or gate on token availability before invoking the action.

Useful? React with 👍 / 👎.

Comment on lines +17 to +21
if: |
github.actor != 'coderabbitai[bot]' &&
github.actor != 'dependabot[bot]' &&
github.actor != 'renovate[bot]' &&
!contains(github.event.pull_request.labels.*.name, 'skip-autofix')

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Prevent autofix comment job from running on forked PRs

This condition excludes a few bot actors but still runs on external fork PRs, where pull_request workflows use a read-only token and cannot create comments; issues.createComment then fails with a permissions error, leaving noisy red CI on contributor PRs. Add a fork check (or switch to a safe pull_request_target pattern) so the workflow skips when comment write access is unavailable.

Useful? React with 👍 / 👎.

…utofix)

Addresses CodeRabbit findings on this PR (also applied across all 6 PRs in the
ecosystem rollout, which collectively introduced the same pattern violations):

1. Pin anthropics/claude-code-action@v1 to commit SHA fefa07e9c665b7320f08c3b525980457f22f58aa per the
   '.coderabbit.yaml' path_instructions for .github/workflows/** ('Pin third-
   party actions to SHA. First-party (actions/*) tag-pin OK'). Renovate will
   bump the SHA on new releases.
2. Move CLAUDE_CODE_OAUTH_TOKEN to job-level env: mapping rather than inline
   with:, per the same path_instructions ('Secrets via env: not inline').

Self-correction via the agentic loop: the policy in .coderabbit.yaml flagged
my own workflow files written under that policy. Working as designed.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented May 4, 2026

Copy link
Copy Markdown
Contributor

@coderabbitai autofix

@coderabbitai

coderabbitai Bot commented May 4, 2026

Copy link
Copy Markdown
Contributor

Note

Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it.

⛔ CodeRabbit does not have permission to push changes to this repository. Please ensure CodeRabbit has Contents: Read and write permission.

coderabbitai[bot]
coderabbitai Bot previously requested changes May 4, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/claude-code-review.yml:
- Line 5: The workflow is self-retriggering because it runs on synchronize and
the action itself pushes commits as github-actions[bot]; update the job-level
guard condition (the existing if: guard that checks event/branch/actor around
the push step) to also require github.actor != 'github-actions[bot]' so
bot-authored commits do not re-enter the workflow; add the expression
github.actor != 'github-actions[bot]' to the same conditional (preserving
existing checks) to block runs triggered by the bot.
- Around line 13-19: Remove the unnecessary id-token: write permission from the
workflow permissions block (delete the id-token: write entry) while retaining
actions: read so agentic mode can access workflow run data/logs; ensure the
permissions block still includes contents: write, pull-requests: write, issues:
write and actions: read as shown and that the workflow continues to use
claude_code_oauth_token authentication.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 0015f3d0-6030-4a6e-baa4-451cef9a1463

📥 Commits

Reviewing files that changed from the base of the PR and between dac549f and f56b771.

📒 Files selected for processing (1)
  • .github/workflows/claude-code-review.yml
📜 Review details
🧰 Additional context used
📓 Path-based instructions (1)
.github/workflows/**

⚙️ CodeRabbit configuration file

GitHub Actions workflows for CI, auto-merge, and AI code review. Review for: action version pinning (SHA for third-party, tags for first-party GitHub actions), proper secret handling (secrets via env: not inline, no secrets in logs), minimal permissions (principle of least privilege), proper concurrency groups on push-triggered workflows, and that security-sensitive inputs use env: variables to prevent code injection (CWE-94). Flag missing continue-on-error on non-critical steps. Flag workflows that could trigger infinite loops between AI agents.

Files:

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

Comment thread .github/workflows/claude-code-review.yml
Comment on lines +13 to +19
permissions:
contents: write
pull-requests: write
issues: write
id-token: write
actions: read

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🌐 Web query:

Does anthropics/claude-code-action require GitHub Actions permission id-token: write to function, or can it run without OIDC permissions?

💡 Result:

No, anthropics/claude-code-action does not require GitHub Actions permission id-token: write to function. It can run without OIDC permissions by providing a github_token input, which bypasses the default OIDC-based authentication flow that uses the Claude GitHub App. The default authentication uses OIDC to exchange for a short-lived GitHub App token via Anthropic's endpoint (https://api.anthropic.com/api/github/github-app-token-exchange). This requires id-token: write in the workflow permissions, as explicitly stated in the official FAQ: "If you're using the default GitHub App authentication, you must add the id-token: write permission to your workflow" (result 4). However, the action supports an alternative: pass a custom GitHub token (e.g., generated via actions/create-github-app-token or ${{ secrets.GITHUB_TOKEN }}) using the github_token input. This skips OIDC entirely: "If you wish to not use the GitHub app, you can instead provide a github_token input to the action for Claude to operate with" (result 4). The action.yml confirms github_token as an optional input: "GitHub token for Claude to operate with. Only include this if you're connecting a custom GitHub app of your own!" (results 17, 19, 63). Workflow examples in the repo use ${{ secrets.GITHUB_TOKEN }} without id-token: write (result 17). Issues confirm workarounds like generating app tokens manually and passing github_token to avoid OIDC failures (results 9, 10, 60). Note: Using ${{ secrets.GITHUB_TOKEN }} inherits the workflow's declared permissions (e.g., contents: write), so ensure they match the action's needs (contents, issues, pull-requests read/write). Custom tokens require appropriate repo scopes.

Citations:


🏁 Script executed:

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

Repository: ANcpLua/ancplua-claude-plugins

Length of output: 3729


🌐 Web query:

anthropics/claude-code-action claude_code_oauth_token authentication flow id-token requirement

💡 Result:

For the official anthropics/claude-code-action, there is NO “id-token required” requirement specifically for claude_code_oauth_token authentication. Instead, the action’s OAuth-token support (claude_code_oauth_token) is an alternative to using an Anthropic API key, and you pass the token as an action input: - claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} (under the with: block, not env:) The id-token (GitHub Actions OIDC token) is required only when you’re using the default Claude GitHub App authentication flow (OIDC token exchange). The action docs/FAQ state that id-token: write is required for OIDC authentication so the Claude GitHub app can function. Key points about the authentication flows: 1) claude_code_oauth_token flow (Anthropic “Claude Code OAuth token”) - Configure: use with: claude_code_oauth_token: ... - Do NOT set CLAUDE_CODE_OAUTH_TOKEN in env; that can break validation because the token won’t be present to the base action. 2) Default GitHub App / OIDC flow (GitHub App token exchange) - Requires workflow permission id-token: write so the action can request an OIDC token. - If your workflow trigger/event makes the OIDC exchange fail (e.g., pull_request_target), you can see “Invalid OIDC token” errors. - If you don’t provide a github_token (custom GitHub token / app token generation), some OAuth-token setups can still attempt the GitHub App OIDC exchange first and fail until github_token is provided. So: claude_code_oauth_token does not imply an id-token requirement; id-token is tied to the GitHub App OIDC exchange path, not the Anthropic OAuth token path. Example workflow snippet (OAuth token as an input): - uses: anthropics/claude-code-action@v1 with: claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} prompt: "Review this PR" Example permissions when you are using OIDC/GitHub App auth: permissions: contents: read id-token: write

Citations:


🌐 Web query:

anthropics/claude-code-action required GitHub Actions permissions contents pull-requests issues actions

💡 Result:

Required GitHub Actions permissions for anthropics/claude-code-action (to let Claude Code read workflow run data/logs for PRs/issues) 1) Minimum repository permissions the Claude Code GitHub App uses (no “actions” access yet) - Contents: read & write - Pull Requests: read & write - Issues: read & write These are the “currently used” permissions for the Claude Code GitHub App. 2) GitHub Actions “actions” permission (what you need to analyze CI results/logs) - Add actions: read to your workflow/job permissions so the token can read workflow run data and logs. - Example job permissions from the action docs: permissions: contents: write pull-requests: write issues: write actions: read 3) How to express this with the action (additional_permissions) - Configure the action with additional_permissions containing actions: read. 4) Important nuance: “GitHub App token” vs “GITHUB_TOKEN” - The docs note the GitHub App can be prevented from triggering this action by other bots/apps for security, and that the app receives a short-lived token scoped to the repository. - For workflow run feedback (the “actions: read” capability), you must ensure the token used in your setup has actions: read as described above. 5) Related/adjacent permissions mentioned (not required for the core “actions: read” use case) - The action docs list additional permissions planned for future features: Actions (read) and Checks (read), Workflows (read & write). “Actions (Read)” is specifically called out as enabling access to workflow run data and logs. Answering your keywords directly - “contents pull-requests issues actions”: use contents (read/write or write depending on your needs), pull-requests (read/write), issues (read/write), and add actions: read to let Claude Code read workflow run data/logs. - “required … actions permissions contents pull-requests issues actions”: the action currently uses contents/PRs/issues read+write; actions: read is the extra permission required for workflow-run feedback.

Citations:


Remove id-token: write; keep actions: read for agentic mode.

id-token: write is unnecessary because the workflow uses claude_code_oauth_token authentication, which bypasses GitHub App OIDC. However, actions: read is required for the agentic mode to analyze workflow run data and logs.

Suggested fix
 permissions:
   contents: write
   pull-requests: write
   issues: write
-  id-token: write
   actions: read
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/claude-code-review.yml around lines 13 - 19, Remove the
unnecessary id-token: write permission from the workflow permissions block
(delete the id-token: write entry) while retaining actions: read so agentic mode
can access workflow run data/logs; ensure the permissions block still includes
contents: write, pull-requests: write, issues: write and actions: read as shown
and that the workflow continues to use claude_code_oauth_token authentication.

Closes the self-retrigger loop CodeRabbit identified: when claude-code-action
pushes a mechanical fix to the PR branch, the commit is authored by
github-actions[bot]. Without this guard, the synchronize event re-fires the
workflow on the bot's own push, potentially looping until --max-turns kicks in.

Now skips runs where the triggering actor is github-actions[bot] in addition
to coderabbitai[bot]. Real human pushes still trigger review normally.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 4, 2026 19:46
@github-actions

github-actions Bot commented May 4, 2026

Copy link
Copy Markdown
Contributor

@coderabbitai autofix

@coderabbitai

coderabbitai Bot commented May 4, 2026

Copy link
Copy Markdown
Contributor

Note

Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it.

⛔ CodeRabbit does not have permission to push changes to this repository. Please ensure CodeRabbit has Contents: Read and write permission.

@github-actions

github-actions Bot commented May 4, 2026

Copy link
Copy Markdown
Contributor

@coderabbitai autofix

@coderabbitai

coderabbitai Bot commented May 4, 2026

Copy link
Copy Markdown
Contributor

Note

Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it.

⛔ CodeRabbit does not have permission to push changes to this repository. Please ensure CodeRabbit has Contents: Read and write permission.

@ANcpLua
ANcpLua dismissed stale reviews from coderabbitai[bot] and coderabbitai[bot] May 4, 2026 19:48

Stale: addressed in subsequent commits.

@ANcpLua
ANcpLua merged commit 4dfb7f5 into main May 4, 2026
12 checks passed
@ANcpLua
ANcpLua deleted the ci/agentic-review-pipeline branch May 4, 2026 19:48
@ANcpLua
ANcpLua removed the request for review from Copilot May 4, 2026 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants