Skip to content

Commit 485e035

Browse files
alnrclaude
andcommitted
chore: avoid shell interpolation of tag name in npm-publish job
Pass github.ref_name to npm/publish.js via an environment variable instead of interpolating it into the run script, so a crafted tag name cannot inject shell commands. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NaL51TwfZAAEEWU2v5CNWT
1 parent a66a872 commit 485e035

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

.github/workflows/ci.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,10 @@ jobs:
9494
node-version: "22"
9595
- env:
9696
NPM_TOKEN: ${{ secrets.NPM_TOKEN_AENEASR }}
97+
REF_NAME: ${{ github.ref_name }}
9798
run: |
9899
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
99-
node npm/publish.js ${{ github.ref_name }}
100+
node npm/publish.js "$REF_NAME"
100101
101102
newsletter-draft:
102103
name: Draft newsletter

0 commit comments

Comments
 (0)