docs: 完成所有文档的中文翻译并应用到项目

This commit is contained in:
xuxiang
2026-01-28 00:12:54 +08:00
parent 0ced59a26b
commit e133f58e1c
76 changed files with 6808 additions and 6170 deletions

View File

@@ -1,24 +1,24 @@
# Security Guidelines
# 安全指南 (Security Guidelines)
## Mandatory Security Checks
## 强制安全检查 (Mandatory Security Checks)
Before ANY commit:
- [ ] No hardcoded secrets (API keys, passwords, tokens)
- [ ] All user inputs validated
- [ ] SQL injection prevention (parameterized queries)
- [ ] XSS prevention (sanitized HTML)
- [ ] CSRF protection enabled
- [ ] Authentication/authorization verified
- [ ] Rate limiting on all endpoints
- [ ] Error messages don't leak sensitive data
在任何提交Commit)之前:
- [ ] 无硬编码凭据API 密钥、密码、令牌/Tokens
- [ ] 所有用户输入均已验证
- [ ] 预防 SQL 注入(使用参数化查询)
- [ ] 预防 XSS对 HTML 进行净化处理/Sanitized
- [ ] 已启用 CSRF 保护
- [ ] 身份验证/授权已验证
- [ ] 所有端点均已设置速率限制Rate limiting
- [ ] 错误消息不泄露敏感数据
## Secret Management
## 凭据管理 (Secret Management)
```typescript
// NEVER: Hardcoded secrets
// 严禁:硬编码凭据
const apiKey = "sk-proj-xxxxx"
// ALWAYS: Environment variables
// 推荐:环境变量
const apiKey = process.env.OPENAI_API_KEY
if (!apiKey) {
@@ -26,11 +26,11 @@ if (!apiKey) {
}
```
## Security Response Protocol
## 安全响应协议 (Security Response Protocol)
If security issue found:
1. STOP immediately
2. Use **security-reviewer** agent
3. Fix CRITICAL issues before continuing
4. Rotate any exposed secrets
5. Review entire codebase for similar issues
如果发现安全问题:
1. 立即停止STOP
2. 使用 **security-reviewer** 智能体Agent
3. 在继续之前修复严重CRITICAL问题
4. 轮换任何暴露的凭据
5. 审查整个代码库是否存在类似问题