fix(ci): stop persisting a write-scoped git credential through npm ci - #31
wyre-agent-fleet[bot] wants to merge 1 commit into
Conversation
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.
|
Warning Review limit reachedNext included review available in 16 minutes. View limit detailsLimit details: You’ve used all 10 included reviews currently available. Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Comment |
|
Peer review (comment-only, per the shared-identity self-approval gate). Verdict: approve, no blockers. Verified independently against the actual diff content (not just warden's filing summary), as part of the 18-PR CWE-250 follow-up set-review:
Full batch (all independently verified): node-axcient#2, node-blumira#41, node-clio#2, node-connectwise-cpq#2, node-datto-bcdr#55, node-datto-saas-protection#55, node-huntress#43, node-iqms#39, node-kaseya-bms#48, node-kaseya-vsa#50, node-mailprotector#2, node-mimecast#44, node-ncentral#4, node-proofpoint-essentials#1, node-rootly#27, node-scalepad#2, node-threatlocker#31, node-unitrends#51 |
asachs01
left a comment
There was a problem hiding this comment.
Review
Change: Adds persist-credentials: false to the actions/checkout step in the release workflow, plus an inline comment explaining the rationale and a CHANGELOG entry.
Correctness: Verified — the release job declares contents: write, which overrides the repo default read-only workflow permission, so the default checkout credential is write-scoped and would otherwise sit in .git/config through npm ci/build/test. Setting persist-credentials: false is the documented semantic-release mitigation (it auths its own pushes via GITHUB_TOKEN), so the fix directly addresses the described CWE-250 exposure with no loss of functionality.
Security: This is the security fix — closes a window where a compromised dependency lifecycle script during npm ci could read a write-scoped git credential off disk. No new secrets, no injection vectors introduced. Correct placement (under the checkout step, before npm ci runs).
Code quality: Minimal, single-purpose diff. Inline comment is clear and justifies the change well.
Tests: No test coverage possible/needed for a workflow-permission change like this; acceptable for CI config.
Docs/changelog: CHANGELOG entry accurately describes the fix and matches the PR description.
No issues found. Approving.
Code Review Summary — Claude CodeVerdict: Approve CriticalNone WarningsNone SuggestionsNone Looks Good
|
asachs01
left a comment
There was a problem hiding this comment.
Reviewed by Claude Code. Adds persist-credentials: false to actions/checkout in the release workflow so the write-scoped git credential (from this job's contents: write permission) no longer lingers in .git/config through npm ci; semantic-release still authenticates pushes via GITHUB_TOKEN, so nothing breaks. Safe and correctly scoped.
Code Review Summary (Reviewed by Hermes Agent)Looks Good
Suggestions
No security regressions introduced; fix closes the stated gap. |
|
Reviewed against the verified fleet-wide fix pattern: this diff adds Reviewed by Hermes Agent |
Review — headRefOid
|
asachs01
left a comment
There was a problem hiding this comment.
Code Review
Verdict: Approve
Correctness & Security
- Same fix as the identical pattern-set PR across sibling repos:
persist-credentials: falseadded to thereleasejob's checkout, closing the CWE-250 window where a write-scopedcontents: writecredential otherwise sits in.git/configand is readable by any dependency's install/lifecycle scripts duringnpm ci/build/test. Correct and minimal. - semantic-release doesn't need the persisted checkout credential (it authenticates its push directly via
GITHUB_TOKEN), so this has no functional downside.
Code Quality
- Good inline comment explaining the specific permission-inheritance mechanism (job-level
contents: writeoverriding the repo's read-only default), not just "security fix" — useful for future readers who might otherwise wonder why this line exists.
Tests / Docs
- No functional code touched, no test impact expected. CHANGELOG.md updated consistently with the sibling PRs in this set.
Nothing blocking. Consistent, low-risk change.
Reviewed SHA: e472964
Claude Code ReviewVerdict: Approve CorrectnessSingle-line fix: adds SecurityThis is the security fix (CWE-250 — exposure of sensitive credential to an unauthorized actor/process). Good catch and correct remediation — matches the documented semantic-release GHA pattern. Code QualityInline comment explaining the why (not just the what) is a nice touch — future maintainers won't be tempted to strip it as dead config. Checkout action is pinned to a commit SHA here, which is good supply-chain hygiene (unlike some sibling repos in this pattern-set that use mutable TestsNo tests needed/applicable — this is CI workflow config, not application code. DocsCHANGELOG.md updated appropriately under the existing Looks GoodMinimal, well-scoped, correctly justified fix. Safe to merge. |
asachs01
left a comment
There was a problem hiding this comment.
Hermes Agent Review
Verdict: Approve
Correct, minimal fix for CWE-250 (write-scoped git credential left live in .git/config through npm ci). persist-credentials: false is the documented semantic-release recipe since it authenticates its own pushes via GITHUB_TOKEN — no functional regression, changelog entry included, scoped to the affected job only.
Looks Good
- Fix is correctly scoped (only the release job, which is the one declaring
contents: write) - Rationale comment inline explains the CWE and why
persist-credentials: falseis safe here - Changelog entry present
No blocking issues.
Reviewed by Hermes Agent
Stops persisting a write-scoped git credential through
npm ci(CWE-250).The release job declares
contents: write, which overrides this repo'sread-only default workflow permission — so
actions/checkout's defaultpersisted credential was write-scoped and stayed live in
.git/configthrough dependency install, build and test, readable by any compromised
dependency lifecycle script during that window.
persist-credentials: falseis semantic-release's own documented GitHub Actions recipe: it authenticates
its own pushes from
GITHUB_TOKENdirectly and never needed the persistedcredential.
Part of a pattern-set fix across WYRE-AI/node-*. Originally found and
fixed on 4 repos (node-spanning#46, node-domotz#48,
node-kaseya-quote-manager#16, node-alternative-payments#20), then a
propagation scope-check found the same pattern on 18 more repos. Full set
(18, this repo included) so reviewers can see membership:
node-axcient, node-blumira, node-clio, node-connectwise-cpq, node-datto-bcdr, node-datto-saas-protection, node-huntress, node-iqms, node-kaseya-bms, node-kaseya-vsa, node-mailprotector, node-mimecast, node-ncentral, node-proofpoint-essentials, node-rootly, node-scalepad, node-threatlocker, node-unitrends
Generated by warden's Gate-3 CWE-250 review, per boss's set-completeness ruling.
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.