chore(ci): scope nix-check workflow permissions to contents:read (#1870)
Some checks failed
ci / Packaged mac smoke (push) Blocked by required conditions
ci / Packaged windows smoke (push) Blocked by required conditions
ci / Detect PR change scopes (push) Failing after 2s
ci / Validate workspace (push) Has been skipped
nix-check / build (push) Failing after 1s
ci / Packaged linux headless smoke (push) Has been skipped

The other workflows under .github/workflows declare explicit
`permissions:` blocks that scope their GITHUB_TOKEN to the minimum
required (contents: read for build-only flows). `nix-check.yml` was
the lone outlier and inherited the repository's default token
permissions instead.

Add `permissions: { contents: read }` to align with the rest of the
workflow suite and follow GitHub's least-privilege workflow guidance.
No behavior change: the job only reads the repo, runs `nix flake
check`, and uploads a logs artifact on failure (which uses an action
that already declares its own permissions internally).

Co-authored-by: nicejames <nicejames@gmail.com>
This commit is contained in:
leessju 2026-05-17 12:28:18 +09:00 committed by GitHub
parent e64f1d8497
commit 7766582f0b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -46,6 +46,9 @@ on:
- .github/PULL_REQUEST_TEMPLATE.md
- .github/CODEOWNERS
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest