You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* feat: implement multi-layered supply chain attack defense
Implement comprehensive protection against npm supply chain attacks (such as Shai-Hulud 2.0) using a three-layer defense strategy.
Layer 1: New Package Release Delay
- Add minimumReleaseAge (48 hours) to pnpm-workspace.yaml
- Blocks installation of recently published packages
- Provides time buffer for community to detect malicious updates
Layer 2: Install Script Prevention
- Configure ignore-scripts=true in .npmrc
- Prevents execution of preinstall/postinstall scripts
- Includes whitelist support via onlyBuiltDependencies (currently unused)
Layer 3: Continuous Vulnerability Scanning
- Add OSV-Scanner workflow for dependency scanning
- Integrate security scan into CI/CD pipeline
- Fail builds on detected vulnerabilities
Documentation:
- Add comprehensive supply chain protection section to SECURITY.md
- Document configuration, trade-offs, and compromise detection
- Include references to defense resources
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix: pin OSV-Scanner action to specific commit SHA
Pin google/osv-scanner-action to v2.3.0 (b77c075) instead of using floating ref @main for improved security and reproducibility.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix: correct pnpm whitelist configuration key
Change onlyBuiltDependencies to only-built-dependencies (kebab-case) to match pnpm's actual configuration format.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix: correct typo in malicious repo search example
Change "Sha1-Hulud" to "Shai-Hulud" to match the actual attack name.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* docs: add inline comment clarifying minimumReleaseAge unit
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* chore: add changeset for supply chain defense
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: SECURITY.md
+72Lines changed: 72 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,6 +24,78 @@ If you discover a security vulnerability in web-csv-toolbox, please report it pr
24
24
25
25
We provide security updates for the latest minor version only.
26
26
27
+
## Supply Chain Attack Protection
28
+
29
+
This project implements a multi-layered defense approach to protect against npm supply chain attacks (such as Shai-Hulud 2.0 and similar threats).
30
+
31
+
### Defense Layers
32
+
33
+
#### Layer 1: New Package Release Delay
34
+
35
+
**Configuration:**`pnpm-workspace.yaml`
36
+
37
+
```yaml
38
+
minimumReleaseAge: 2880# 48 hours
39
+
```
40
+
41
+
Blocks installation of packages published within 48 hours. This time buffer allows the community to detect and report malicious package updates before they reach our dependencies.
42
+
43
+
**Trade-offs:**
44
+
- ✅ Prevents zero-day supply chain attacks
45
+
- ⚠️ Delays access to legitimate bug fixes and security patches
46
+
47
+
**When to adjust:** If you need to install a newly published package immediately, temporarily comment out this setting, then re-enable it after installation.
48
+
49
+
#### Layer 2: Install Script Prevention
50
+
51
+
**Configuration:** `.npmrc`
52
+
53
+
```
54
+
ignore-scripts=true
55
+
```
56
+
57
+
Prevents execution of `preinstall`, `postinstall`, and `install` scripts from all packages. Even if a compromised package is installed, its malicious code cannot execute during installation.
58
+
59
+
**Whitelist for native modules (if needed):**
60
+
```
61
+
only-built-dependencies[]=package-name
62
+
```
63
+
64
+
**Current status:** This project requires no install scripts. WASM builds use `wasm-pack` which runs manually via `pnpm build:wasm`.
Uses Google's OSV-Scanner to continuously scan dependencies for known vulnerabilities, aggregating data from multiple sources (GitHub Advisory Database, NVD, etc.).
71
+
72
+
The CI pipeline fails if vulnerabilities are detected, preventing vulnerable code from being merged or deployed.
73
+
74
+
### Checking for Compromise
75
+
76
+
If you suspect your local environment may be compromised by supply chain attacks, check for these indicators:
0 commit comments