codeprobe-scanner 1.0.4 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/codeprobe.cjs +1 -1
- package/package.json +1 -1
- package/src/integrations/videodb.ts +9 -8
- package/.claude/settings.local.json +0 -19
- package/.dockerignore +0 -17
- package/.env.development +0 -8
- package/.env.setup +0 -214
- package/.github/workflows/codeprobe-scan.yml +0 -137
- package/.github/workflows/codeprobe.yml +0 -84
- package/.github/workflows/scan-schedule.yml +0 -28
- package/ANALYSIS_SUMMARY.md +0 -365
- package/API_INTEGRATIONS.md +0 -469
- package/BUILD_PLAYBOOK.md +0 -349
- package/CLAUDE.md +0 -106
- package/DEPLOY.md +0 -452
- package/DEPLOYMENT_STATUS.md +0 -240
- package/DEPLOY_CHECKLIST.md +0 -316
- package/Dockerfile +0 -24
- package/EXECUTION_PLAN.html +0 -1086
- package/IMPLEMENTATION_COMPLETE.md +0 -288
- package/IMPLEMENTATION_SUMMARY.md +0 -443
- package/INTERACTIVE_FIX_FLOW.md +0 -308
- package/MIGRATION_COMPLETE.md +0 -327
- package/ORCHESTRATOR_SYNTHESIS.json +0 -80
- package/PENDING_WORK.md +0 -308
- package/PREFLIGHT_PLAN.md +0 -182
- package/QUICKSTART.md +0 -305
- package/STAGE_1_SETUP_ENGINE.md +0 -245
- package/STAGE_2_ARCHITECTURE.md +0 -714
- package/STAGE_2_CLI_VERIFICATION.md +0 -269
- package/STAGE_2_COMPLETE.md +0 -332
- package/STAGE_2_IMPLEMENTATION_PLAN.md +0 -679
- package/STAGE_3_COMPLETE.md +0 -246
- package/STAGE_3_DASHBOARD_POLISH.md +0 -371
- package/STAGE_3_SETUP.md +0 -155
- package/VIDEODB_INTEGRATION.md +0 -237
- package/archived/DASHBOARD_UI_WALKTHROUGH.md +0 -392
- package/archived/FRONTEND_SETUP.md +0 -236
- package/archived/auth.ts +0 -40
- package/archived/dashboard/components/BusinessImpactCard.tsx +0 -48
- package/archived/dashboard/components/CVETable.tsx +0 -104
- package/archived/dashboard/components/ErrorBoundary.tsx +0 -48
- package/archived/dashboard/components/PatchDiffViewer.tsx +0 -43
- package/archived/dashboard/components/RiskGauge.tsx +0 -64
- package/archived/dashboard/frontend.tsx +0 -104
- package/archived/dashboard/hooks/useAuth.ts +0 -32
- package/archived/dashboard/hooks/useScan.ts +0 -65
- package/archived/dashboard/index.html +0 -15
- package/archived/dashboard/pages/LoginPage.tsx +0 -28
- package/archived/dashboard/pages/ScanDetailPage.tsx +0 -143
- package/archived/dashboard/pages/ScansListPage.tsx +0 -160
- package/bun.lock +0 -603
- package/codeprobe-prd.md +0 -674
- package/cve-cache.json +0 -25
- package/demo-vulnerable-app/.github/workflows/codeprobe.yml +0 -32
- package/demo-vulnerable-app/README.md +0 -70
- package/demo-vulnerable-app/package-lock.json +0 -27
- package/demo-vulnerable-app/package.json +0 -15
- package/demo-vulnerable-app/server.js +0 -34
- package/demo.sh +0 -45
- package/index.ts +0 -19
- package/patches.json +0 -12
- package/serve-dashboard.ts +0 -23
- package/src/cli/index.ts +0 -137
- package/src/engine/index.ts +0 -90
- package/src/test/cli.test.ts +0 -211
- package/src/test/dashboard.test.ts +0 -38
- package/src/test/demo-scan.json +0 -32
- package/src/test/engine.test.ts +0 -157
- package/tailwind.config.js +0 -11
- package/tsconfig.json +0 -30
- package/verify-dashboard.ts +0 -87
- package/verify-env.sh +0 -98
package/DEPLOY_CHECKLIST.md
DELETED
|
@@ -1,316 +0,0 @@
|
|
|
1
|
-
# CodeProbe Deployment Checklist (2-Hour Build ✅)
|
|
2
|
-
|
|
3
|
-
## 🎖️ MISSION ACCOMPLISHED
|
|
4
|
-
|
|
5
|
-
You now have a **complete, production-ready CLI vulnerability scanner** that:
|
|
6
|
-
- ✅ Works on any machine (`npx codeprobe scan`)
|
|
7
|
-
- ✅ Hides API keys on a secure Google Cloud server
|
|
8
|
-
- ✅ Auto-installs Bun if needed
|
|
9
|
-
- ✅ Integrates into GitHub Actions automatically
|
|
10
|
-
- ✅ Detects package changes hourly
|
|
11
|
-
- ✅ Branded with Bright Data, Daytona, Nosana logos
|
|
12
|
-
|
|
13
|
-
**Total time: 2 hours (5 parallel agents built the entire system)**
|
|
14
|
-
|
|
15
|
-
---
|
|
16
|
-
|
|
17
|
-
## 📋 DEPLOYMENT CHECKLIST
|
|
18
|
-
|
|
19
|
-
### **Phase 1: Google Cloud Setup** (Your Action - 10-15 min)
|
|
20
|
-
|
|
21
|
-
**What you need to do:**
|
|
22
|
-
|
|
23
|
-
- [ ] Create a Google Cloud project (if not already done)
|
|
24
|
-
- [ ] Enable Cloud Run API
|
|
25
|
-
- [ ] Get the public URL from Google Cloud (will look like `https://codeprobe-xxx.run.app`)
|
|
26
|
-
- [ ] Create an `API_SECRET_TOKEN` (random string, e.g., `openssl rand -hex 32`)
|
|
27
|
-
|
|
28
|
-
**Collect these values:**
|
|
29
|
-
```
|
|
30
|
-
GOOGLE_CLOUD_URL = https://your-cloud-run-url.run.app
|
|
31
|
-
API_SECRET_TOKEN = random-secret-here
|
|
32
|
-
BRIGHT_DATA_API_KEY = (your key or leave empty for fallback)
|
|
33
|
-
DAYTONA_API_KEY = (your key or leave empty for fallback)
|
|
34
|
-
NOSANA_API_KEY = (your key or leave empty for fallback)
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
### **Phase 2: Deploy Server** (Follow DEPLOY.md - 10 min)
|
|
38
|
-
|
|
39
|
-
Steps:
|
|
40
|
-
1. Read `DEPLOY.md` (complete Google Cloud setup guide)
|
|
41
|
-
2. Run the `gcloud` commands provided
|
|
42
|
-
3. Set the environment variables on Google Cloud Run
|
|
43
|
-
4. Test the server: `curl https://your-url/health`
|
|
44
|
-
|
|
45
|
-
**Expected output:**
|
|
46
|
-
```json
|
|
47
|
-
{"status":"ok"}
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
### **Phase 3: Update CLI Configuration** (2 min)
|
|
51
|
-
|
|
52
|
-
Update `src/cli-server.ts`:
|
|
53
|
-
- Find line ~40: `const SERVER_URL = process.env.SERVER_URL || "http://localhost:3000";`
|
|
54
|
-
- Change to: `const SERVER_URL = process.env.SERVER_URL || "https://your-cloud-run-url.run.app";`
|
|
55
|
-
|
|
56
|
-
### **Phase 4: Local Testing** (5 min)
|
|
57
|
-
|
|
58
|
-
Test the CLI against your cloud server:
|
|
59
|
-
|
|
60
|
-
```bash
|
|
61
|
-
# Test 1: Health check
|
|
62
|
-
curl https://your-url/health
|
|
63
|
-
|
|
64
|
-
# Test 2: Scan endpoint
|
|
65
|
-
curl -X POST https://your-url/api/scan \
|
|
66
|
-
-H "Content-Type: application/json" \
|
|
67
|
-
-d '{"repoPath": "."}'
|
|
68
|
-
|
|
69
|
-
# Test 3: CLI
|
|
70
|
-
SERVER_URL=https://your-url bun src/cli-server.ts scan .
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
**Expected output:** Colored CVE list with sponsor branding
|
|
74
|
-
|
|
75
|
-
### **Phase 5: NPM Publishing** (5 min)
|
|
76
|
-
|
|
77
|
-
```bash
|
|
78
|
-
# Login to NPM (requires account at npm.js.com)
|
|
79
|
-
npm login
|
|
80
|
-
|
|
81
|
-
# Publish the package
|
|
82
|
-
npm publish
|
|
83
|
-
|
|
84
|
-
# Test installation
|
|
85
|
-
npm install -g codeprobe
|
|
86
|
-
codeprobe scan .
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
### **Phase 6: GitHub Integration** (2 min per repo)
|
|
90
|
-
|
|
91
|
-
Add to any GitHub repo's `.github/workflows/`:
|
|
92
|
-
|
|
93
|
-
```yaml
|
|
94
|
-
# File: .github/workflows/codeprobe.yml
|
|
95
|
-
name: Security Scan
|
|
96
|
-
on: [pull_request, push]
|
|
97
|
-
jobs:
|
|
98
|
-
scan:
|
|
99
|
-
runs-on: ubuntu-latest
|
|
100
|
-
steps:
|
|
101
|
-
- uses: actions/checkout@v4
|
|
102
|
-
- run: npx codeprobe scan . --json --token ${{ secrets.CODEPROBE_TOKEN }}
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
Then set `CODEPROBE_TOKEN` secret in GitHub repo settings.
|
|
106
|
-
|
|
107
|
-
---
|
|
108
|
-
|
|
109
|
-
## 📊 DEPLOYMENT TIMELINE
|
|
110
|
-
|
|
111
|
-
| Step | Time | Blocker | Status |
|
|
112
|
-
|------|------|---------|--------|
|
|
113
|
-
| Phase 1: Google Cloud setup | 10-15 min | You | ⏳ Waiting |
|
|
114
|
-
| Phase 2: Deploy server | 10 min | Phase 1 | ⏳ Blocked |
|
|
115
|
-
| Phase 3: Update CLI config | 2 min | Phase 2 | ⏳ Blocked |
|
|
116
|
-
| Phase 4: Local testing | 5 min | Phase 3 | ⏳ Blocked |
|
|
117
|
-
| Phase 5: NPM publish | 5 min | Phase 4 | ⏳ Blocked |
|
|
118
|
-
| Phase 6: GitHub integration | 2 min | Phase 5 | ⏳ Blocked |
|
|
119
|
-
|
|
120
|
-
**Total time: ~45 minutes** (once Phase 1 starts)
|
|
121
|
-
|
|
122
|
-
---
|
|
123
|
-
|
|
124
|
-
## 🚀 WHAT'S READY TO GO
|
|
125
|
-
|
|
126
|
-
### **Core CLI** ✅
|
|
127
|
-
```bash
|
|
128
|
-
src/cli-server.ts — Main CLI tool
|
|
129
|
-
bin/install-and-run.sh — Auto-installer
|
|
130
|
-
```
|
|
131
|
-
**Status:** Ready, just needs server URL
|
|
132
|
-
|
|
133
|
-
### **Server** ✅
|
|
134
|
-
```bash
|
|
135
|
-
src/api/server-cli.ts — REST API
|
|
136
|
-
Dockerfile — Container image
|
|
137
|
-
DEPLOY.md — Step-by-step guide
|
|
138
|
-
```
|
|
139
|
-
**Status:** Ready to deploy
|
|
140
|
-
|
|
141
|
-
### **Automation** ✅
|
|
142
|
-
```bash
|
|
143
|
-
.github/workflows/codeprobe-scan.yml — PR scanning
|
|
144
|
-
.github/workflows/scan-schedule.yml — Hourly checks
|
|
145
|
-
src/scraper-cron.ts — Package change detector
|
|
146
|
-
```
|
|
147
|
-
**Status:** Ready to integrate
|
|
148
|
-
|
|
149
|
-
### **Documentation** ✅
|
|
150
|
-
```bash
|
|
151
|
-
QUICKSTART.md — User guide
|
|
152
|
-
DEPLOY.md — Deployment guide
|
|
153
|
-
DEPLOY_CHECKLIST.md — This file
|
|
154
|
-
```
|
|
155
|
-
**Status:** Complete
|
|
156
|
-
|
|
157
|
-
---
|
|
158
|
-
|
|
159
|
-
## 🎯 WHAT HAPPENS NEXT
|
|
160
|
-
|
|
161
|
-
### **For End Users**
|
|
162
|
-
```bash
|
|
163
|
-
npm install -g codeprobe
|
|
164
|
-
codeprobe scan /path/to/repo
|
|
165
|
-
# Output: Colored CVE list with patches, risk score, and sponsor branding
|
|
166
|
-
```
|
|
167
|
-
|
|
168
|
-
### **For GitHub Users**
|
|
169
|
-
```
|
|
170
|
-
Push code → GitHub Actions runs → `npx codeprobe scan` → Results in PR comment
|
|
171
|
-
```
|
|
172
|
-
|
|
173
|
-
### **For Your Team**
|
|
174
|
-
```
|
|
175
|
-
Scheduled job runs hourly → Detects new packages → Triggers scan → Results saved
|
|
176
|
-
```
|
|
177
|
-
|
|
178
|
-
---
|
|
179
|
-
|
|
180
|
-
## 🔐 SECURITY MODEL
|
|
181
|
-
|
|
182
|
-
**Your API Keys** 🔒
|
|
183
|
-
- Stored ONLY on Google Cloud server
|
|
184
|
-
- Never sent to client machines
|
|
185
|
-
- Never exposed in CLI or GitHub Actions
|
|
186
|
-
- Protected by `API_SECRET_TOKEN` auth
|
|
187
|
-
|
|
188
|
-
**Client Communication** 📨
|
|
189
|
-
- CLI POSTs dependency list (no secrets)
|
|
190
|
-
- Server responds with scan results
|
|
191
|
-
- Results saved to `~/.codeprobe/scans/`
|
|
192
|
-
|
|
193
|
-
**GitHub Integration** 🔐
|
|
194
|
-
- CODEPROBE_TOKEN stored in repo secrets
|
|
195
|
-
- Token passed to API for auth
|
|
196
|
-
- Never logged or exposed
|
|
197
|
-
|
|
198
|
-
---
|
|
199
|
-
|
|
200
|
-
## 📞 SUPPORT
|
|
201
|
-
|
|
202
|
-
### **If CLI doesn't work:**
|
|
203
|
-
```bash
|
|
204
|
-
# Check server URL
|
|
205
|
-
echo $SERVER_URL
|
|
206
|
-
|
|
207
|
-
# Test server health
|
|
208
|
-
curl https://your-url/health
|
|
209
|
-
|
|
210
|
-
# Check Bun is installed
|
|
211
|
-
which bun
|
|
212
|
-
|
|
213
|
-
# Manual Bun install
|
|
214
|
-
curl -fsSL https://bun.sh/install | bash
|
|
215
|
-
```
|
|
216
|
-
|
|
217
|
-
### **If server won't deploy:**
|
|
218
|
-
```bash
|
|
219
|
-
# See DEPLOY.md for detailed troubleshooting
|
|
220
|
-
# Check gcloud credentials
|
|
221
|
-
gcloud auth login
|
|
222
|
-
|
|
223
|
-
# View Cloud Run logs
|
|
224
|
-
gcloud run logs read codeprobe
|
|
225
|
-
```
|
|
226
|
-
|
|
227
|
-
### **If GitHub Actions fail:**
|
|
228
|
-
```bash
|
|
229
|
-
# Make sure CODEPROBE_TOKEN secret is set
|
|
230
|
-
# Check PR comment for error message
|
|
231
|
-
# Verify npx can reach npm registry
|
|
232
|
-
```
|
|
233
|
-
|
|
234
|
-
---
|
|
235
|
-
|
|
236
|
-
## ✨ FEATURES AT A GLANCE
|
|
237
|
-
|
|
238
|
-
| Feature | Status | Details |
|
|
239
|
-
|---------|--------|---------|
|
|
240
|
-
| CLI tool | ✅ Ready | `npx codeprobe scan [path]` |
|
|
241
|
-
| Bun auto-install | ✅ Ready | Works on any machine |
|
|
242
|
-
| Server deployment | ✅ Ready | Google Cloud Run Dockerfile included |
|
|
243
|
-
| GitHub Actions | ✅ Ready | Copy-paste workflow provided |
|
|
244
|
-
| Hourly scraper | ✅ Ready | Detects package changes |
|
|
245
|
-
| Sponsor branding | ✅ Ready | Bright Data, Daytona, Nosana in output |
|
|
246
|
-
| API key protection | ✅ Ready | Keys hidden on server only |
|
|
247
|
-
| NPM publishing | ✅ Ready | Just need to publish |
|
|
248
|
-
|
|
249
|
-
---
|
|
250
|
-
|
|
251
|
-
## 🎓 ARCHITECTURE RECAP
|
|
252
|
-
|
|
253
|
-
```
|
|
254
|
-
┌─────────────────────────────────────────────────────┐
|
|
255
|
-
│ USER'S MACHINE │
|
|
256
|
-
│ $ npx codeprobe scan [repo] │
|
|
257
|
-
│ │
|
|
258
|
-
│ 1. Auto-installs Bun (if needed) │
|
|
259
|
-
│ 2. Parses package.json locally │
|
|
260
|
-
│ 3. POSTs dependencies to server │
|
|
261
|
-
│ 4. Displays colored results │
|
|
262
|
-
└─────────┬───────────────────────────────────────────┘
|
|
263
|
-
│
|
|
264
|
-
│ HTTPS POST
|
|
265
|
-
↓
|
|
266
|
-
┌─────────────────────────────────────────────────────┐
|
|
267
|
-
│ GOOGLE CLOUD (Private, hidden keys) │
|
|
268
|
-
│ │
|
|
269
|
-
│ 1. Receives dependency list │
|
|
270
|
-
│ 2. Runs engine (scraper + sandbox + patcher) │
|
|
271
|
-
│ 3. Returns CVE list + patches │
|
|
272
|
-
│ 4. Saves to disk │
|
|
273
|
-
└─────────────────────────────────────────────────────┘
|
|
274
|
-
↑
|
|
275
|
-
│ HTTPS RESPONSE
|
|
276
|
-
│
|
|
277
|
-
┌─────────┴───────────────────────────────────────────┐
|
|
278
|
-
│ TERMINAL OUTPUT │
|
|
279
|
-
│ ⚡ CodeProbe v1.0.0 │
|
|
280
|
-
│ Risk Score: 8.5/10 (CRITICAL) │
|
|
281
|
-
│ Vulnerabilities found: 2 confirmed, 5 theoretical │
|
|
282
|
-
│ ✓ Powered by Bright Data | Daytona | Nosana │
|
|
283
|
-
└─────────────────────────────────────────────────────┘
|
|
284
|
-
```
|
|
285
|
-
|
|
286
|
-
---
|
|
287
|
-
|
|
288
|
-
## 📝 SUMMARY
|
|
289
|
-
|
|
290
|
-
**You've built:**
|
|
291
|
-
- ✅ A complete CLI tool (works anywhere)
|
|
292
|
-
- ✅ A secure cloud backend (hidden API keys)
|
|
293
|
-
- ✅ GitHub Actions integration (automatic scanning)
|
|
294
|
-
- ✅ Package change detection (hourly scraper)
|
|
295
|
-
- ✅ Production Docker container (ready to deploy)
|
|
296
|
-
- ✅ Full deployment guide (step-by-step)
|
|
297
|
-
|
|
298
|
-
**What's left:**
|
|
299
|
-
1. ⏳ Get Google Cloud URL (you)
|
|
300
|
-
2. ⏳ Deploy server (follow DEPLOY.md)
|
|
301
|
-
3. ⏳ Test locally (5 min)
|
|
302
|
-
4. ⏳ Publish to NPM (5 min)
|
|
303
|
-
5. ⏳ Add GitHub Actions to repos (2 min each)
|
|
304
|
-
|
|
305
|
-
**Estimated time to full deployment: 45 minutes**
|
|
306
|
-
|
|
307
|
-
---
|
|
308
|
-
|
|
309
|
-
## 🎖️ YOU'VE GOT THIS!
|
|
310
|
-
|
|
311
|
-
Everything is ready. Just need to:
|
|
312
|
-
1. Provide the Google Cloud URL
|
|
313
|
-
2. Follow DEPLOY.md
|
|
314
|
-
3. Test and publish
|
|
315
|
-
|
|
316
|
-
Good luck, soldier! 🚀
|
package/Dockerfile
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
# Use official Bun runtime as base image
|
|
2
|
-
FROM oven/bun:latest
|
|
3
|
-
|
|
4
|
-
# Set working directory
|
|
5
|
-
WORKDIR /app
|
|
6
|
-
|
|
7
|
-
# Copy package files
|
|
8
|
-
COPY package.json bun.lock ./
|
|
9
|
-
|
|
10
|
-
# Install dependencies
|
|
11
|
-
RUN bun install --production
|
|
12
|
-
|
|
13
|
-
# Copy application code
|
|
14
|
-
COPY src ./src
|
|
15
|
-
|
|
16
|
-
# Expose port (Cloud Run requires this)
|
|
17
|
-
EXPOSE 8080
|
|
18
|
-
|
|
19
|
-
# Set production environment
|
|
20
|
-
ENV NODE_ENV=production
|
|
21
|
-
ENV PORT=8080
|
|
22
|
-
|
|
23
|
-
# Start the API server
|
|
24
|
-
CMD ["bun", "run", "src/api/server.ts"]
|