security: 安全规范 + 敏感数据脱敏
- CLAUDE.md 新增安全规范章节(禁止提交 / 必须提供 .env.example) - finance/config/settings.py 硬编码密码移除 - djapi/api/video/audioRead.py API Key 替换为占位符 - 新增 finance/.env.example 示例配置 - .gitignore 解除 .env.example 排除 Co-Authored-By: Simon <simon@doorcome.cn>
This commit is contained in:
@@ -78,3 +78,28 @@ python cli/demo_sentiment_detail.py --ts_code 600519.SH --date 20260603
|
||||
| NLP | Qwen (DashScope / Ollama) | .env 配置 |
|
||||
| Agent | 自研编排器 | finance/agents/ |
|
||||
| API | Django 5.2 + uWSGI | djapi/ |
|
||||
|
||||
## 安全规范
|
||||
|
||||
### 禁止提交
|
||||
|
||||
- `.env`(含真实 key)
|
||||
- API Key(`sk-*`、`TUSHARE_TOKEN` 等)
|
||||
- Cookie / Session
|
||||
- Token / 密钥
|
||||
- 个人隐私数据(手机号、身份证、密码)
|
||||
|
||||
### 必须提供
|
||||
|
||||
- `.env.example` — 仅含占位符的示例配置,如:
|
||||
```
|
||||
TUSHARE_TOKEN=your_token_here
|
||||
QWEN_API_KEY=sk-your-key-here
|
||||
MAC_DB_PASSWORD=your_password_here
|
||||
```
|
||||
|
||||
### 提交前检查
|
||||
|
||||
```bash
|
||||
grep -r "sk-\|token\|_H(lU\|password" --include="*.py" --include="*.md" --include="*.yaml" | grep -v ".example\|your_token\|your_password"
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user