This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
# Muzick — audit journal
|
||||
|
||||
## Goal
|
||||
Audit the muzick project at `/home/kami/apps/muzick/`, file Vikunja tasks for findings, and work on autonomous items.
|
||||
|
||||
## Progress
|
||||
|
||||
### 2026-07-14 — Initial audit
|
||||
|
||||
**Git**: initialized, initial state committed (737bf19). Fixes committed in 42474c6.
|
||||
|
||||
**Project structure**: 196 files — TypeScript/Fastify backend, React/Vite frontend, BullMQ workers, PostgreSQL + Redis + Typesense.
|
||||
|
||||
### Fixes applied
|
||||
1. **AGENTS.md tech stack**: `python/fastapi` → `fastify/typescript` (was wrong)
|
||||
2. **CORS**: Added `@fastify/cors` plugin to backend with env-based origin config
|
||||
3. **`.env.example`**: Created with placeholder values (secrets were only in `.env` which is gitignored)
|
||||
4. **`backend/src/index.ts`**: Removed dead code (empty file, `server.ts` is real entry point)
|
||||
|
||||
### Tasks filed
|
||||
- See Homelab infra project. Key items:
|
||||
- #108: systemd service references dead Python venv (NEEDS FIX)
|
||||
- #109: pin Docker images (NEEDS FIX — minio:latest etc)
|
||||
- #110: N+1 queries in generators (PERFORMANCE)
|
||||
- #111: image proxy SSRF guard (SECURITY)
|
||||
|
||||
### New critical issues found
|
||||
1. **No auth on any API** — `x-user-id` header with hardcoded fallback UUID is the only identity
|
||||
2. **Admin routes unprotected** — anyone can trigger scan/reindex/delete
|
||||
3. **Postgres password "password"** hardcoded in docker-compose.yml
|
||||
4. **Typesense API key "muzick-key"** hardcoded in docker-compose.yml
|
||||
5. **SOCKS proxy IP** `192.168.1.104` exposed in .env and AGENTS.md
|
||||
6. **No tests for any worker service** (1311-line enrichment.service.ts has 0 tests)
|
||||
7. **Frontend never typechecked in CI**
|
||||
8. **No input validation** on many routes (admin, library — `as any` casts)
|
||||
|
||||
### Remaining autonomous work items
|
||||
- #108 — Fix systemd service file (references dead Python venv) — CAN DO
|
||||
- #109 — Pin Docker images in docker-compose.yml — CAN DO
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
services:
|
||||
db:
|
||||
image: postgres:16
|
||||
image: postgres:16-alpine
|
||||
restart: always
|
||||
environment:
|
||||
POSTGRES_USER: user
|
||||
|
||||
+9
-8
@@ -1,15 +1,16 @@
|
||||
[Unit]
|
||||
Description=Muzick Music Player
|
||||
After=network.target
|
||||
Description=Muzick Music Player (Docker Compose)
|
||||
After=docker.service network.target
|
||||
Requires=docker.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
User=kami
|
||||
WorkingDirectory=/home/kami/apps/muzick/backend
|
||||
Environment=MUZICK_PROXY=socks5://127.0.0.1:10808
|
||||
ExecStart=/home/kami/apps/muzick/backend/venv/bin/uvicorn main:app --host 0.0.0.0 --port 5213
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
WorkingDirectory=/home/kami/apps/muzick
|
||||
ExecStart=/usr/bin/docker compose up -d
|
||||
ExecStop=/usr/bin/docker compose down
|
||||
Environment=COMPOSE_FILE=/home/kami/apps/muzick/docker-compose.yml
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
Reference in New Issue
Block a user