mirror of
https://github.com/Komediruzecki/token-circles.git
synced 2026-10-20 09:46:43 +02:00
The server itself went in e5931959. What stayed behind was documentation for
it that nobody could follow, because the files it told you to build had gone
with the server.
Deleted:
- docs/self-hosting.md and docs/docker.md — 19 KB of `docker compose`
instructions against a Dockerfile and docker-compose.yml that no longer
exist. Both were marked "Retired" at the top, which does not help someone
who reads past the banner. They are at tag v5.9.3 for anyone still running
an image built from that server.
- .env.example — APP_PORT=3847, PORT, SESSION_SECRET,
DATABASE_PATH=db/finance.db, SMTP_*, DEFAULT_USERNAME. Every variable was
that server's, and nothing in the tree reads any of them: the Worker takes
wrangler.toml vars plus .dev.vars, the frontend takes VITE_* from
frontend/.env*.
Corrected:
- README.md, docs/README.md, AGENTS.md — pointed at the deleted guides.
- SECURITY.md described the Worker's security features as a contrast against
a "deprecated" Express server that is not deprecated, it is gone.
- ROADMAP.md carried an open checkbox for bringing
backend/routes/importRoutes.js to import parity — unreachable work on a
deleted file.
- docs/readiness-audit-agent-prompt.md told the auditor not to fix bugs in
backend/, a directory it will not find.
- frontend/vite.config.ts told you to set API_PROXY_TARGET to "the legacy
Node/SQLite backend (http://127.0.0.1:3847)" and claimed the Playwright
suite pinned it there. Both Playwright configs have pinned it at the Worker
since the retirement.
Kept, deliberately, and AGENTS.md now says why: docs/specs/backend/ and
test/e2e/specs/ are the API contract, written against the Express routes but
describing behaviour the Worker carried over; and the
`// Port of backend/routes/<name>.js` headers in worker/src/routes/ are
provenance for why a handler is shaped the way it is.
Closes #406
2.5 KiB
2.5 KiB
Security Policy
Reporting a Vulnerability
If you discover a security vulnerability in Finance Manager, please use GitHub's private vulnerability reporting to disclose it securely. Alternatively, you can open a public issue stating that you found a potential security issue and a maintainer will provide a private channel for details.
Do not include exploit details or sensitive information in public issues.
Supported Versions
| Version | Supported |
|---|---|
| 5.x (latest) | Yes |
| < 5.0 | No |
Security Features
These describe the Cloudflare Worker backend (worker/), which is the only server this
project ships.
- Passwords hashed with PBKDF2-HMAC-SHA256 (WebCrypto), per-user random salt, constant-time verification. Login is protected against user enumeration (a dummy hash is always verified) and rate-limited per IP and per email.
- Authentication is a stateless HS256 JWT in an
HttpOnly,SameSite=Lax,Securecookie. "Sign out everywhere" is supported by bumping a per-user token version, which invalidates all outstanding tokens. - Parameterized SQL everywhere (D1); table/column identifiers in the query helpers are validated against an allowlist regex to prevent injection.
- Per-request authorization: every data query is scoped to the caller's profile/user; foreign keys supplied by the client (accounts, categories, transactions, receipts, …) are ownership-checked.
- Security headers on API responses (Content-Security-Policy,
Strict-Transport-Security,X-Frame-Options: DENY,X-Content-Type-Options: nosniff,Referrer-Policy) and on the static app responses. - Rate limiting on authentication endpoints and on expensive/destructive endpoints (imports, PDF/report generation, data export, and profile-data reset).
- CORS locked to a single configured origin with credentials (fails closed if unset).
- Bot protection via Cloudflare Turnstile on the auth forms.
- Billing webhooks (Stripe) are verified by signature with a timestamp replay window, and the user's plan is only ever set from a verified webhook — never trusted from the client.
Data storage & encryption
Data is encrypted at rest by the platform (Cloudflare D1 and R2 use AES-256) and in transit via TLS. In the default local-first mode, data never leaves the browser (IndexedDB). End-to-end (zero-knowledge) encryption of synced data is on the roadmap, not yet implemented; see the docs.