Skip to content

🔧 chore: grant write permissions to Claude Code Action workflow#13173

Merged
arvinxx merged 1 commit into
canaryfrom
chore/claude-workflow-permissions
Mar 21, 2026
Merged

🔧 chore: grant write permissions to Claude Code Action workflow#13173
arvinxx merged 1 commit into
canaryfrom
chore/claude-workflow-permissions

Conversation

@arvinxx

@arvinxx arvinxx commented Mar 21, 2026

Copy link
Copy Markdown
Member

Summary

  • Upgrade contents, pull-requests, issues permissions from read to write so Claude Code can push branches and create PRs
  • Add Bash(git:*) and Bash(gh:*) to allowed tools

Context

Claude Code Action was failing with 403 when trying to push fix branches because the workflow only had read permissions.

🤖 Generated with Claude Code

Allow Claude Code to push branches and create PRs by upgrading
contents/pull-requests/issues permissions from read to write,
and adding git/gh to allowed tools.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Mar 21, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
lobehub Ready Ready Preview, Comment Mar 21, 2026 6:08am

Request Review

@sourcery-ai sourcery-ai 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.

We've reviewed this pull request using the Sourcery rules engine

@lobehubbot

Copy link
Copy Markdown
Member

@nekomeowww - This is a workflow/DevOps change (GitHub Actions permissions). Please take a look.

@codecov

codecov Bot commented Mar 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.29%. Comparing base (48c3f0c) to head (5dbccec).

Additional details and impacted files
@@           Coverage Diff           @@
##           canary   #13173   +/-   ##
=======================================
  Coverage   74.29%   74.29%           
=======================================
  Files        1531     1531           
  Lines      125714   125714           
  Branches    16516    16516           
=======================================
  Hits        93396    93396           
  Misses      32207    32207           
  Partials      111      111           
Flag Coverage Δ
app 67.29% <ø> (ø)
database 97.89% <ø> (ø)
packages/agent-runtime 89.60% <ø> (ø)
packages/context-engine 83.53% <ø> (ø)
packages/conversation-flow 92.36% <ø> (ø)
packages/file-loaders 87.02% <ø> (ø)
packages/memory-user-memory 66.68% <ø> (ø)
packages/model-bank 99.84% <ø> (ø)
packages/model-runtime 84.77% <ø> (ø)
packages/prompts 74.60% <ø> (ø)
packages/python-interpreter 92.90% <ø> (ø)
packages/ssrf-safe-fetch 0.00% <ø> (ø)
packages/utils 90.09% <ø> (ø)
packages/web-crawler 88.81% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
Store 66.07% <ø> (ø)
Services 49.88% <ø> (ø)
Server 69.01% <ø> (ø)
Libs 42.20% <ø> (ø)
Utils 91.41% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@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: 5dbccec113

ℹ️ 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".

# These tools are restricted to code analysis and build operations only
claude_args: |
--allowedTools "Bash(bun run:*),Bash(pnpm run:*),Bash(npm run:*),Bash(npx:*),Bash(bunx:*),Bash(vitest:*),Bash(rg:*),Bash(find:*),Bash(sed:*),Bash(grep:*),Bash(awk:*),Bash(wc:*),Bash(xargs:*)"
--allowedTools "Bash(git:*),Bash(gh:*),Bash(bun run:*),Bash(pnpm run:*),Bash(npm run:*),Bash(npx:*),Bash(bunx:*),Bash(vitest:*),Bash(rg:*),Bash(find:*),Bash(sed:*),Bash(grep:*),Bash(awk:*),Bash(wc:*),Bash(xargs:*)"

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 Remove unrestricted gh commands from Claude's allowlist

Bash(gh:*) opens a direct privilege-escalation path in this workflow. I checked the GitHub CLI manual: gh auth token prints the current authentication token, and gh api makes authenticated API requests (defaulting to POST once fields are provided). Since this job is invoked from issue/review text and the same commit also upgrades .github/workflows/claude.yml lines 22-24 to contents/issues/pull-requests: write, a prompt-injected issue or PR can now coerce Claude into leaking the repo token or performing arbitrary writes through GitHub's API. Please keep gh disallowed here or whitelist only the exact subcommands you need.

Useful? React with 👍 / 👎.

@arvinxx arvinxx merged commit b97c33a into canary Mar 21, 2026
35 checks passed
@arvinxx arvinxx deleted the chore/claude-workflow-permissions branch March 21, 2026 06:39
@lobehubbot

Copy link
Copy Markdown
Member

❤️ Great PR @arvinxx ❤️

The growth of project is inseparable from user feedback and contribution, thanks for your contribution! If you are interesting with the lobehub developer community, please join our discord and then dm @arvinxx or @canisminor1990. They will invite you to our private developer channel. We are talking about the lobe-chat development or sharing ai newsletter around the world.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants