Skip to content

ci: restore required permissions for the Features reusable workflow#679

Open
emptyhammond wants to merge 1 commit into
mainfrom
fix/features-workflow-permissions
Open

ci: restore required permissions for the Features reusable workflow#679
emptyhammond wants to merge 1 commit into
mainfrom
fix/features-workflow-permissions

Conversation

@emptyhammond

Copy link
Copy Markdown
Contributor

Context

PR #678 (GitHub Actions workflow security cleanup) added a top-level permissions: {} to features.yml and granted the build job only contents: read.

That build job calls the reusable workflow ably/features/.github/workflows/sdk-features.yml@main, whose job declares it needs:

permissions:
  deployments: write
  id-token: write

For reusable workflows, the caller's job permissions cap what the called workflow receives — a called workflow cannot elevate beyond what the caller grants. With the caller capped at contents: read, the reusable workflow lost id-token: write (used by aws-actions/configure-aws-credentials for OIDC) and deployments: write (used by ably/sdk-upload-action), producing an invisible failure at workflow startup. The Features workflow is currently broken on main.

Flagged by @VeskeR on ably/ably-dotnet#1328 and observed failing on ably-python run 26639799574, as well as ably-js and ably-dotnet.

Change

Grant the two missing scopes on the calling job. Top-level permissions: {} is left intact.

  build:
    permissions:
      contents: read       # checkout
      deployments: write   # ably/sdk-upload-action
      id-token: write      # aws-actions/configure-aws-credentials (OIDC)
    uses: ably/features/.github/workflows/sdk-features.yml@main

Follow-up

The same one-line fix is needed in sibling SDK repos (ably-js, ably-dotnet, possibly others). Out of scope for this PR.

🤖 Generated with Claude Code

The build job in features.yml calls the reusable workflow
ably/features/.github/workflows/sdk-features.yml@main, whose job
requires deployments: write and id-token: write. After #678 scoped
the caller job to only contents: read, those scopes were stripped
(a reusable workflow cannot elevate beyond what the caller grants),
causing an invisible failure at workflow startup.

Grant the two missing scopes on the calling job so OIDC
(aws-actions/configure-aws-credentials) and the sdk-upload-action
work again. Top-level permissions: {} is left intact.

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

coderabbitai Bot commented Jun 25, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@emptyhammond, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 58 minutes and 25 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 5d7eea8e-3108-4252-9ab4-b25adaaa33e5

📥 Commits

Reviewing files that changed from the base of the PR and between 7579682 and 3601a8c.

📒 Files selected for processing (1)
  • .github/workflows/features.yml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/features-workflow-permissions

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant