Repository navigation
ci: set explicit token permissions, and build releases without the Actions cache - #206
Merged
Gabriel-Trintinalia merged 3 commits intoOct 23, 2026
Conversation
Lock the token by default in ci.yml and release-object.yml, and grant each job only what it needs: contents read for the jobs that check out code, nothing for the result-only job, and contents write for the job that creates the draft release.
setup-zig restores the Zig compiler from the Actions cache by default. A release now downloads it instead, so the published objects don't depend on cache contents.
Gabriel-Trintinalia
approved these changes
Oct 23, 2026
Gabriel-Trintinalia
merged commit Oct 23, 2026
2835883
into
Consensys-Incorporated:main
13 checks passed
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.
Summary
ci.ymlandrelease-object.ymlstart frompermissions: {}and grant each job only what it needs, following doc.linea:build-and-test,zkevm-tests,blockchain-tests,guest-zisk,lintcontents: readblockchain-tests-resultbuild-and-releasecontents: write(creates the draft release)The repository's default token is already read-only, so CI behaves the same. Each job's access is now explicit, and stays limited if that default ever changes.
release-object.ymlsetscache: falseon setup-zig, so a release downloads Zig instead of restoring it from the Actions cache.Job names are unchanged, so the required checks still report. This merges cleanly with #203.
Testing
actionlintis clean.ci.ymljob with the new permissions.release-object.ymlonly runs on dispatch.cacheis a declared input of the pinned setup-zig (default'true'), and'false'skips both the cache restore and the cache save.Note
Low Risk
Workflow-only changes that document least-privilege GITHUB_TOKEN use; release Zig setup may run slightly slower without cache but does not affect application code or runtime behavior.
Overview
Tightens GitHub Actions token scope in
ci.ymlandrelease-object.ymlby setting workflow-levelpermissions: {}and granting per-job access only where needed (contents: readfor test/build/lint jobs;contents: writeonly on the release job that creates draft releases).For release builds,
setup-zignow usescache: falseso Zig is fetched fresh on each manual release run instead of reusing the Actions cache.Reviewed by Cursor Bugbot for commit 852130c. Bugbot is set up for automated code reviews on this repo. Configure here.