Skip to content

Commit 64f7f4e

Browse files
authored
chore: use npm ci --ignore-scripts everywhere (#699)
Like astral-sh/ruff-action#276 🙂 This also adds cooldown stanzas to the Dependabot updater rules: this ensures that we only receive dependency bumps once they're at least a week old, which should reduce the window of opportunity for an attacker who temporarily compromises popular packages (like with "Shai-Hulud" last week). Signed-off-by: William Woodruff <[email protected]>
1 parent 5ae467f commit 64f7f4e

4 files changed

Lines changed: 8 additions & 4 deletions

File tree

.github/copilot-instructions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ src/
5959
#### 1. Install Dependencies
6060

6161
```bash
62-
npm install
62+
npm ci --ignore-scripts
6363
```
6464

6565
**Timing**: ~20-30 seconds
@@ -236,7 +236,7 @@ This file is the authoritative source for understanding available action paramet
236236

237237
### Build Failures
238238

239-
- **"Module not found"**: Run `npm install` to ensure dependencies are installed
239+
- **"Module not found"**: Run `npm ci --ignore-scripts` to ensure dependencies are installed
240240
- **TypeScript errors**: Check `tsconfig.json` and ensure all imports are valid
241241
- **Test failures**: Check if test fixtures have been modified or if logic changes broke assumptions
242242

.github/dependabot.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,12 @@ updates:
44
directory: /
55
schedule:
66
interval: daily
7+
cooldown:
8+
default-days: 7
79

810
- package-ecosystem: npm
911
directory: /
1012
schedule:
1113
interval: daily
14+
cooldown:
15+
default-days: 7

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
node-version-file: .nvmrc
3434
cache: npm
3535
- run: |
36-
npm install
36+
npm ci --ignore-scripts
3737
- run: |
3838
npm run all
3939
- name: Check all jobs are in all-tests-passed.needs

.github/workflows/update-known-versions.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
fi
4040
- name: Compile changes
4141
if: ${{ steps.changes-exist.outputs.changes-exist == 'true' }}
42-
run: npm ci && npm run all
42+
run: npm ci --ignore-scripts && npm run all
4343
- name: Commit and push changes
4444
if: ${{ steps.changes-exist.outputs.changes-exist == 'true' }}
4545
id: commit-and-push

0 commit comments

Comments
 (0)