Skip to content

fix(claude-assistant): remove actions: read from GITHUB_TOKEN permissions - #12

Merged
twistedmelonman merged 2 commits into
mainfrom
claude/fix-actions-read-startup-failure-20260309
Mar 9, 2026
Merged

fix(claude-assistant): remove actions: read from GITHUB_TOKEN permissions#12
twistedmelonman merged 2 commits into
mainfrom
claude/fix-actions-read-startup-failure-20260309

Conversation

@twistedmelonman

@twistedmelonman twistedmelonman commented Mar 9, 2026

Copy link
Copy Markdown
Member

Root cause

claude-assistant.yml requested actions: read in its permissions: block. This permission is not included in GitHub's default read-only GITHUB_TOKEN scope. When a reusable workflow requests a scope the caller cannot provide, GitHub fails the entire run with startup_failure before creating any jobs — producing zero check runs and no log output.

This affected every consumer repo that deployed the thin caller (all 9 repos), causing all Claude Code workflow runs to fail silently with startup_failure.

Changes

claude-assistant.yml

  • Remove actions: read from permissions: — this was the root cause of startup_failure
  • Claude still reads CI results via additional_permissions: actions: read passed to claude-code-action, which handles it through the action's own authentication, not GITHUB_TOKEN
  • Update usage comment to show callers should include an explicit permissions: block

claude.yml (this repo's own thin caller)

  • Add explicit permissions: block — addresses security/code-scanning alert Add Claude Code GitHub Workflow #1 (actions/missing-workflow-permissions)
  • Includes id-token: write required by claude-code-action for internal authentication

After merge

  1. Advance v1 tag to HEAD — all consumer repos pick up the fix automatically via @v1
  2. Update 9 consumer repos' claude.yml thin callers to add the permissions: block (addresses the same scanner finding across all repos)

🤖 Generated with Claude Code

…ions

The actions: read permission is not included in the default read-only
GITHUB_TOKEN scope even when default_workflow_permissions is 'read'.
When a reusable workflow requests a permission the caller cannot provide
through its inherited defaults, GitHub fails the entire workflow run
with startup_failure before creating any jobs.

Removing actions: read from the permissions block fixes startup_failure
across all consumer repos without requiring changes to any caller.

Claude can still read CI results via the claude-code-action's own
authentication (additional_permissions: actions: read remains, which
the action handles through its own auth, not the GITHUB_TOKEN).

Fixes: consistent startup_failure on all Claude Code workflow triggers

AI review: pending pre-commit hook
Add permissions block to claude.yml (the github-workflows repo's own
thin caller) and update the usage comment in claude-assistant.yml to
show callers should include it.

Explicit permissions are required because:
- GitHub Actions security scanner flags callers without explicit scopes
- id-token: write is needed by claude-code-action for internal auth
- Without it, the caller inherits default read-only scopes but without
  the explicit declaration that makes the security scanner happy

Addresses security/code-scanning alert #1 (actions/missing-workflow-permissions).
@twistedmelonman
twistedmelonman merged commit 12a73ab into main Mar 9, 2026
4 checks passed
@twistedmelonman
twistedmelonman deleted the claude/fix-actions-read-startup-failure-20260309 branch March 9, 2026 16:53
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.

1 participant