Skip to content

fix(ci): publish workflow permissions — top-level permissions: {} blocks OIDC#76

Merged
nmccready merged 1 commit intomainfrom
fix/publish-permissions
Mar 19, 2026
Merged

fix(ci): publish workflow permissions — top-level permissions: {} blocks OIDC#76
nmccready merged 1 commit intomainfrom
fix/publish-permissions

Conversation

@nmccready-tars
Copy link
Contributor

Problem

PR #75 added permissions: {} at the top level of publish.yml to satisfy CodeQL security warnings. But permissions: {} means zero permissions for all jobs — job-level permissions can only narrow the top-level scope, never widen it.

This caused a startup_failure on every tag push since v0.1.43+.

Root Cause

permissions: {}  # ← blocks everything

jobs:
  publish-npm:
    permissions:
      id-token: write  # ← can't exceed {} — rejected

GitHub rejects the workflow before it even starts because the job requests more than the workflow allows.

Fix

Set top-level permissions to the minimum needed across all jobs:

permissions:
  contents: read
  id-token: write

Each job still declares its own minimal permissions.

Testing

After merge, re-tag v0.1.48 (or bump to v0.1.49) to trigger a publish.

@nmccready nmccready merged commit 2960cd2 into main Mar 19, 2026
4 checks passed
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