Skip to content

Commit f29f237

Browse files
author
Prince Tripathi
committed
feat: rename to @horizoneng/sentinel and streamline documentation
- Package renamed to @horizoneng/sentinel (private for initial NPM publish) - README restructured for better reading flow - Removed duplications across documentation - Consolidated DATA_SOURCES.md priority tables
1 parent c5043e3 commit f29f237

8 files changed

Lines changed: 441 additions & 208 deletions

File tree

.npmignore

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Test files
2+
sample-test-repo/
3+
tests/
4+
5+
# GitHub specific
6+
.github/
7+
8+
# Development files
9+
.cursorrules
10+
.cursorignore
11+
.gitignore
12+
13+
# Contributing docs (GitHub only)
14+
CONTRIBUTING.md
15+
SECURITY.md
16+
CODE_OF_CONDUCT.md
17+
18+
# IDE
19+
.vscode/
20+
.idea/
21+
*.swp
22+
*.swo
23+
*~
24+
25+
# OS files
26+
.DS_Store
27+
Thumbs.db
28+
29+
# Logs
30+
*.log
31+
npm-debug.log*
32+
yarn-debug.log*
33+
yarn-error.log*
34+
35+
# Temporary files
36+
*.zip
37+
temp.*
38+
test-*.json
39+
test-*.lock
40+

README.md

Lines changed: 107 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -2,38 +2,47 @@
22

33
**A secure wrapper for npm, yarn, pnpm, and bun that prevents installation of compromised packages.**
44

5+
*Built to counter supply chain attacks like the Shai-Hulud npm worm.*
6+
57
## 🚨 Why This Exists
68

79
### The Problem: Supply Chain Attacks Are Rising
810

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:
1012

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
1315
- **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
1516

1617
### The Solution: Pre-Install Blocking
1718

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.
20+
21+
### ✨ Key Features
1922

20-
-**Intercepts** package manager commands (`npm install`, `yarn add`, etc.)
21-
-**Validates** packages against blacklists and vulnerability databases **BEFORE** download
22-
-**Blocks** installation if compromised - malicious code never executes
23-
-**Works automatically** - transparent to developers, no learning curve
24-
-**Zero dependencies** - uses only Node.js built-ins (maximum security)
23+
- **Pre-install blocking** - Validates packages BEFORE download, preventing malicious code execution
24+
- **~800 compromised packages** - Bundled blacklist covering Shai-Hulud worm and similar threats (as of 2025-01)
25+
- **Real-time vulnerability checks** - OSV, GitHub Advisories, and optional Snyk integration
26+
- **Zero npm dependencies** - Uses only Node.js built-ins (reduces supply-chain attack surface)
27+
- **Multi-package manager** - Full support for npm, yarn, pnpm, and bun
28+
- **Transparent operation** - Works via shell aliases, no workflow changes
29+
- **CI/CD ready** - Scan lockfiles in automated pipelines
30+
- **Custom blacklists** - Add organization-specific security policies
2531

2632
### What Makes It Unique
2733

28-
| Feature | npm audit | Snyk | Dependabot | Sentinel |
29-
|---------|-----------|------|------------|----------|
30-
| **Pre-install blocking** |||||
31-
| **Command interception** |||||
32-
| **Custom blacklist** |||||
33-
| **Real-time providers** |||||
34-
| **Zero dependencies** |||||
34+
| Feature | npm audit | Snyk (free) | Dependabot | Socket.dev | Phylum.io | Sentinel |
35+
|---------|-----------|-------------|------------|------------|-----------|----------|
36+
| **Blocks before download** ||| N/A | ⚠️ Platform | ⚠️ Platform | ✅ Local-only |
37+
| **No SaaS/account required** ||| N/A | ⚠️ Free tier | ⚠️ Free tier ||
38+
| **Shell alias integration** ||| N/A ||||
39+
| **Multi-PM (npm/yarn/pnpm/bun)** |||| ⚠️ npm focus | ⚠️ varies ||
40+
| **Zero npm dependencies** ||| N/A ||||
41+
| **Open source** ||| Partial ||||
42+
| **Cost** | Free | Freemium | Free | Freemium | Freemium | Free |
43+
| **Transparent (no workflow changes)** |||| ⚠️ varies | ⚠️ varies ||
3544

36-
**Built to counter supply chain attacks like the Shai-Hulud npm worm and similar threats.**
45+
> **Note:** Comparison based on publicly available information as of November 2024. Features and pricing may vary.
3746
3847
---
3948

@@ -43,16 +52,16 @@ Sentinel Package Manager is the **ONLY tool** that blocks compromised packages *
4352

4453
| Method | Best For | Command |
4554
|--------|----------|---------|
46-
| **npm Global** | Individual developers | `npm install -g sentinel` |
47-
| **Dev Dependency** | Team projects, CI/CD | `npm install --save-dev sentinel` |
55+
| **npm Global** | Individual developers | `npm install -g @horizoneng/sentinel` |
56+
| **Dev Dependency** | Team projects, CI/CD | `npm install --save-dev @horizoneng/sentinel` |
4857
| **Git Clone** | Development, contributing | `git clone https://github.com/ds-horizon/sentinel.git && cd sentinel && ./bin/install.sh` |
4958

5059
---
5160

