Files
devos/Docs/devos-v1-phase2/08-SECURITY-HARDENING.md
T
phptits 0d6cd37579 DevOS v1 + Phase 2: unified resource model, infra ops, website deployment, AI chat ops
- Monorepo: NestJS API (Fastify) + React web (antd/ProComponents) + shared packages
- PostgreSQL/Prisma (unified resources, relations graph, audit, events, jobs)
- Auth/RBAC/workspace isolation, credential vault (AES-256-GCM)
- Servers/SSH, Docker discovery & lifecycle, Job Center
- Websites & deployments (git provider credential clone, env, health verification)
- Domains/DNS (Cloudflare adapter), certificates (TLS probe), monitoring
- Automation (cron/event/webhook HMAC + notifications), AI Gateway, MCP (29 tools)
- AI chat window (LLM function-calling + rules fallback, SSE streaming, approvals)
- Notes: Vditor WYSIWYG markdown editor, non-blocking autosave
- Tests: 35 unit/security tests; UI audit clean (desktop+mobile, deep links)
2026-09-10 06:35:55 +00:00

36 lines
1.2 KiB
Markdown

# 08 — Security Hardening
这是继续开发前的 P0 gate。
## 立即处理
1. 修改/禁用 README 中暴露的默认管理员账号密码。
2. 轮换 APP_SECRET。
3. 轮换 ENCRYPTION_KEY 前先设计 credential migration/clear strategy;不要盲目轮换导致现有凭据全部不可解密。
4. 检查公网注册策略;生产模式默认关闭公开注册,或增加 invite-only。
5. 检查 `/root/.ldns/config.toml`,确认 token 不进入项目、日志、git、API 响应。
6. 删除冒烟测试 credential/test-token。
## Auth
增加:
- password change
- session invalidation strategy(即使 V1 暂不实现完整 revoke list,也必须保留扩展点)
- login rate limit
- register rate limit
- optional invite-only mode
## Credentials
- AES-256-GCM 保留
- key 不存数据库
- secret access audit
- API never returns plaintext
- logs redact tokens/passwords/keys
- export disabled by default
## Command security
危险命令检测只是最后一道防线,不是授权机制。
真正权限模型必须先于 command execution。
## Production config
生产启动时必须拒绝明显开发默认 secret。
`.env.example` 可以有 placeholder,但 runtime 必须校验。