From 0e792281e41b9e532a12eb975756e64353d998b3 Mon Sep 17 00:00:00 2001 From: warden Date: Tue, 15 Sep 2026 12:47:10 +0000 Subject: [PATCH] fix(ci): stop persisting a write-scoped git credential through npm ci The release job declares `contents: write`, which overrides this repo's read-only default workflow permission, so actions/checkout's default persisted credential was write-scoped and stayed live in .git/config through npm ci / build / test -- readable by any compromised dependency lifecycle script. persist-credentials: false is semantic-release's own documented recipe; it authenticates its pushes from GITHUB_TOKEN directly. Part of the CWE-250 pattern-set fix across WYRE-AI/node-*. Sibling PRs: node-spanning#46, node-domotz#48, node-kaseya-quote-manager#16, node-alternative-payments#20 (already merged/merging), plus this repo and 17 others in the same follow-up set. --- .github/workflows/release.yml | 9 +++++++++ CHANGELOG.md | 2 ++ 2 files changed, 11 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b9c5d36..ce28b3f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -38,6 +38,15 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 + # The release job declares `contents: write`, which overrides this repo's + # read-only default workflow permission -- so the checkout's default + # persisted credential is WRITE-scoped and stays live in .git/config + # through `npm ci` below. A compromised dependency lifecycle script + # could read it off disk and push. semantic-release authenticates its + # own pushes from GITHUB_TOKEN, so it does not need the persisted + # credential; `persist-credentials: false` is semantic-release's own + # documented GitHub Actions recipe. (CWE-250) + persist-credentials: false - uses: actions/setup-node@v4 with: node-version: 22 diff --git a/CHANGELOG.md b/CHANGELOG.md index 33cf116..9370818 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,8 @@ Release entries below the Unreleased section are generated by semantic-release. ### Added +- **Release workflow no longer persists a write-scoped git credential across `npm ci`.** The release job declares `contents: write`, which overrides this repo's read-only default workflow permission, so `actions/checkout`'s default persisted credential was write-scoped and lived in `.git/config` through dependency install, build and test — readable by any compromised dependency lifecycle script. `persist-credentials: false` is semantic-release's own documented GitHub Actions recipe; it authenticates its pushes from `GITHUB_TOKEN` directly and never needed the persisted credential. (CWE-250) + - Initial release of the N-able N-central REST API client. - `NCentralClient` with typed resources: `system`, `serviceOrgs`, `customers`, `sites`, `orgUnits`, `devices`, `deviceFilters`, `scheduledTasks`,