Files
FrenoCorp/package.json
Michael Freno 754fce269f fix: implement critical security remediation for authentication and authorization
- Add Clerk token verification to tRPC context (server/trpc/index.ts)
- Remove client-controlled authorId/reviewedById from revisions router
- Require JWT_SECRET environment variable, remove hardcoded fallback
- Add table name validation to prevent SQL injection in backup logic
- Fix TRPCContext type to use better-sqlite3 instead of LibSQL
- Update revisions router tests to use proper tRPC v11+ API
- Add resetInMemoryState function for test isolation

Security fixes address:
- Critical: Authentication bypass via missing token verification
- Critical: User impersonation via client-controlled IDs
- High: Insecure WebSocket defaults with hardcoded secrets
- High: SQL injection vulnerability in backup logic

All tests passing (24/24).
2026-04-25 08:24:45 -04:00

77 lines
2.3 KiB
JSON

{
"name": "frenocorp-collaboration",
"version": "0.1.0",
"description": "FrenoCorp real-time collaboration layer with Yjs and WebSocket",
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"preview": "vite preview",
"test": "vitest",
"test:coverage": "vitest run --coverage",
"server:dev": "tsx watch server/websocket/index.ts",
"server:build": "tsc -p tsconfig.server.json",
"lint": "eslint src/ server/",
"lint:fix": "eslint src/ server/ --fix",
"db:generate": "drizzle-kit generate",
"db:push": "drizzle-kit push",
"db:migrate": "drizzle-kit migrate",
"db:seed": "tsx src/db/seed.ts",
"tauri:dev": "tauri dev",
"tauri:build": "tauri build",
"tauri:build:macos": "TAURI_TARGET=x86_64-apple-darwin tauri build",
"tauri:build:windows": "TAURI_TARGET=x86_64-pc-windows-msvc tauri build",
"tauri:build:linux": "TAURI_TARGET=x86_64-unknown-linux-gnu tauri build",
"tauri:test": "cargo test --manifest-path src-tauri/Cargo.toml",
"tauri:icons": "bash src-tauri/generate-icons.sh"
},
"dependencies": {
"@clerk/backend": "^3.4.1",
"@clerk/clerk-js": "^6.7.5",
"@libsql/client": "^0.17.3",
"@solidjs/router": "^0.16.1",
"@tanstack/react-query": "^5.100.1",
"@tanstack/solid-query": "^5.100.1",
"@trpc/client": "^11.16.0",
"@trpc/react-query": "^11.16.0",
"@trpc/server": "^11.16.0",
"@types/node": "^25.6.0",
"@types/peerjs": "^0.0.30",
"drizzle-kit": "^0.31.10",
"drizzle-orm": "^0.45.2",
"peerjs": "^1.5.5",
"solid-js": "^1.8.14",
"ws": "^8.16.0",
"y-websocket": "^1.5.0",
"yjs": "^13.6.12",
"zod": "^4.3.6"
},
"devDependencies": {
"@tauri-apps/cli": "^2.1.0",
"@types/better-sqlite3": "^7.6.13",
"@types/ws": "^8.5.10",
"@typescript-eslint/eslint-plugin": "^7.0.2",
"@typescript-eslint/parser": "^7.0.2",
"better-sqlite3": "^12.9.0",
"eslint": "^8.56.0",
"eslint-plugin-solid": "^0.13.2",
"tsx": "^4.7.1",
"typescript": "^5.3.3",
"vite": "^5.1.4",
"vite-plugin-solid": "^2.8.2",
"vitest": "^1.3.1"
},
"engines": {
"node": ">=18.0.0"
},
"keywords": [
"yjs",
"crdt",
"websocket",
"collaboration",
"solidjs",
"tauri"
],
"license": "MIT"
}