Skip to content

ci: add permissions blocks to all workflows - #1295

Open
Alb3e3 wants to merge 86 commits into
madler:masterfrom
Alb3e3:ci-permissions
Open

ci: add permissions blocks to all workflows#1295
Alb3e3 wants to merge 86 commits into
madler:masterfrom
Alb3e3:ci-permissions

Conversation

@Alb3e3

@Alb3e3 Alb3e3 commented Aug 13, 2026

Copy link
Copy Markdown

Summary

Add permissions: contents: read to all workflow files.

Why

Without an explicit permissions block, GitHub Actions workflows run with the default token permissions, which include write access to repository contents, packages, and other resources.

Adding contents: read restricts the token to read-only access, following the principle of least privilege. This reduces the potential impact if a dependency or action is compromised.

Files (7)

  • .github/workflows/c-std.yml
  • .github/workflows/cmake.yml
  • .github/workflows/configure.yml
  • .github/workflows/contribs.yml
  • .github/workflows/fuzz.yml
  • .github/workflows/msys-cygwin.yml
  • .github/workflows/others.yml

Validation

  • git diff --check passes
  • YAML syntax verified

madler and others added 30 commits February 17, 2026 14:12
So that ints.h is part of the installation.
The bug would pass off an invalid deflate stream as good, and copy
uninitialized memory contents to the output.
Those were not quite enough if the workaround was enabled.
For pre-C99 Microsoft Visual Studio up through 2012.
This makes it easier to relocate the package since only one
variable needs to be overridden.
The exec_prefix is meant for machine-specific files whereas headers
are machine-independent.
The CMAKE_INSTALL_*DIR variables can be absolute. In that case they
should not be appended to the prefix.
Co-authored-by: tbeu <tbeu@users.noreply.github.com>
Vollstrecker and others added 30 commits May 31, 2026 23:20
Adding to NULL is undefined.
Add `permissions: contents: read` to all workflow files to follow
the least-privilege principle. Without an explicit permissions block,
workflows run with the default token permissions which include write
access to repository contents and other resources.

Files changed:
- .github/workflows/c-std.yml
- .github/workflows/cmake.yml
- .github/workflows/configure.yml
- .github/workflows/contribs.yml
- .github/workflows/fuzz.yml
- .github/workflows/msys-cygwin.yml
- .github/workflows/others.yml
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.

8 participants