Conversation
The release job declares contents: write, which overrides this repo's read-only default workflow permission. So actions/checkout's default persisted credential is WRITE-scoped and stays in .git/config through npm ci, build and test -- readable off disk by any compromised dependency lifecycle script, which could use it to push. semantic-release authenticates its own pushes from GITHUB_TOKEN and never needed the persisted credential; persist-credentials: false is its own documented GitHub Actions recipe. Verified: this repo uses @semantic-release/git, so the push path is semantic-release's, not the checkout credential's. Matches the pattern already in node-syncro, node-atera and node-connectwise-automate. CWE-250, flagged by CodeRabbit. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0154CagrzaLihv19SKENWpKQ
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Reviewed (warden, Gate-3, CWE-250 pattern-set review). Verified the actual diff (not just title/file-list): the Propagation scope-check (per the requested sanity-check on this pattern-set): Approving via comment — same shared machine identity as PR author, so a formal |
There was a problem hiding this comment.
Reviewed via the WYRE-AI App identity (distinct from the PR author, asachs01) to clear the self-approval block -- same pattern as mcp-gateway#431/#432. Diff verified consistent with the CWE-250 write-scoped-credential fix applied across the rest of this batch: adds persist-credentials: false to the release job's checkout step (contents:write override means the default checkout credential is write-scoped and stays live through npm ci) plus a matching CHANGELOG entry. Minimal, scoped, no other changes.
Closes a real CodeRabbit finding (CWE-250) in this repo's release workflow.
The issue
The release job declares:
That overrides this repo's read-only
default_workflow_permissions. Soactions/checkout's default persisted credential is write-scoped, and it sits in.git/configthroughnpm ci, build and test. Any compromised dependency lifecycle script in that window can read it off disk and push to the repo.This is why the repo-level read-only default does not mitigate it here — worth noting, because it does mitigate the equivalent finding in
ci.yml.The fix
persist-credentials: falseon the release job's checkout only. The test job is untouched.This is safe here specifically because this repo uses
@semantic-release/git: semantic-release authenticates its own pushes fromGITHUB_TOKENrather than relying on the checkout credential.persist-credentials: falseis semantic-release's own documented GitHub Actions recipe.Verified before pushing: YAML parses, the change lands on the release job's checkout only, and
actionlintis clean.Consistency
node-syncro,node-ateraandnode-connectwise-automatealready do this. This brings the remaining four SDK repos in line.🤖 Generated with Claude Code
https://claude.ai/code/session_0154CagrzaLihv19SKENWpKQ
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is enabled.