CI: Forgejo 16 ignores the workflow permissions field and warns on every job #727
Labels
No labels
accessibility
authentication
breaking change
bug
documentation
enhancement
interface
internationalisation
observability
performance
security
tier
1
tier
2
tier
3
tier/4
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Postulo/postulo#727
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Since Forgejo was updated to 16, every run of
ci.ymlshows this warning for each of its jobs (browser,test,checks,postgres,security):What is done here
ci.ymlonly ever asked forcontents: read, which is what a job has without asking, so its top-levelpermissions: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.ymlturns that one audit off forci.ymland nowhere else. Checked with the pinnedzizmor==1.30.1and 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) andpackages: write(push the release image).dev-image.yml:packages: write(push:dev).dependencies.yml:contents: writeandpull-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.