forked from evanp/inference-coop-copilot
security: pin actions, install without scripts, use locked vsce
This commit is contained in:
1 parent
28d736f627
commit
615ea4c22d
1 file changed
+9
-4
@@ -9,11 +9,12 @@ jobs:
|
||||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# Actions are pinned by commit SHA, not floating tags: a tag can be moved.
|
||||
- name: Check out
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
|
||||
|
||||
- name: Set up Node
|
||||
uses: actions/setup-node@v4
|
||||
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
|
||||
with:
|
||||
node-version: '24'
|
||||
|
||||
@@ -31,7 +32,9 @@ jobs:
|
||||
fi
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
# No lifecycle scripts: package install must not run repository code
|
||||
# with the publishing token anywhere in the job.
|
||||
run: npm ci --ignore-scripts --no-audit --fund=false
|
||||
|
||||
- name: Type-check, lint, and bundle
|
||||
run: npm run package
|
||||
@@ -39,4 +42,6 @@ jobs:
|
||||
- name: Publish to VS Marketplace
|
||||
env:
|
||||
VSCE_PAT: ${{ secrets.VSCE_PAT }}
|
||||
run: npx vsce publish -p "$VSCE_PAT" --skip-duplicate
|
||||
# Use the locked local vsce, never `npx` (which can fetch a different
|
||||
# package version from the registry at publish time).
|
||||
run: ./node_modules/.bin/vsce publish -p "$VSCE_PAT" --skip-duplicate
|
||||
Reference in new issue
Block a user