[PR #318] ci(unraid): least-privilege token, no persisted credentials, matrix via env #290

Open
opened 2026-11-07 17:54:53 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Zagitta/gpu-unlock/pull/318
Author: @ItsRenjiii
Created: 11/7/2026
Status: 🔄 Open

Base: main ← Head: ci/unraid-least-privilege


📝 Commits (1)

  • ed2fe6b ci(unraid): least-privilege token, no persisted credentials, matrix via env

📊 Changes

1 file changed (+21 additions, -4 deletions)

View changed files

📝 .github/workflows/unraid.yml (+21 -4)

📄 Description

Hardens .github/workflows/unraid.yml, from the CI items in #306. One file; the jobs do the same work as before.

Changes

  • Least-privilege token. The workflow default is now contents: read, and only publish gets contents: write. discover only reads the unraid release (gh release download) and build writes nothing to the repository.
  • Matrix values via env:. matrix.unraid.version, url and sha256 come from releases.unraid.net. They now reach the shell as UNRAID_VERSION, UNRAID_URL and UNRAID_SHA256 instead of being expanded into the run: scripts.
  • persist-credentials: false on all three checkouts. The build job mounts the checkout into the gcc container that compiles downloaded kernel source, and no job pushes with git. publish uses gh with GH_TOKEN, as before.

Checks

  • actionlint (with shellcheck) passes on the changed workflow.

  • zizmor --persona=pedantic gives 16 findings before and 8 after. These are gone:

    • excessive-permissions (1)
    • artipacked (3)
    • template-injection (4)

    The 8 that remain are unpinned-uses (5), anonymous-definition (2) and undocumented-permissions (1, for the workflow-level block). The first two are untouched here.

  • With read-only access, packaging/unraid/discover.sh still reads the unraid release and returns the matrix (5 Unraid releases today).

  • With the first entry (7.3.4) as env, the build step's commands expand to the same download URL (HTTP 206), checksum line and dist/7.3.4.built as before.

I haven't run the whole workflow, because on a fork it would build and publish a full unraid release.

Not included: pinning actions by SHA, pinning images by digest, and the Unraid default TARGETS="all" from #306. Those change how the project pins dependencies or how the plugin behaves, so they're your call.

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Zagitta/gpu-unlock/pull/318 **Author:** [@ItsRenjiii](https://github.com/ItsRenjiii) **Created:** 11/7/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `ci/unraid-least-privilege` --- ### 📝 Commits (1) - [`ed2fe6b`](https://github.com/Zagitta/gpu-unlock/commit/ed2fe6b5a7249a8e08085ef39a7c6c07e18dbb11) ci(unraid): least-privilege token, no persisted credentials, matrix via env ### 📊 Changes **1 file changed** (+21 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/unraid.yml` (+21 -4) </details> ### 📄 Description Hardens `.github/workflows/unraid.yml`, from the CI items in #306. One file; the jobs do the same work as before. **Changes** - **Least-privilege token.** The workflow default is now `contents: read`, and only `publish` gets `contents: write`. `discover` only reads the `unraid` release (`gh release download`) and `build` writes nothing to the repository. - **Matrix values via `env:`.** `matrix.unraid.version`, `url` and `sha256` come from `releases.unraid.net`. They now reach the shell as `UNRAID_VERSION`, `UNRAID_URL` and `UNRAID_SHA256` instead of being expanded into the `run:` scripts. - **`persist-credentials: false`** on all three checkouts. The `build` job mounts the checkout into the `gcc` container that compiles downloaded kernel source, and no job pushes with git. `publish` uses `gh` with `GH_TOKEN`, as before. **Checks** - `actionlint` (with shellcheck) passes on the changed workflow. - `zizmor --persona=pedantic` gives 16 findings before and 8 after. These are gone: - `excessive-permissions` (1) - `artipacked` (3) - `template-injection` (4) The 8 that remain are `unpinned-uses` (5), `anonymous-definition` (2) and `undocumented-permissions` (1, for the workflow-level block). The first two are untouched here. - With read-only access, `packaging/unraid/discover.sh` still reads the `unraid` release and returns the matrix (5 Unraid releases today). - With the first entry (7.3.4) as env, the build step's commands expand to the same download URL (HTTP 206), checksum line and `dist/7.3.4.built` as before. I haven't run the whole workflow, because on a fork it would build and publish a full `unraid` release. **Not included:** pinning actions by SHA, pinning images by digest, and the Unraid default `TARGETS="all"` from #306. Those change how the project pins dependencies or how the plugin behaves, so they're your call. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Zagitta/gpu-unlock#290
No description provided.