Security Notes
Security Notes
ArchonHQ is functional for local/self-hosted usage in multi-agent workloads, but there are important hardening tasks before wider deployment.
Immediate Items
- Remove hardcoded credentials from source.
src/app/api/gog-callback/route.tscurrently contains embedded OAuth values.
- Move all secrets to environment variables.
- Restrict Google sign-in domain or allowlist users if needed.
- Add server-side authorization checks for sensitive routes:
- workspace file read/write routes
- task mutation routes
- Validate and sanitize all user input in API routes.
Auth and Access Control
Current:
- NextAuth Google login is enabled.
- Sign-in callback currently allows any Google account.
Recommended:
- Add allowlist/domain checks in NextAuth callbacks.
- Enforce authenticated session in API handlers that mutate data.
- Add role model for admin/editor/read-only actions.
File System Safety
Workspace routes use path.basename, which helps reduce path traversal risk.
Still recommended:
- Enforce strict filename patterns.
- Add max file-size limits.
- Add audit logging for file writes.
Network and Transport
- If running publicly, terminate TLS with known-good cert management.
- Restrict direct DB access from untrusted networks.
- Put auth-protected routes behind trusted reverse proxy rules.
Monitoring and Incident Readiness
At minimum:
- Log auth events.
- Log task/file write operations.
- Capture and alert on repeated API failures.