feat: MeshSafe 文件摆渡安全卫士 v1.0 初始提交

核心功能:
- 6 层检测管线: L0 结构分析 → L1 ClamAV → L2 文档深度检测 → L3 关键词匹配 → L4 YARA → L5 PE/二进制
- FastAPI + PostgreSQL + Redis + Docker Compose 架构
- 客户端 HMAC-SHA256 签名鉴权 + 限流 + 幂等性
- 控制台 UI (登录/Dashboard/诊断中心/策略管理/任务列表/测试中心/产品介绍页)
- 三层诊断定时器 (error_scan 30s / db_aggregate 30s / container_check 5min)

并发与稳定性修复:
- 诊断定时器 Redis 时间槽位锁 (多 worker 同一槽位只有一个执行)
- JSONL 存储 fcntl 跨进程排他锁 + 容错解码 + 原子重写
- 移除 SQLite fallback, 统一 PostgreSQL
- API_CLIENTS 脱敏为环境变量, .env 已 .gitignore
This commit is contained in:
2026-10-28 19:07:11 +08:00
commit 16f134e328
113 changed files with 24604 additions and 0 deletions

39
requirements.txt Normal file
View File

@@ -0,0 +1,39 @@
# =============================================================================
# MeshSafe 生产部署依赖(Python 3.12 + Debian slim)
# =============================================================================
# Web 框架
fastapi==0.115.6
uvicorn[standard]==0.34.0
python-multipart==0.0.20
pydantic==2.10.5
pydantic-settings==2.7.1
jinja2==3.1.4
# 数据库
sqlalchemy==2.0.37
psycopg2-binary==2.9.10
# 缓存 / 限流(Redis,单机不可用时自动降级内存)
redis==5.2.1
# 安全
cryptography==44.0.0
# 检测引擎
oletools==0.60.2
olefile>=0.47
msoffcrypto-tool>=5.4.1
pefile==2023.2.7
yara-python==4.5.0
pypdf==5.1.0
python-magic==0.4.27
# 工具
httpx==0.28.1
requests==2.32.3
PyYAML==6.0.2
python-dateutil==2.9.0.post0
# 诊断套件
docker==7.2.0