Skip to content

Commit 658bfca

Browse files
fix(security): add .npmrc with ignore-scripts=true (#1083)
This prevents malicious postinstall scripts from running during `npm install`, both in CI and locally. ### Changes - Added `.npmrc` with `ignore-scripts=true` - Removed `.npmrc` from `.gitignore` (auth tokens belong in `~/.npmrc`, not project-level) - Added explicit `npx cypress install` in integration workflow (Cypress needs its binary downloaded via postinstall)
1 parent 5762a18 commit 658bfca

3 files changed

Lines changed: 5 additions & 2 deletions

File tree

.github/workflows/integration.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ jobs:
5151
- name: Install dependencies
5252
run: npm ci
5353

54+
- name: Install Cypress binary
55+
run: npx cypress install
56+
5457
- name: Build SDK
5558
run: npm run build
5659

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,5 +107,4 @@ dist
107107
test-results
108108

109109
cypress/screenshots
110-
cypress/videos
111-
.npmrc
110+
cypress/videos

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ignore-scripts=true

0 commit comments

Comments
 (0)