Skip to content

Commit bdb8f1d

Browse files
committed
ci: add retry and timeout config to pnpm audit step
The npm registry occasionally times out during pnpm audit, causing the Security audit required check to fail with ERR_SOCKET_TIMEOUT. Add fetch timeout (120s) and retry config (3 retries with 20–120s backoff) via npm_config env vars to make the step resilient to transient network issues.
1 parent ef9dcc4 commit bdb8f1d

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

.github/workflows/security.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ jobs:
2525
with:
2626
node-version-file: .nvmrc
2727
- run: pnpm audit --json
28+
env:
29+
npm_config_fetch_timeout: 120000
30+
npm_config_fetch_retries: 3
31+
npm_config_fetch_retry_mintimeout: 20000
32+
npm_config_fetch_retry_maxtimeout: 120000
2833

2934
dependency-review:
3035
name: Dependency review

0 commit comments

Comments
 (0)