This review covers the Reodite application source and locked npm dependencies. It does not certify that the application is unexploitable. Deployment settings, external services, undiscovered defects, and future changes can introduce risk.
Reviewed authentication, API authorization and input handling, session persistence, browser account state, schedule sharing, Markdown and URL rendering, spreadsheet imports, outbound preview requests, agent tools, and deployment defaults. Tests use synthetic accounts, requests, archives, and mocked service boundaries. The audit does not inspect or modify ubc-unified-data, production credentials, or live user records.
| Finding | Exposure | Correction |
|---|---|---|
| Cross-account chat writes | A signed-in attacker with another session's UUID could append messages and overwrite its generated title. | Check ownership before model execution; insert messages through an atomic owner-gated session upsert; scope generated titles to the owner. Read and delete messages through ownership-checked SQL statements. |
| Request-body limits after allocation | Chunked requests bypassed the chat header check; other handlers buffered complete bodies and counted characters instead of bytes. | Stream and count actual bytes before JSON parsing, enforce per-route ceilings and a fixed upload deadline, cancel rejected reads, and match the JSON media type exactly. |
| Forged rate-limit identity | Callers could rotate X-Forwarded-For values to evade anonymous endpoint limits and grow limiter state. |
Ignore forwarding headers unless the operator names a trusted single-IP header; cap retained keys, preserve configured expiry windows, and limit login attempts by account too. |
| Cross-account browser state | A new account could receive the previous account's local degree plan or unsent draft. Delayed saves could select a newer account's token. | Tag planner ownership, clear foreign planner/schedule state before publishing identity changes, bind token getters and API clients to one session, remount account UI, and scope persisted drafts by account. Preserve ambiguous legacy plans for manual recovery instead of adopting them. |
| Automatic schedule disclosure | Opening an invitation joined the visitor and exposed their uploaded schedule to group members. | Read invitations without joining; require an explicit sharing confirmation. Limit invitation guesses per account. |
| Preview DNS rebinding and unbounded reads | An attacker controlling DNS for an allowed UBC hostname could change the address between validation and connection. Upstream bodies could exceed the intended limit. | Pin native HTTPS connections to the validated addresses while retaining hostname/TLS verification. Validate redirects and oEmbed requests, restrict ports and public address ranges, enforce streamed byte limits and one deadline, and revalidate cached image destinations. |
| Building lookup path injection | Untrusted building names entered the Meilisearch SDK's document URL path and could escape the document endpoint. | Permit only validated building IDs in exact lookups; send names through search. Tests record requests through the installed SDK. Actual disclosure from a live Meilisearch instance was not tested. |
| Advisory model execution limits | The model could continue requesting tools after the requested stopping point or submit an oversized parallel tool batch. | Enforce hard model-turn and total tool-call ceilings in code. Return a generic client error for unexpected stream failures. |
| Spreadsheet decompression amplification | A small uploaded XLSX could inflate large unused or required entries on the browser thread. | Skip unrelated entries, validate ZIP structure, bound compressed input, entry count, actual decompressed output and resolved cell text, and reject XML DTD/entity declarations. |
| Password suffix truncation | Registration accepted passwords whose suffix bcrypt did not authenticate. | Reject new passwords over 72 UTF-8 bytes. Existing affected credentials need a reset; their hashes cannot establish the missing suffix. |
| Unsafe deployment defaults | Compose exposed database/search ports on all interfaces with predictable fallback credentials. Development origins accepted a wildcard. | Bind infrastructure and the development container to loopback, require configured credentials, remove the development-origin wildcard, exclude environment-file variants from images, and run the application container without root. |
JWT verification also restricts algorithms and required lifetime claims, and production signing requires at least 32 secret bytes. New passwords require 12 characters. Private JSON and chat responses use Cache-Control: no-store. These controls supplement the vulnerability fixes.
- Generate separate random secrets for Postgres, Meilisearch, and JWT signing. Rotate deployed sample credentials. Editing
.envdoes not change a password inside an existing Postgres volume. - Serve production traffic through HTTPS. Configure TLS, HSTS, firewall rules, request/header limits, connection deadlines, distributed rate limits, and concurrency limits at the reverse proxy. The application limiter is process-local and resets on restart. Without a trusted proxy identity, anonymous callers share one conservative bucket.
- Set
TRUSTED_CLIENT_IP_HEADERonly when the proxy overwrites that header with one validated client IP and clients cannot bypass the proxy. Do not trust a forwarded chain supplied by the caller. - Give the application a Meilisearch key limited to the reads and indexes it needs. Keep ingestion/admin credentials separate. Protect Postgres backups and database access with the same care as live user records.
- Enforce provider spending limits and account/storage quotas before a public launch. Per-request tool limits do not prevent distributed denial of service or abuse through many accounts. Provider calls do not yet share an end-to-end cancellation/deadline contract with disconnected clients.
- Logout clears browser authentication; it does not revoke a copied JWT at the server. Tokens can remain valid until their seven-day expiry. A revocation/password-reset design is still required for targeted session invalidation.
- Legacy bcrypt hashes cannot establish the suffix of a password longer than 72 bytes. Affected users need a credential reset. Login preserves compatibility with existing hashes.
- The browser stores authentication tokens and caches in localStorage. Ownership tags prevent normal cross-account UI/API mixing; they do not encrypt the browser profile. A future same-origin script compromise could read stored data. If browser storage refuses deletion, logout revokes the current in-memory session but cannot guarantee durable removal across reloads. The response CSP blocks framing, objects, foreign form submissions and foreign base URLs; it is not a strict script-source policy.
- Treat model responses and dataset prose as untrusted content. Prompt instructions do not establish authorization. Keep tool capabilities read-only and constrain their request parameters independently of the model.
- Preview tests verify transport options and pinned lookup callbacks with offline fixtures, not a live TLS exchange. OS DNS lookups cannot be cancelled; late answers cannot initiate requests after the deadline. The image redirect does not pin the browser's subsequent DNS lookup.
- Spreadsheet parsing remains synchronous, with finite input/output ceilings. Do not describe the limits as proof against browser resource exhaustion on all devices.
The planner preserves untagged or malformed legacy cache bytes under reodite-planner.unowned-backup and excludes them from automatic rendering and upload. If backup fails or a different backup already exists, it keeps the original reodite-planner value intact. Authenticate the original owner before manually recovering/importing that data. The application does not infer ownership from the next account that signs in.
Account drafts use reodite.chat-draft:<encoded-user-id>. The application does not restore the old unowned reodite.chat-draft key. Guest drafts remain in memory.
Verification on 2026-09-30:
| Check | Result |
|---|---|
npm test -- --maxWorkers=2 |
189 files, 2,110 tests passed; zero failures |
npx tsc --noEmit --incremental false |
Exit 0 |
npm run lint -- --max-diagnostics=1000 |
Exit 0; 26 warnings and 7 informational diagnostics |
npm run format:check |
Exit 0 |
npm audit --json |
Zero reported vulnerabilities |
Isolated npm run build |
Exit 0; three filesystem-tracing warnings in the unchanged src/server/data.ts |
| Built-server HTTP smoke checks | Public page/assets and security headers, private-route authentication, real JWT verification, body/media-type limits, rejected preview URLs, and forwarding-header spoof resistance passed |
The production build used a disk-backed copy of the application source and installed dependencies, with fixture credentials and unavailable loopback service endpoints. It excluded .env* files and the data submodule. Source hashes matched the build input. The smoke server logged the expected database migration connection refusal at the fixture endpoint; the checks do not establish successful database integration.
The regression checks include red-green reproduction, real JWT cryptography, actual Meilisearch SDK request construction, mocked native HTTPS transport, synthetic XLSX archives, and real React providers/stores with mocked API responses. No browser visual review took place.
Mocked SQL tests verify ownership predicates and query contracts. They do not substitute for concurrent PostgreSQL integration tests. This environment denied Docker socket access; the audit did not bypass that restriction. No production penetration test, live provider call, credential rotation, TLS scan, or infrastructure deployment took place.
npm audit reports published advisories for the dependency versions it recognizes. A zero-vulnerability report does not establish that dependencies contain no security defects.