You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Pin npm and actions in write-privileged workflows #127
Hardening for the workflows that hold write or publish permissions: they run code referenced by mutable tags or latest.
Checklist
publish.yml:40 runs npm install -g npm@latest right before npm publish --provenance in a job with id-token: write. Pin an exact npm version (or use a Node version whose bundled npm is >= 11.5.1).
Pin third-party and shared actions to full commit SHAs in write-privileged workflows: release-drafter/release-drafter@v7 (release-drafter.yml:18, runs on pull_request_target with contents: write), TMHSDigital/Developer-Tools-Directory/.github/actions/release-doc-sync@v1 (release.yml:124, followed by git add -A and a push to main). Dependabot's github-actions updater keeps SHA pins current.
release-drafter.yml: split autolabeling (pull_request_target, pull-requests: write only) from draft updating (push, contents: write), or drop pull_request_target if autolabeling is not used.
Add an explicit top-level permissions: contents: read to ci.yml and validate.yml.
Impact
An upstream tag or npm release that is hijacked would run with permission to push to main or publish @tmhs/homelab-mcp. Requires upstream compromise; this is defense in depth.
Fixed in e81ff65: publish.yml installs npm 11.21.3 instead of npm@latest; release-doc-sync is pinned to the v1.20.0 commit SHA; release-drafter is pinned to the v7.11.0 SHA and split into a push-only drafting job (contents: write) and a pull_request_target autolabel job using the v7 autolabeler sub-action (pull-requests: write only); ci.yml and validate.yml have top-level contents: read. Verified: on the push of e81ff65, Release Drafter (drafting job), Validate Plugin Structure and Release all succeeded. Dependabot's github-actions updater will keep the SHA pins current.
Activity
TMHSDigital commentedon Nov 18, 2026
Fixed in e81ff65: publish.yml installs npm 11.21.3 instead of
npm@latest; release-doc-sync is pinned to the v1.20.0 commit SHA; release-drafter is pinned to the v7.11.0 SHA and split into a push-only drafting job (contents: write) and apull_request_targetautolabel job using the v7 autolabeler sub-action (pull-requests: writeonly); ci.yml and validate.yml have top-levelcontents: read. Verified: on the push of e81ff65, Release Drafter (drafting job), Validate Plugin Structure and Release all succeeded. Dependabot's github-actions updater will keep the SHA pins current.