fix(ci): grant update-deps write permissions for deps workflow#4004
Merged
Conversation
contents:read was too restrictive — peter-evans/create-pull-request still makes internal calls that need contents:write + pull-requests:write even when an App token is passed via `token:`. Symptom on main was "Requires authentication" at the Create Pull Request step, despite all four updaters succeeding upstream. update-passkey-aaguid.yml works because it has no permissions block at all (default permissive token). We keep the explicit block to satisfy CodeQL's "missing permissions" warning, just with the right scopes.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes the update-deps GitHub Actions workflow so it can successfully create/update dependency-bump pull requests after explicitly-scoped workflow permissions were introduced.
Changes:
- Expands the workflow
permissionsin.github/workflows/update-deps.ymlfromcontents: readtocontents: writeand addspull-requests: writeto allowpeter-evans/create-pull-requestto operate correctly with explicit permissions.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
✅ No security or compliance issues detected. Reviewed everything up to 830843c. Security Overview
Detected Code Changes
|
aterga
approved these changes
Jun 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
After #3998 merged, the first manual run of the new dependency-updates workflow failed at the `Create Pull Request` step with `Error: Requires authentication` — all four updaters succeeded but the PR-creation step couldn't write.
Failing run: https://github.com/dfinity/internet-identity/actions/runs/27285768379/job/80593220134
The `permissions: contents: read` block we added (to satisfy CodeQL's "workflow does not contain permissions" finding) was too restrictive. `peter-evans/create-pull-request` still makes internal calls that need `contents:write` + `pull-requests:write` even when an App token is supplied via `token:`.
`update-passkey-aaguid.yml` doesn't hit this because it has no `permissions:` block at all — the implicit GITHUB_TOKEN keeps its default broad scopes.
Changes
Tests
#4006