Skip to content

fix(ci): grant update-deps write permissions for deps workflow#4004

Merged
MRmarioruci merged 1 commit into
mainfrom
fix/ci-update-deps-permissions
Jun 11, 2026
Merged

fix(ci): grant update-deps write permissions for deps workflow#4004
MRmarioruci merged 1 commit into
mainfrom
fix/ci-update-deps-permissions

Conversation

@MRmarioruci

@MRmarioruci MRmarioruci commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

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

  • `permissions: contents: read` → `permissions: { contents: write, pull-requests: write }` in `.github/workflows/update-deps.yml`.

Tests

#4006

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.
@MRmarioruci MRmarioruci marked this pull request as ready for review June 11, 2026 07:25
@MRmarioruci MRmarioruci requested a review from a team as a code owner June 11, 2026 07:25
Copilot AI review requested due to automatic review settings June 11, 2026 07:25

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 permissions in .github/workflows/update-deps.yml from contents: read to contents: write and adds pull-requests: write to allow peter-evans/create-pull-request to operate correctly with explicit permissions.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@zeropath-ai

zeropath-ai Bot commented Jun 11, 2026

Copy link
Copy Markdown

No security or compliance issues detected. Reviewed everything up to 830843c.

Security Overview
Detected Code Changes
Change Type Relevant files
Configuration changes ► .github/workflows/update-deps.yml
    Grant write permissions for contents and pull-requests

@MRmarioruci MRmarioruci changed the title fix(ci): grant update-deps write permissions for peter-evans fix(ci): grant update-deps write permissions for deps workflow Jun 11, 2026
@MRmarioruci MRmarioruci requested a review from aterga June 11, 2026 07:35
@MRmarioruci MRmarioruci merged commit 1f5f7b9 into main Jun 11, 2026
72 of 85 checks passed
@MRmarioruci MRmarioruci deleted the fix/ci-update-deps-permissions branch June 11, 2026 07:58
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.

3 participants