codeprobe-scanner 1.0.3 → 1.0.5
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/package.json +2 -2
- 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/bin/{codeprobe.js → codeprobe.cjs} +0 -0
package/BUILD_PLAYBOOK.md
DELETED
|
@@ -1,349 +0,0 @@
|
|
|
1
|
-
# CodeProbe MVP — Build Playbook
|
|
2
|
-
**Event:** AgentForge SG Super AI Edition (June 2026)
|
|
3
|
-
**Timeline:** 6–7 hours
|
|
4
|
-
**Teams:** Up to 3 engineers (can work in parallel or sequentially)
|
|
5
|
-
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
## Overview
|
|
9
|
-
|
|
10
|
-
This playbook coordinates the **3 independent stages** needed to ship a working MVP for the hackathon. Each stage is **self-contained** so teams can pick it up and work on it independently, or hand off between people.
|
|
11
|
-
|
|
12
|
-
**Critical Path:** Stage 1 → Stage 2 → Stage 3 (sequential)
|
|
13
|
-
**Parallel Work:** Stage 1 + Stage 2 (backend) can work in parallel if 2 engineers; Stage 2 (CLI) + Stage 3 (dashboard) can run in parallel after Stage 1 done.
|
|
14
|
-
|
|
15
|
-
---
|
|
16
|
-
|
|
17
|
-
## What You're Building
|
|
18
|
-
|
|
19
|
-
```
|
|
20
|
-
CLI (Bun CLI executable)
|
|
21
|
-
↓
|
|
22
|
-
Core Engine (parser, scraper, sandbox, report)
|
|
23
|
-
↓
|
|
24
|
-
Real-Time Exploit Verification (Daytona)
|
|
25
|
-
↓
|
|
26
|
-
Dashboard (React) + GitHub OAuth
|
|
27
|
-
↓
|
|
28
|
-
Judges See: Exploit confirmed + Business impact ($4.9M risk)
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
**The "Wow Moment":** Live sandbox runs ejs template injection RCE exploit, achieves code execution, shows as "CONFIRMED EXPLOITABLE" in dashboard. Judges understand: "This isn't theoretical — we verified the exploit works."
|
|
32
|
-
|
|
33
|
-
---
|
|
34
|
-
|
|
35
|
-
## Stage 1: Core Engine (0–2 hours)
|
|
36
|
-
**File:** [STAGE_1_SETUP_ENGINE.md](./STAGE_1_SETUP_ENGINE.md)
|
|
37
|
-
**Team:** 1–2 engineers
|
|
38
|
-
**Deliverable:** Working Bun project with dependency parser, CVE scraper, Daytona sandbox integration, report builder.
|
|
39
|
-
|
|
40
|
-
**What Gets Built:**
|
|
41
|
-
- Dependency parser (extract from package.json)
|
|
42
|
-
- Bright Data CVE scraper (with fallback to cached JSON)
|
|
43
|
-
- Daytona sandbox spawner (isolated container for PoC exploit)
|
|
44
|
-
- Pre-baked patch system (guaranteed-working patches for demo CVE)
|
|
45
|
-
- JSON report builder
|
|
46
|
-
- Integration test (full pipeline working)
|
|
47
|
-
|
|
48
|
-
**Success Metric:** `bun test` passes. Engine runs end-to-end on demo repo, produces valid JSON report with "CONFIRMED EXPLOITABLE" for ejs RCE CVE.
|
|
49
|
-
|
|
50
|
-
**Key Decisions Locked:**
|
|
51
|
-
- Demo CVE: **ejs CVE-2022-29078 (Template Injection RCE)** — Real npm package, vulnerable 3.1.0–3.1.6, fixed 3.1.7+, local PoC
|
|
52
|
-
- Patches: Pre-baked + LLM fallback with validation
|
|
53
|
-
- Fallbacks: Bright Data fails → cached JSON. Daytona crashes → retry once.
|
|
54
|
-
|
|
55
|
-
**Dependency Chain:** None (can start immediately)
|
|
56
|
-
|
|
57
|
-
**Blocker for Stage 2/3:** None — can start Stage 2 while Stage 1 finishes
|
|
58
|
-
|
|
59
|
-
---
|
|
60
|
-
|
|
61
|
-
## Stage 2: CLI + Verification (2–4 hours)
|
|
62
|
-
**File:** [STAGE_2_CLI_VERIFICATION.md](./STAGE_2_CLI_VERIFICATION.md)
|
|
63
|
-
**Team:** 1 engineer (can overlap with Stage 1)
|
|
64
|
-
**Dependency:** Stage 1 must compile + test pass
|
|
65
|
-
|
|
66
|
-
**What Gets Built:**
|
|
67
|
-
- CLI entry point (`codeprobe scan`, `codeprobe scan --fix`, `codeprobe report`)
|
|
68
|
-
- Real-time progress logging (events from engine → CLI output)
|
|
69
|
-
- Config management (GitHub token, API keys)
|
|
70
|
-
- Error handling + fallback logic (graceful degradation)
|
|
71
|
-
- Git integration (`--fix` creates branch, commits patches)
|
|
72
|
-
- Integration tests (full CLI tested)
|
|
73
|
-
- Demo script (for easy rehearsal)
|
|
74
|
-
|
|
75
|
-
**Success Metric:** `codeprobe scan ./demo-vulnerable-app` completes in <3 minutes, shows risk score + "CONFIRMED EXPLOITABLE", `--fix` creates git branch.
|
|
76
|
-
|
|
77
|
-
**Key Decisions Locked:**
|
|
78
|
-
- CLI Framework: No heavy framework, use chalk + table.js
|
|
79
|
-
- Real-time: Event emitter (engine) → CLI polls/logs progress
|
|
80
|
-
- Exit codes: 0 = success, 1 = vulns found, 2 = scan failed
|
|
81
|
-
- Fallbacks: Bright Data fail → use cache, Daytona crash → continue with "verification failed"
|
|
82
|
-
|
|
83
|
-
**Blocker for Stage 3:** CLI must work end-to-end (so dashboard has valid scan results to display)
|
|
84
|
-
|
|
85
|
-
**Parallel Work:** Can start Stage 3 (dashboard) design while waiting for Stage 2 to finish, but needs sample JSON scan to work with.
|
|
86
|
-
|
|
87
|
-
---
|
|
88
|
-
|
|
89
|
-
## Stage 3: Dashboard + Auth + Polish (4–7 hours)
|
|
90
|
-
**File:** [STAGE_3_DASHBOARD_POLISH.md](./STAGE_3_DASHBOARD_POLISH.md)
|
|
91
|
-
**Team:** 1–2 engineers (1 frontend + 1 backend for API/auth)
|
|
92
|
-
**Dependency:** Stage 2 must produce valid scan JSON
|
|
93
|
-
|
|
94
|
-
**What Gets Built:**
|
|
95
|
-
- REST API (list scans, get details, OAuth callback)
|
|
96
|
-
- GitHub OAuth integration (login, token storage)
|
|
97
|
-
- React dashboard (scans list, scan detail view)
|
|
98
|
-
- CVE table (severity, status, patch info)
|
|
99
|
-
- **Business Impact callout** (RED BOX, "$4.9M breach risk" — judges MUST see this)
|
|
100
|
-
- Patch diff viewer (syntax highlighted)
|
|
101
|
-
- Error + empty states (no silent failures in security tool)
|
|
102
|
-
- Responsive design (mobile, tablet, desktop)
|
|
103
|
-
- Integration tests + demo rehearsal
|
|
104
|
-
|
|
105
|
-
**Success Metric:** Dashboard loads in <2s, GitHub OAuth works, judges understand business impact of confirmed CVE.
|
|
106
|
-
|
|
107
|
-
**Key Decisions Locked:**
|
|
108
|
-
- Framework: React 18 + Vite (via Bun HTML imports, no separate build)
|
|
109
|
-
- Styling: TailwindCSS
|
|
110
|
-
- Auth: GitHub OAuth (same token as CLI)
|
|
111
|
-
- Views: Technical view only (Executive view cut to save time)
|
|
112
|
-
- Data: Read from `~/.codeprobe/scans/` (stateless, no database)
|
|
113
|
-
|
|
114
|
-
**Blocker for Demo Day:** All stages must pass. If dashboard not ready, can show results via CLI + fallback video.
|
|
115
|
-
|
|
116
|
-
**Stretch Goals (if time > 6h):**
|
|
117
|
-
- PDF export
|
|
118
|
-
- Scan sharing (one-time links)
|
|
119
|
-
- Supply chain warning banner
|
|
120
|
-
|
|
121
|
-
---
|
|
122
|
-
|
|
123
|
-
## Critical Path Timeline
|
|
124
|
-
|
|
125
|
-
```
|
|
126
|
-
Hour 0: Prep (API keys provisioned, demo repo ready)
|
|
127
|
-
Hours 0–2: Stage 1 (Core Engine) [E1, E2]
|
|
128
|
-
Hours 1–3: Stage 2 (CLI) starts after S1 [E1]
|
|
129
|
-
Hours 3–5: Stage 3 (Dashboard) starts after S2 [E2, E3]
|
|
130
|
-
Hours 5–7: Polish + demo rehearsal [All hands]
|
|
131
|
-
Hour 7: Demo day!
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
**If running in parallel (2–3 engineers):**
|
|
135
|
-
- **Engineer 1:** Stage 1 (0–2h) → Stage 2 CLI (2–4h) → Demo rehearsal (4–7h)
|
|
136
|
-
- **Engineer 2:** Stage 1 support (0–2h) → Stage 3 Dashboard (3–7h) → Demo rehearsal (4–7h)
|
|
137
|
-
|
|
138
|
-
**If running sequentially (1 engineer):**
|
|
139
|
-
- Stages run 0–2h → 2–4h → 4–7h
|
|
140
|
-
- Must prioritize ruthlessly: CLI + exploit verification > Dashboard > Polish
|
|
141
|
-
|
|
142
|
-
---
|
|
143
|
-
|
|
144
|
-
## Shared Resources
|
|
145
|
-
|
|
146
|
-
### API Keys / Credentials
|
|
147
|
-
- `BRIGHT_DATA_API_KEY` (CVE scraping, Bright Data)
|
|
148
|
-
- `DAYTONA_API_KEY` (sandbox provisioning)
|
|
149
|
-
- `NOSANA_API_KEY` (LLM patch generation, optional)
|
|
150
|
-
- `GITHUB_CLIENT_ID` + `GITHUB_CLIENT_SECRET` (OAuth for dashboard)
|
|
151
|
-
- Store in `.env` (not committed to git)
|
|
152
|
-
|
|
153
|
-
### Demo Repository
|
|
154
|
-
- Created during Stage 1 prep
|
|
155
|
-
- Contains HTTP/2 vulnerable server
|
|
156
|
-
- Path: `demo-vulnerable-app/` (local or separate repo)
|
|
157
|
-
- Must work with Stage 1 parser + Stage 2 CLI
|
|
158
|
-
|
|
159
|
-
### Pre-Baked Patches
|
|
160
|
-
- `patches.json` (created in Stage 1)
|
|
161
|
-
- Fallback if LLM patch generation fails
|
|
162
|
-
- Guaranteed to work (tested locally before demo)
|
|
163
|
-
|
|
164
|
-
### Cache Files
|
|
165
|
-
- `cve-cache.json` (fallback if Bright Data fails)
|
|
166
|
-
- `~/.codeprobe/scans/` directory (scans saved here)
|
|
167
|
-
- Sync these between machines if teams work on different laptops
|
|
168
|
-
|
|
169
|
-
---
|
|
170
|
-
|
|
171
|
-
## Stage Dependencies
|
|
172
|
-
|
|
173
|
-
```
|
|
174
|
-
Stage 1 (Engine)
|
|
175
|
-
├─ Required by: Stage 2, Stage 3
|
|
176
|
-
└─ Blockers: API keys provisioned, demo repo ready
|
|
177
|
-
|
|
178
|
-
Stage 2 (CLI)
|
|
179
|
-
├─ Requires: Stage 1
|
|
180
|
-
├─ Required by: Stage 3
|
|
181
|
-
└─ Blockers: Valid scan JSON in ~/.codeprobe/scans/
|
|
182
|
-
|
|
183
|
-
Stage 3 (Dashboard)
|
|
184
|
-
├─ Requires: Stage 1, Stage 2
|
|
185
|
-
├─ Required by: Demo day
|
|
186
|
-
└─ Blockers: GitHub OAuth app registered
|
|
187
|
-
```
|
|
188
|
-
|
|
189
|
-
---
|
|
190
|
-
|
|
191
|
-
## Handoff Protocol (Multi-Team)
|
|
192
|
-
|
|
193
|
-
If different people work on different stages:
|
|
194
|
-
|
|
195
|
-
**End of Stage 1 (Engineer 1 → Engineer 2):**
|
|
196
|
-
```
|
|
197
|
-
Push to: git branch stage-1-engine
|
|
198
|
-
Create summary:
|
|
199
|
-
- All tests passing ✓
|
|
200
|
-
- CLI can run `bun run src/cli/index.ts scan ./demo-vulnerable-app`
|
|
201
|
-
- JSON report at ~/.codeprobe/scans/{id}.json
|
|
202
|
-
- Known issues: (any API timeout patterns observed)
|
|
203
|
-
- Cache files: cve-cache.json, patches.json both present
|
|
204
|
-
```
|
|
205
|
-
|
|
206
|
-
**End of Stage 2 (Engineer 1 → Engineer 2):**
|
|
207
|
-
```
|
|
208
|
-
Push to: git branch stage-2-cli
|
|
209
|
-
Create summary:
|
|
210
|
-
- CLI fully functional, all tests passing ✓
|
|
211
|
-
- `codeprobe scan` produces valid output in <3 min
|
|
212
|
-
- `codeprobe scan --fix` creates git branch + commits
|
|
213
|
-
- Known timing: Sandbox takes Xs, scraping takes Ys (for dashboard UX)
|
|
214
|
-
- Dashboard should expect scan JSON at path: ~/.codeprobe/scans/latest.json
|
|
215
|
-
```
|
|
216
|
-
|
|
217
|
-
**End of Stage 3:**
|
|
218
|
-
```
|
|
219
|
-
Push to: main or stage-3-dashboard
|
|
220
|
-
Demo rehearsal completed 3–5 times
|
|
221
|
-
Fallback video recorded: demo-fallback-video.mp4
|
|
222
|
-
Ready for hackathon demo!
|
|
223
|
-
```
|
|
224
|
-
|
|
225
|
-
---
|
|
226
|
-
|
|
227
|
-
## Demo Day Checklist
|
|
228
|
-
|
|
229
|
-
**30 minutes before demo:**
|
|
230
|
-
- [ ] Start CLI scan (dry run on demo repo)
|
|
231
|
-
- [ ] Verify exploit verification works (shows "CONFIRMED EXPLOITABLE")
|
|
232
|
-
- [ ] Start API server: `bun run src/api/server.ts`
|
|
233
|
-
- [ ] Start Vite dashboard: `bun run dev`
|
|
234
|
-
- [ ] Test OAuth login
|
|
235
|
-
- [ ] Verify dashboard loads recent scan
|
|
236
|
-
- [ ] Check internet connection (for Bright Data scraping)
|
|
237
|
-
- [ ] Have fallback video ready (`demo-fallback-video.mp4`)
|
|
238
|
-
- [ ] Charge laptop + have power cable nearby
|
|
239
|
-
|
|
240
|
-
**During demo (2 minutes):**
|
|
241
|
-
1. **CLI Scan (0–1 min):** Run `codeprobe scan ./demo-vulnerable-app`, show real-time progress, result: "1 CONFIRMED EXPLOITABLE, 2 THEORETICAL"
|
|
242
|
-
2. **Dashboard (1–1.5 min):** Open browser, show dashboard, risk score gauge, business impact callout ($4.9M), patch diff
|
|
243
|
-
3. **Patch Application (1.5–2 min):** Show `codeprobe scan --fix` created git branch, code diffs, explain judges could merge PR to fix
|
|
244
|
-
|
|
245
|
-
**If live demo fails:** Play fallback video, then walk judges through dashboard + explain architecture (less impressive but still demonstrates concept)
|
|
246
|
-
|
|
247
|
-
---
|
|
248
|
-
|
|
249
|
-
## Time Buffers + Contingencies
|
|
250
|
-
|
|
251
|
-
| Scenario | Mitigation |
|
|
252
|
-
|----------|-----------|
|
|
253
|
-
| Stage 1 takes 3h instead of 2h | Stage 2 starts late, compress CLI polish. Keep Stage 3 (dashboard) start on time by having 2nd engineer prep meanwhile. |
|
|
254
|
-
| Bright Data API fails | Use cached CVE data (pre-load `cve-cache.json`). Demo still works, show fallback logic. |
|
|
255
|
-
| Daytona sandbox slow | Pre-test sandbox startup time. If >30s/CVE, adjust demo expectations. Can pre-record sandbox execution for fallback. |
|
|
256
|
-
| GitHub OAuth setup fails | Hardcode demo token for demo day (not secure, but works). Move OAuth auth to post-demo polish. |
|
|
257
|
-
| Dashboard slow to load | Pre-optimize: lazy-load CVE details, pagination (10 CVEs at a time), code split pages. |
|
|
258
|
-
| No time for dashboard polish | Cut CSS perfection. Keep functional + usable. Business impact callout must be visible. |
|
|
259
|
-
|
|
260
|
-
**Hard constraints:**
|
|
261
|
-
- CLI must work (non-negotiable)
|
|
262
|
-
- ejs RCE exploit verification must work (the whole point — RCE is the "wow moment")
|
|
263
|
-
- Business impact message must be clear (judges need to understand "$4.9M risk")
|
|
264
|
-
|
|
265
|
-
**First cuts if time is tight:**
|
|
266
|
-
1. Dashboard CSS polish (keep functional, bare-bones styling)
|
|
267
|
-
2. PDF export
|
|
268
|
-
3. Supply chain warnings
|
|
269
|
-
4. Responsive design (test on desktop only, tablet/mobile as nice-to-have)
|
|
270
|
-
5. Error state polish (keep errors functional, not pretty)
|
|
271
|
-
|
|
272
|
-
---
|
|
273
|
-
|
|
274
|
-
## Success Criteria (Hackathon Judging)
|
|
275
|
-
|
|
276
|
-
**Must Ship for MVP to Work:**
|
|
277
|
-
- ✅ Working CLI that scans a repo
|
|
278
|
-
- ✅ Live Bright Data + Daytona integration
|
|
279
|
-
- ✅ Real exploit verification (not theoretical)
|
|
280
|
-
- ✅ At least 1 confirmed exploitable CVE in demo
|
|
281
|
-
- ✅ Patches generated (pre-baked or LLM)
|
|
282
|
-
- ✅ Business impact messaging ($4.9M)
|
|
283
|
-
|
|
284
|
-
**Strong Demo (Judges Impressed):**
|
|
285
|
-
- ✅ Dashboard with scan results
|
|
286
|
-
- ✅ Risk score visualization
|
|
287
|
-
- ✅ GitHub OAuth working
|
|
288
|
-
- ✅ Patch diff viewer
|
|
289
|
-
- ✅ Real-time progress (judges see it happen live)
|
|
290
|
-
|
|
291
|
-
**Nice to Have (Polish):**
|
|
292
|
-
- ✅ GitHub bot (cut from MVP scope, post-hackathon)
|
|
293
|
-
- ✅ CI/CD GitHub Action (cut from MVP scope)
|
|
294
|
-
- ✅ MCP server (cut from MVP scope)
|
|
295
|
-
- ✅ Executive view (cut from MVP scope, kept Business Impact callout)
|
|
296
|
-
|
|
297
|
-
---
|
|
298
|
-
|
|
299
|
-
## Common Mistakes to Avoid
|
|
300
|
-
|
|
301
|
-
❌ **Don't:**
|
|
302
|
-
- Try to add GitHub bot in Stage 2 (cuts into time, Stage 2 must ship)
|
|
303
|
-
- Skip pre-baking patches (LLM fallback is a stretch, demo must work)
|
|
304
|
-
- Ignore error states (silence in security tools is dangerous)
|
|
305
|
-
- Forget business impact messaging (judges won't understand value without it)
|
|
306
|
-
- Over-engineer dashboard (basic React + TailwindCSS is enough)
|
|
307
|
-
- Skip fallback video (network fails, APIs timeout — always have backup)
|
|
308
|
-
|
|
309
|
-
✅ **Do:**
|
|
310
|
-
- Lock demo CVE early (ejs RCE, not Log4Shell or HTTP/2)
|
|
311
|
-
- Test end-to-end on demo repo before final demo
|
|
312
|
-
- Pre-record fallback video (insurance policy)
|
|
313
|
-
- Keep CLI + exploit verification as core (everything else is bonus)
|
|
314
|
-
- Polish business impact callout (red box, $4.9M, judges see it first)
|
|
315
|
-
- Rehearse demo 3–5 times before hackathon day
|
|
316
|
-
|
|
317
|
-
---
|
|
318
|
-
|
|
319
|
-
## Questions?
|
|
320
|
-
|
|
321
|
-
Each stage file (STAGE_1, STAGE_2, STAGE_3) has:
|
|
322
|
-
- Detailed deliverables
|
|
323
|
-
- Acceptance criteria
|
|
324
|
-
- Known risks + mitigations
|
|
325
|
-
- Setup checklist
|
|
326
|
-
- Test cases
|
|
327
|
-
- Files to create/modify
|
|
328
|
-
|
|
329
|
-
**Start with:** Read the stage file for your assigned stage, follow the checklist, build iteratively, run tests.
|
|
330
|
-
|
|
331
|
-
**Got stuck?** Check the "Known Risks" section of your stage file — likely mitigation is already documented.
|
|
332
|
-
|
|
333
|
-
---
|
|
334
|
-
|
|
335
|
-
## Post-Hackathon Roadmap
|
|
336
|
-
|
|
337
|
-
If the team continues (not in scope for MVP):
|
|
338
|
-
- [ ] Multi-language support (Python, Rust, Java)
|
|
339
|
-
- [ ] GitHub bot auto-commenting on PRs
|
|
340
|
-
- [ ] CI/CD GitHub Action
|
|
341
|
-
- [ ] MCP server for Claude Desktop
|
|
342
|
-
- [ ] Database + user accounts
|
|
343
|
-
- [ ] Supply chain attack monitoring
|
|
344
|
-
- [ ] Executive dashboard view
|
|
345
|
-
- [ ] Team collaboration features
|
|
346
|
-
|
|
347
|
-
---
|
|
348
|
-
|
|
349
|
-
**Go ship the MVP. See you on demo day! 🚀**
|
package/CLAUDE.md
DELETED
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
Default to using Bun instead of Node.js.
|
|
3
|
-
|
|
4
|
-
- Use `bun <file>` instead of `node <file>` or `ts-node <file>`
|
|
5
|
-
- Use `bun test` instead of `jest` or `vitest`
|
|
6
|
-
- Use `bun build <file.html|file.ts|file.css>` instead of `webpack` or `esbuild`
|
|
7
|
-
- Use `bun install` instead of `npm install` or `yarn install` or `pnpm install`
|
|
8
|
-
- Use `bun run <script>` instead of `npm run <script>` or `yarn run <script>` or `pnpm run <script>`
|
|
9
|
-
- Use `bunx <package> <command>` instead of `npx <package> <command>`
|
|
10
|
-
- Bun automatically loads .env, so don't use dotenv.
|
|
11
|
-
|
|
12
|
-
## APIs
|
|
13
|
-
|
|
14
|
-
- `Bun.serve()` supports WebSockets, HTTPS, and routes. Don't use `express`.
|
|
15
|
-
- `bun:sqlite` for SQLite. Don't use `better-sqlite3`.
|
|
16
|
-
- `Bun.redis` for Redis. Don't use `ioredis`.
|
|
17
|
-
- `Bun.sql` for Postgres. Don't use `pg` or `postgres.js`.
|
|
18
|
-
- `WebSocket` is built-in. Don't use `ws`.
|
|
19
|
-
- Prefer `Bun.file` over `node:fs`'s readFile/writeFile
|
|
20
|
-
- Bun.$`ls` instead of execa.
|
|
21
|
-
|
|
22
|
-
## Testing
|
|
23
|
-
|
|
24
|
-
Use `bun test` to run tests.
|
|
25
|
-
|
|
26
|
-
```ts#index.test.ts
|
|
27
|
-
import { test, expect } from "bun:test";
|
|
28
|
-
|
|
29
|
-
test("hello world", () => {
|
|
30
|
-
expect(1).toBe(1);
|
|
31
|
-
});
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
## Frontend
|
|
35
|
-
|
|
36
|
-
Use HTML imports with `Bun.serve()`. Don't use `vite`. HTML imports fully support React, CSS, Tailwind.
|
|
37
|
-
|
|
38
|
-
Server:
|
|
39
|
-
|
|
40
|
-
```ts#index.ts
|
|
41
|
-
import index from "./index.html"
|
|
42
|
-
|
|
43
|
-
Bun.serve({
|
|
44
|
-
routes: {
|
|
45
|
-
"/": index,
|
|
46
|
-
"/api/users/:id": {
|
|
47
|
-
GET: (req) => {
|
|
48
|
-
return new Response(JSON.stringify({ id: req.params.id }));
|
|
49
|
-
},
|
|
50
|
-
},
|
|
51
|
-
},
|
|
52
|
-
// optional websocket support
|
|
53
|
-
websocket: {
|
|
54
|
-
open: (ws) => {
|
|
55
|
-
ws.send("Hello, world!");
|
|
56
|
-
},
|
|
57
|
-
message: (ws, message) => {
|
|
58
|
-
ws.send(message);
|
|
59
|
-
},
|
|
60
|
-
close: (ws) => {
|
|
61
|
-
// handle close
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
development: {
|
|
65
|
-
hmr: true,
|
|
66
|
-
console: true,
|
|
67
|
-
}
|
|
68
|
-
})
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
HTML files can import .tsx, .jsx or .js files directly and Bun's bundler will transpile & bundle automatically. `<link>` tags can point to stylesheets and Bun's CSS bundler will bundle.
|
|
72
|
-
|
|
73
|
-
```html#index.html
|
|
74
|
-
<html>
|
|
75
|
-
<body>
|
|
76
|
-
<h1>Hello, world!</h1>
|
|
77
|
-
<script type="module" src="./frontend.tsx"></script>
|
|
78
|
-
</body>
|
|
79
|
-
</html>
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
With the following `frontend.tsx`:
|
|
83
|
-
|
|
84
|
-
```tsx#frontend.tsx
|
|
85
|
-
import React from "react";
|
|
86
|
-
import { createRoot } from "react-dom/client";
|
|
87
|
-
|
|
88
|
-
// import .css files directly and it works
|
|
89
|
-
import './index.css';
|
|
90
|
-
|
|
91
|
-
const root = createRoot(document.body);
|
|
92
|
-
|
|
93
|
-
export default function Frontend() {
|
|
94
|
-
return <h1>Hello, world!</h1>;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
root.render(<Frontend />);
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
Then, run index.ts
|
|
101
|
-
|
|
102
|
-
```sh
|
|
103
|
-
bun --hot ./index.ts
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
For more information, read the Bun API docs in `node_modules/bun-types/docs/**.mdx`.
|