5261
### Option 1: npm Global Install (Recommended)
5362
```bash
5463
# Install from npm
55-
npm install -g sentinel
64+
npm install -g @horizoneng/sentinel
5665

5766
# Verify installation
5867
sentinel status
@@ -73,19 +82,19 @@ yarn add package-name
7382

7483
# To uninstall later
7584
sentinel remove aliases
76-
npm uninstall -g sentinel
85+
npm uninstall -g @horizoneng/sentinel
7786
```
7887

7988
### Option 2: Dev Dependency (Project-Level)
8089
```bash
8190
# Install in your project
82-
npm install --save-dev sentinel
91+
npm install --save-dev @horizoneng/sentinel
8392

8493
# Initialize config file
85-
npx sentinel init
94+
npx @horizoneng/sentinel init
8695

8796
# Use for scanning
88-
npx sentinel scan
97+
npx @horizoneng/sentinel scan
8998
```
9099

91100
### Option 3: Git Clone & Install (Manual Setup)
@@ -103,15 +112,41 @@ npm install package-name
103112
yarn add package-name
104113
```
105114

106-
## 🛡️ What It Does
115+
> **📖 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
107139

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+
---
115150

116151
## 📋 Supported Package Managers
117152

@@ -124,55 +159,55 @@ yarn add package-name
124159

125160
> **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.
126161
127-
## ✨ Key Features
162+
---
128163

129-
### Security
130-
- **Pre-install blocking** - Validates packages BEFORE installation, preventing malicious code execution
131-
- **795+ compromised packages** - Bundled blacklist covering Shai-Hulud worm and similar threats
132-
- **Real-time vulnerability checks** - Integrates with OSV, GitHub Advisories, and Snyk (runs automatically)
133-
- **Zero dependencies** - Uses only Node.js built-ins (maximum security, zero attack surface)
134-
- **Auto-updates** - Automatically adds new vulnerabilities to blacklist from npm audit and providers
164+
## 📚 Documentation
135165

136-
### Developer Experience
137-
- **Transparent operation** - Use package managers normally, validation happens automatically
138-
- **All package managers** - Full support for npm, yarn, pnpm, and bun
139-
- **Flexible deployment** - User-wide or per-repository installation
140-
- **Clear error messages** - Explains exactly why installation was blocked
141-
- **Multiple data sources** - Local JSON files, API endpoints, or vulnerability providers
166+
- **[Usage Guide](docs/USAGE.md)** - Complete command reference and examples
167+
- **[Data Sources Guide](docs/DATA_SOURCES.md)** - Configure blacklists, API endpoints, and providers
168+
- **[Providers Guide](docs/PROVIDERS.md)** - OSV, GitHub Advisories, Snyk setup
169+
- **[Troubleshooting](docs/TROUBLESHOOTING.md)** - Common issues, limitations, and solutions
142170

143-
### Enterprise Ready
144-
- **Company-wide protection** - User-wide installation for organization-wide security
145-
- **Custom blacklists** - Support for company-specific security policies
146-
- **CI/CD integration** - Works seamlessly in automated pipelines
147-
- **Comprehensive scanning** - Repository-wide analysis with recursive package.json scanning
171+
---
148172

149-
## 📚 Documentation
173+
## ❓ FAQ
150174

151-
- **[Usage Guide](docs/USAGE.md)** - Complete command reference and examples
152-
- **[Data Sources Guide](docs/DATA_SOURCES.md)** - Three ways to get vulnerability data (JSON files, API endpoints, providers)
153-
- **[Providers Guide](docs/PROVIDERS.md)** - Vulnerability providers (OSV, GitHub, Snyk) configuration
154-
- **[Troubleshooting](docs/TROUBLESHOOTING.md)** - Common issues and solutions
175+
### Does Sentinel slow down installs?
155176

156-
## 🔄 How It Works
177+
**Minimal impact:**
178+
- **Local blacklist check**: <10ms (in-memory lookup)
179+
- **Network providers** (OSV, GitHub): ~100-500ms per package (parallelized)
180+
- **npm audit**: Variable (npm's own performance)
157181

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.
183+
184+
### Can I use Sentinel in CI/CD?
185+
186+
**Yes!** Add to your CI pipeline:
187+
188+
```yaml
189+
- name: Install dependencies
190+
run: npm ci
191+
192+
- name: Scan for compromised packages
193+
run: npx @horizoneng/sentinel scan
158194
```
159-
Developer: npm install package-name
160-
161-
Wrapper: Intercepts command
162-
163-
Validation: Checks blacklist + providers (OSV, GitHub, Snyk) + npm audit
164-
165-
├─ Compromised → BLOCK ❌
166-
└─ Safe → Install ✅
167-
```
168195
169-
**Providers run automatically out of the box:**
196+
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:
205+
- Alias bypass scenarios
206+
- Shell and OS compatibility
207+
- npm audit limitations
208+
- Version matching behavior
170209
171-
| Provider | Default | Token Required | Rate Limit |
172-
|----------|---------|----------------|------------|
173-
| **OSV** | ✅ Enabled | ❌ No | High |
174-
| **GitHub Advisories** | ✅ Enabled | ⚠️ Optional | 60/hour (public), 5000/hour (with token) |
175-
| **Snyk** | ❌ Disabled | ✅ Required | High |
210+
**No Telemetry:** Sentinel sends zero telemetry and never uploads your dependency graph or package information.
176211
177212
## 🤝 Contributing
178213

0 commit comments

Comments
 (0)