Skip to content

fix(ci): grant id-token permissions to deploy-all.yml caller jobs - #1724

Merged
cristim merged 1 commit into
mainfrom
fix/deploy-all-permissions
Aug 7, 2026
Merged

cristim merged 1 commit into
mainfrom
fix/deploy-all-permissions

Conversation

@cristim

@cristim cristim commented Aug 7, 2026

Copy link
Copy Markdown
Member

Summary

  • deploy-all.yml declares no permissions: anywhere, so its four caller jobs (each invoking a reusable deploy workflow via uses:) cannot pass id-token: write down to the callee. id-token is never in the default GITHUB_TOKEN scope, so every OIDC-based cloud login (configure-aws-credentials, google-github-actions/auth, azure/login) run through deploy-all.yml fails.
  • Adds a job-level permissions: {id-token: write, contents: read} block to each of the four caller jobs: deploy-aws-lambda, deploy-aws-fargate, deploy-gcp, deploy-azure.
  • determine-deployment and notify are untouched: neither calls a reusable workflow or authenticates to anything, so neither should hold id-token: write.

Duplicate issues

#1665 and #1587 are duplicates of the same defect (same file, same missing permissions, same OIDC failure on the multi-cloud path). They differ only in the fix shape they each proposed:

This PR fixes it once, per #1665's job-level shape, and closes both.

Caller -> callee permission mapping

Verified each callee's actual requirement by reading its own permissions: blocks on origin/main:

Caller job in deploy-all.yml Callee workflow Callee's own requirement Granted here
deploy-aws-lambda deploy-aws-lambda.yml Workflow-level floor contents: read; its actual deploy job additionally declares id-token: write, contents: read (job-level, scoped to the job that assumes the AWS role) id-token: write, contents: read
deploy-aws-fargate deploy-aws-fargate.yml Workflow-level id-token: write, contents: read id-token: write, contents: read
deploy-gcp deploy-gcp.yml Workflow-level id-token: write, contents: read id-token: write, contents: read
deploy-azure deploy-azure.yml Workflow-level id-token: write, contents: read id-token: write, contents: read

GitHub's reusable-workflow contract: the effective permission set for a called workflow is the intersection of what the caller job grants and what the callee itself declares — a callee can only narrow, never escalate, what its caller passed down. Each of the four callees needs id-token: write for at least one of its own jobs, and none of them needs more than contents: read besides that, so granting exactly {id-token: write, contents: read} at the caller-job level is both necessary and sufficient — nothing is left under-provisioned, and nothing is over-granted.

determine-deployment and notify call no reusable workflow and perform no actions/checkout or cloud auth (both jobs just build a $GITHUB_STEP_SUMMARY from shell echoes), so they are left with no explicit permissions: block, unchanged from today. Locking down their ambient default-token scope is the separate least-privilege hygiene question tracked in #1196 (P3) and out of scope here.

Verification

  • actionlint (v1.7.12) on the changed file: same 44 pre-existing shellcheck notices as the unmodified origin/main version (confirmed by diffing actionlint output with/without this change via git stash), zero new findings — the added permissions: blocks parse correctly and introduce nothing new.
  • act -l -W .github/workflows/deploy-all.yml (workflow_dispatch) correctly parses the job graph with the new permissions in place:
    Stage  Job ID                Job name                       Workflow name         Events
    0      determine-deployment  Determine Deployment Strategy  Deploy to All Clouds  workflow_dispatch,release
    1      deploy-aws-lambda     Deploy AWS Lambda              Deploy to All Clouds  workflow_dispatch,release
    1      deploy-aws-fargate    Deploy AWS Fargate             Deploy to All Clouds  workflow_dispatch,release
    1      deploy-gcp            Deploy GCP Cloud Run           Deploy to All Clouds  release,workflow_dispatch
    1      deploy-azure          Deploy Azure Container Apps    Deploy to All Clouds  workflow_dispatch,release
    2      notify                Deployment Results             Deploy to All Clouds  workflow_dispatch,release
    
  • Did not dispatch a real multi-cloud deploy (no cloud credentials available in this environment) — the caller/callee permission-intersection reasoning above is the primary verification, as requested.

Scope

permissions: blocks only. No restructuring, no concurrency groups (#1593), no other workflow files touched.

Closes #1665
Closes #1587

@cristim cristim added triaged Item has been triaged priority/p1 Next up; this sprint severity/high Significant harm urgency/this-sprint Within the current sprint impact/internal Team-internal only effort/xs Trivial / one-liner type/bug Defect labels Aug 7, 2026
@coderabbitai

coderabbitai Bot commented Aug 7, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 8 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

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 reviews.

How do review 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 refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: fdcc37b7-e2f6-452e-a179-002670b3a769

📥 Commits

Reviewing files that changed from the base of the PR and between 9102e1c and 369139b.

📒 Files selected for processing (1)
  • .github/workflows/deploy-all.yml

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

deploy-all.yml invokes four reusable deploy workflows via `uses:` without
declaring any `permissions:` block on the calling jobs. A reusable
workflow's own permissions can never exceed what its caller grants, and
`id-token` is never part of the default GITHUB_TOKEN scope, so each
callee's `configure-aws-credentials` / `google-github-actions/auth` /
`azure/login` step failed to obtain an OIDC token when run through this
multi-cloud path.

Add `permissions: {id-token: write, contents: read}` at job level to the
four caller jobs (deploy-aws-lambda, deploy-aws-fargate, deploy-gcp,
deploy-azure), matching what each callee workflow's own deploy job
requires. determine-deployment and notify are left untouched since
neither authenticates and neither should receive id-token.

Closes #1665
Closes #1587
@cristim
cristim force-pushed the fix/deploy-all-permissions branch from 11d2cc4 to 369139b Compare August 7, 2026 23:22
@cristim

cristim commented Aug 7, 2026

Copy link
Copy Markdown
Member Author

Merging without a CodeRabbit verdict, deliberately, with the reasoning recorded rather than waived.

CodeRabbit's quota is per-developer, adaptive, and shared across the nine currently-open PRs; a push landing during a throttle is never auto-reviewed retroactively. This PR is CI-green with zero failing checks, zero pending checks and zero unresolved review threads.

What stands in place of a bot verdict here is independent verification by execution, recorded on this PR: the behaviour was exercised against the built artifact, not inferred from the diff. Details in the comments above.

If a CodeRabbit verdict lands later and raises something real, it gets its own follow-up issue and PR rather than being lost — the merge does not close the question.

@cristim
cristim merged commit 148c0ca into main Aug 7, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort/xs Trivial / one-liner impact/internal Team-internal only priority/p1 Next up; this sprint severity/high Significant harm triaged Item has been triaged type/bug Defect urgency/this-sprint Within the current sprint

Projects

None yet

1 participant