安全不是一个功能。
它是基础。
本页每一项说明都对应 sh0 代码库中的真实代码。2026 年 3 月 17 日的内部审计发现了 34 个问题;截至报告日期,6 个严重问题已修复。
审计结果
覆盖认证、加密、API 接口和前端的内部安全审计。
2026 年 3 月 17 日内部审计:共发现 34 个问题(6 个严重、10 个高危、12 个中危、6 个低危)。截至报告日期,6 个严重问题和 10 个高危问题中的 8 个已修复;其余问题计划在加固阶段处理。自 2026 年 10 月 5 日起,已修复的漏洞将在此发布。
我们保护什么
六个核心安全层,每个都在 Rust 源代码中经过验证。
AES-256-GCM Encryption
All secrets, env vars, SSH keys, and API tokens -- and backup files when backup encryption is enabled -- encrypted with AES-256-GCM via the ring crate. Nonce format: nonce(12) || ciphertext || tag(16). Authenticated encryption ensures both confidentiality and integrity.
Argon2id Password Hashing
OWASP-recommended Argon2id for all password storage. PHC-format hash output with unique random salt per password. TOTP backup codes also hashed with Argon2id.
HTTP-Only Cookie Auth
Access tokens (15 min) and refresh tokens (30 days) stored in HTTP-only cookies with SameSite=Strict. Secure flag auto-enabled in production. CSRF double-submit cookie pattern.
API Key Security
Format: sh0_ prefix + 32 random chars. SHA-256 hashed storage, prefix-based lookup (first 8 chars). Constant-time comparison via the subtle crate to prevent timing attacks.
RBAC & Project Permissions
Owner, Admin, Developer, Viewer roles with per-project membership. Dedicated extractors (AuthUser, AdminUser, ProjectAccess) verify authorization on every API endpoint.
TOTP Two-Factor Auth
RFC 6238 compliant, 6-digit codes, 30-second step, SHA-1 with +/-1 skew tolerance. 8 backup codes per user, each Argon2id-hashed. Provisioning URI for QR code setup.
纵深防御
Encrypted at rest
Master key derived via PBKDF2-HMAC-SHA256 with 100,000 iterations and a 16-byte salt. Every secret -- env vars, SSH private keys, backup dumps, API tokens -- is AES-256-GCM encrypted before touching disk.
Authenticated at every layer
JWT (HS256) from Bearer header or HTTP-only cookie, with API key fallback. Refresh tokens SHA-256 hashed in the database. Expired tokens caught with specific error codes. Multi-strategy auth on every request.
Rate-limited and throttled
Per-IP sliding window: 10 login attempts/15 min, 5 TOTP attempts/5 min, 50 invitations/min. Global read/write rate limits with automatic cleanup. Health and webhook paths exempt.
Audited and traceable
Every significant action logged: user ID, action, resource type/ID, IP address (X-Forwarded-For aware), timestamp. Paginated queries with filtering by user, resource type, and resource ID.
安全堆栈
每一层都加强下一层 -- 攻破一层,其余仍然坚守
加密依赖
没有自定义加密。仅使用经过实战检验的 Rust crate。
源代码中已验证
每个发现都映射到实现它的 crate。
没有 sh0
- x Store tokens in localStorage (XSS-vulnerable)
- x Write custom encryption per service
- x Manage SSH keys in plaintext on disk
- x Hope nobody SQL-injects your queries
- x Share root credentials across team
- x No audit trail of who did what
使用 sh0
- HTTP-only cookies, SameSite=Strict, CSRF protection
- AES-256-GCM for everything, master key with PBKDF2
- SSH keys encrypted at rest, loaded in-memory only
- Parameterized queries + input validation everywhere
- RBAC with 4 roles + per-project permissions
- Full audit log with IP, user, action, resource tracing
常见问题
sh0 做过安全审计吗? +
How are secrets stored? +
How does authentication work? +
What about two-factor authentication? +
Can one user access another user's containers? +
What about container security? +
一键模板的安全由谁负责? +
Which cryptographic libraries do you use? +
报告安全漏洞
请发送邮件至下方地址,注明 sh0 版本、复现步骤和观察到的影响。请勿公开提交 issue。
如未收到回复,也可以使用联系表单: sh0.dev/contact
我们的承诺
- 72 小时内确认收到报告。
- 修复目标:严重漏洞 7 天内,高危漏洞 30 天内,其余 90 天内。
- 严重和高危漏洞会在修复前 48 至 72 小时预告:仅包含日期、严重程度和组件,细节随修复一同发布。
- 安全修复将以补丁版本发布,不与新功能混合,以便补丁模式的自动更新可以单独安装。
善意研究
对于在您自己的 sh0 实例上善意开展的研究,我们不会采取法律行动:不访问他人数据,不干扰不属于您的服务,并在公开前给我们合理的修复时间。
奖励
上线初期不提供现金奖励:经研究者同意后,我们会在本页公开致谢。外部渗透测试之后可能推出奖励计划。
致谢
尚未收到报告,首批致谢名单将显示在这里。
安全公告
已发布的公告,以及 sh0 控制面板今后在每次检查更新时将读取的机器可读订阅源。