CI: Forgejo 16 ignores the workflow permissions field and warns on every job #727

Closed
opened 2026-10-06 20:44:50 +00:00 by tiagoagueda · 0 comments
Owner

Since Forgejo was updated to 16, every run of ci.yml shows this warning for each of its jobs (browser, test, checks, postgres, security):

Job … or its workflow has a permissions field, which is not supported in Forgejo and will be ignored. Use Authorized Integrations to grant capabilities to this job instead.

What is done here

ci.yml only ever asked for contents: read, which is what a job has without asking, so its top-level permissions: block is removed and the comment says why. zizmor, which the Security job runs over every workflow, asks for the block (excessive-permissions, medium), so .forgejo/zizmor.yml turns that one audit off for ci.yml and nowhere else. Checked with the pinned zizmor==1.30.1 and the CI command: clean with the exception, flagged without it.

What is not done here, and needs the instance

Four other workflows carry permissions: blocks that grant more than reading, and Forgejo 16 now ignores those too:

  • release.yml: contents: write, to publish the release.
  • image.yml: contents: write (attach the bill of materials) and packages: write (push the release image).
  • dev-image.yml: packages: write (push :dev).
  • dependencies.yml: contents: write and pull-requests: write (the monthly upgrade branch and its pull request).

They warn only when they run, and they are left as they are, because deleting a grant from the file would hide what each job needs. If the instance does not grant the same capabilities through Authorized Integrations, a release, an image push or the monthly upgrade can fail where they used to work. That is a setting on the Forgejo side; once it is made, those blocks can go the way ci.yml's did.

Since Forgejo was updated to 16, every run of `ci.yml` shows this warning for each of its jobs (`browser`, `test`, `checks`, `postgres`, `security`): > Job … or its workflow has a permissions field, which is not supported in Forgejo and will be ignored. Use Authorized Integrations to grant capabilities to this job instead. ## What is done here `ci.yml` only ever asked for `contents: read`, which is what a job has without asking, so its top-level `permissions:` block is removed and the comment says why. zizmor, which the Security job runs over every workflow, asks for the block (`excessive-permissions`, medium), so `.forgejo/zizmor.yml` turns that one audit off for `ci.yml` and nowhere else. Checked with the pinned `zizmor==1.30.1` and the CI command: clean with the exception, flagged without it. ## What is not done here, and needs the instance Four other workflows carry `permissions:` blocks that grant more than reading, and Forgejo 16 now ignores those too: - `release.yml`: `contents: write`, to publish the release. - `image.yml`: `contents: write` (attach the bill of materials) and `packages: write` (push the release image). - `dev-image.yml`: `packages: write` (push `:dev`). - `dependencies.yml`: `contents: write` and `pull-requests: write` (the monthly upgrade branch and its pull request). They warn only when they run, and they are left as they are, because deleting a grant from the file would hide what each job needs. If the instance does not grant the same capabilities through Authorized Integrations, a release, an image push or the monthly upgrade can fail where they used to work. That is a setting on the Forgejo side; once it is made, those blocks can go the way `ci.yml`'s did.
tiagoagueda added this to the 0.5.0 milestone 2026-10-07 08:34:09 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Postulo/postulo#727
No description provided.