Skip to content

Grant CI workflows the write scopes Dependabot PRs need - #2553

Merged
myieye merged 5 commits into
developfrom
claude/dependabot-pr-permissions-f23c15
Aug 14, 2026
Merged

Grant CI workflows the write scopes Dependabot PRs need#2553
myieye merged 5 commits into
developfrom
claude/dependabot-pr-permissions-f23c15

Conversation

@myieye

@myieye myieye commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator

The main risk of this PR is probably that images can be pushed with arbitrary package versions.

Dependabot runs get a read-only GITHUB_TOKEN unless the workflow asks for more, and none of these workflows declared permissions at all. So every Dependabot PR died at the first step needing write access: 403 Resource not accessible by integration on POST /check-runs, and no packages scope for the ghcr.io push.

Also makes dependabot ignore mcr.microsoft.com/dotnet/runtime majors in /backend/FwHeadless, because ChorusMerge needs 8.0 (see #2554 & #2521).

Dependabot-triggered runs get a read-only GITHUB_TOKEN unless the workflow
declares permissions, so every Dependabot PR failed at the first step that
needed write access: publish-unit-test-result-action and eslint-annotate-action
got 403 on POST /check-runs, and the ghcr.io image push had no packages scope.

Permissions can only be narrowed down a reusable-workflow chain, so the callers
have to grant at least what the called workflow asks for.

Also stop Dependabot from touching the FwHeadless dotnet8 stage: it "bumps"
8.0 to 10.0 by deleting the stage, which leaves COPY --from=dotnet8 resolving
to a non-existent docker.io/library/dotnet8 image (#2521).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 804adbd9-44e2-442f-af0e-fbb1b30dd912

📥 Commits

Reviewing files that changed from the base of the PR and between 5ceed7b and 42459d5.

📒 Files selected for processing (9)
  • .github/dependabot.yml
  • .github/workflows/deploy-branch.yaml
  • .github/workflows/develop-api.yaml
  • .github/workflows/develop-fw-headless.yaml
  • .github/workflows/develop-ui.yaml
  • .github/workflows/lexbox-api.yaml
  • .github/workflows/lexbox-fw-headless.yaml
  • .github/workflows/lexbox-hgweb.yaml
  • .github/workflows/lexbox-ui.yaml

📝 Walkthrough

Walkthrough

The PR adds a Dependabot ignore rule for the headless firmware runtime image and declares explicit permissions for build, validation, deployment, and package-publishing GitHub Actions jobs.

Changes

CI configuration

Layer / File(s) Summary
Docker dependency update policy
.github/dependabot.yml
Dependabot ignores updates to mcr.microsoft.com/dotnet/runtime for /backend/FwHeadless.
Build workflow permissions
.github/workflows/deploy-branch.yaml, .github/workflows/develop-*.yaml
Build and lint jobs declare explicit contents, checks, and package permissions.
Publishing workflow permissions
.github/workflows/lexbox-*.yaml
Publishing jobs declare explicit permissions for repository contents, checks, and GitHub Packages access.

Estimated code review effort: 2 (Simple) | ~10 minutes

Mergeability Score: ⚪ Minimal · up to 42459

This PR updates CI permissions and Dependabot configuration; no actionable merge-blocking risk remains after normal checks and review.

Possibly related PRs

  • sillsdev/languageforge-lexbox#2537: Both PRs modify GitHub Actions package-related behavior, but this PR adds explicit permissions while that PR handles fork pull request pushes.

Suggested labels: 💻 FW Lite, 📦 Lexbox

Suggested reviewers: hahn-kev

Poem

I’m a rabbit who checks each workflow lane,
With contents read and packages in train.
Checks can now report, builds can proceed,
Dependabot skips the runtime we need.
Hop, hop—clear permissions bloom!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly summarizes the primary change: granting CI workflows the write permissions required by Dependabot runs.
Description check ✅ Passed The description directly explains the workflow permission changes and the Dependabot ignore rule included in the changeset.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/dependabot-pr-permissions-f23c15

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.

myieye and others added 4 commits August 13, 2026 13:26
One rule: every write scope names the step that needs it; nothing else.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
… on forks

The 8.0 tag floats over patches anyway, so only the major jump needs blocking.

The fork guard matches lexbox-api/ui, which already skip login+push there.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Last image workflow with its own pull_request trigger and no fork guard.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Not risk-free: setup-k8s pulls lexbox-fw-headless:<version> with
continue-on-error and only repoints the kustomization on success, so skipping
the push makes a fork PR's integration tests run against develop's image and
report green. Keeping the red build until that's addressed on its own.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@myieye myieye changed the title [claude] Grant CI workflows the write scopes Dependabot PRs need Grant CI workflows the write scopes Dependabot PRs need Aug 13, 2026
@myieye
myieye requested a review from hahn-kev August 13, 2026 12:22
@myieye
myieye merged commit a8df226 into develop Aug 14, 2026
20 checks passed
@myieye
myieye deleted the claude/dependabot-pr-permissions-f23c15 branch August 14, 2026 08:35
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