Skip to content

ci: add read-only token permissions and pin actions/checkout to SHA#101

Open
Alb3e3 wants to merge 1 commit into
xiph:mainfrom
Alb3e3:harden-workflow-permissions
Open

ci: add read-only token permissions and pin actions/checkout to SHA#101
Alb3e3 wants to merge 1 commit into
xiph:mainfrom
Alb3e3:harden-workflow-permissions

Conversation

@Alb3e3

@Alb3e3 Alb3e3 commented Jun 11, 2026

Copy link
Copy Markdown

Summary

Both CI workflows (autotools.yml and cmake.yml) lacked a top-level
permissions: block, leaving each run to inherit the repository default,
which can be write-all on permissive settings. Each workflow now has
permissions: read-all at the top level.

The actions/checkout@v2 reference in both workflows was also updated to
the current v6.0.3 release and pinned to its full commit SHA
(df4cb1c069e1874edd31b4311f1884172cec0e10). Pinning to a SHA rather
than a mutable version tag prevents the action from being silently changed
under the project.

Verification

uvx zizmor --min-severity medium .github/workflows/

Result: no findings after this patch.

Both CI workflows (autotools and cmake) lacked a top-level permissions
block, leaving them to inherit the repository default (potentially
write-all).  Each now has `permissions: read-all` at the top level.

The actions/checkout@v2 reference in both workflows was also pinned to
the full commit SHA of the current v6.0.3 release, replacing the mutable
version tag with an immutable reference that is immune to tag rewriting.

Verified with zizmor --min-severity medium: no findings after this patch.

Signed-off-by: Alb3e3 <tomaska.filip@gmail.com>
@Alb3e3 Alb3e3 force-pushed the harden-workflow-permissions branch from f3799b0 to 8cb5d8a Compare June 11, 2026 22:28
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.

1 participant