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
**A secure wrapper for npm, yarn, pnpm, and bun that prevents installation of compromised packages.**
4
4
5
+
*Built to counter supply chain attacks like the Shai-Hulud npm worm.*
6
+
5
7
## 🚨 Why This Exists
6
8
7
9
### The Problem: Supply Chain Attacks Are Rising
8
10
9
-
Supply chain attacks have increased **742%** in the past 3 years. The npm ecosystem is a prime target:
11
+
Supply chain attacks have surged dramatically in recent years, with the npm ecosystem being a prime target:
10
12
11
-
-**Shai-Hulud npm worm (2024-2025)**: Infected 795+ packages that steal credentials and self-replicate
12
-
-**Existing tools are reactive**: `npm audit`, Snyk, and Dependabot scan **AFTER** installation - too late
13
+
-**Shai-Hulud npm worm (2024-2025)**: Infected hundreds of packages (~800) that steal credentials and self-replicate
14
+
-**Popular free tools are reactive**: `npm audit`and Dependabot scan **AFTER** installation - too late to prevent credential theft
13
15
-**Malicious code executes**: By the time vulnerabilities are detected, postinstall scripts have already run
14
-
-**No pre-install blocking**: No tool prevents compromised packages from being installed
15
16
16
17
### The Solution: Pre-Install Blocking
17
18
18
-
Sentinel Package Manager is the **ONLY tool** that blocks compromised packages **BEFORE** installation:
19
+
Sentinel is a **free, open-source, zero-dependency** tool that intercepts package manager commands **locally on your machine** to block installation **BEFORE** download.
> **📖 For more options** (CI/CD setup, advanced configuration), see the [Usage Guide](docs/USAGE.md).
116
+
117
+
---
118
+
119
+
## 🔄 How It Works
120
+
121
+
```
122
+
Developer: npm install package-name
123
+
↓
124
+
Sentinel intercepts (via shell alias)
125
+
↓
126
+
Validation BEFORE download:
127
+
├─ Local blacklist (~800 known malicious packages)
128
+
├─ OSV database (real-time)
129
+
├─ GitHub Advisories (real-time)
130
+
└─ npm audit (optional fallback)
131
+
↓
132
+
├─ Compromised → BLOCK ❌
133
+
└─ Safe → Install ✅
134
+
```
135
+
136
+
**Example - Blocked package:**
137
+
```bash
138
+
$ npm install malicious-package
107
139
108
-
- ✅ **Intercepts** package manager commands before installation
109
-
- ✅ **Validates** packages against a blacklist of 795+ known compromised packages (Shai-Hulud worm)
110
-
- ✅ **Checks** vulnerability providers (OSV, GitHub Advisories, Snyk) for real-time vulnerability data
111
-
- ✅ **Checks** npm audit for additional vulnerabilities
112
-
- ✅ **Blocks** installation if compromised
113
-
- ✅ **Auto-updates** blacklist when new threats detected
114
-
- ✅ **Scans** entire repositories for compromised dependencies
140
+
⚠️ BLOCKED: malicious-package@1.2.3
141
+
Reason: Shai-Hulud worm - credential theft
142
+
Source: Local blacklist
143
+
144
+
Installation aborted. No packages were downloaded.
145
+
```
146
+
147
+
> **📖 For provider configuration**, see [docs/PROVIDERS.md](docs/PROVIDERS.md). For data sources, see [docs/DATA_SOURCES.md](docs/DATA_SOURCES.md).
148
+
149
+
---
115
150
116
151
## 📋 Supported Package Managers
117
152
@@ -124,55 +159,55 @@ yarn add package-name
124
159
125
160
> **Note:** Bun's binary lockfile (`bun.lockb`) is not supported. Use the text-based `bun.lock` format (default in Bun v1.2+) or run `bun install --save-text-lockfile` to migrate.
-**Network providers** (OSV, GitHub): ~100-500ms per package (parallelized)
180
+
-**npm audit**: Variable (npm's own performance)
157
181
182
+
For most installs: **<1 second overhead**. You can disable network checks with `--skipNpmAudit=true --enableOsv=false --enableGitHub=false` for faster scans using only the local blacklist.
This provides **defense in depth**: lockfiles + validation.
197
+
198
+
### What if a package isn't in your blacklist yet?
199
+
200
+
Sentinel checks multiple sources: local blacklist (~800 packages), OSV (100k+ vulnerabilities), GitHub Advisories, and npm audit (when scanning projects with lockfiles). If a zero-day package isn't in any database yet, add it to your [custom blacklist](docs/DATA_SOURCES.md) or report it to the community.
201
+
202
+
### What are the limitations?
203
+
204
+
See [Troubleshooting Guide](docs/TROUBLESHOOTING.md) for detailed information about:
0 commit comments