aa65f10c52
Audit docs:
- docs/reports/audit-phase-2{a-j}-line-walk.md: per-file line walk findings
- docs/reports/audit-phase-2-findings-matrix.md: 63 findings (52 fixed, 3 partial, 7 accepted)
- docs/reports/2026-05-23-full-audit-report.md: full audit consolidation
- docs/reports/audit-full-vs-phase2-reconciliation.md: cross-reference
- docs/reports/audit-phase-2-walk-closure.md: closure sign-off
Project docs:
- docs/project/phase-2-audit-remediation.md: SSOT for all fixes
- docs/project/alert-push-policy.md: dashboard alert design decisions
- docs/project/production-verification-checklist.md: first-deploy checklist
- docs/project/script-execution.md: script platform design
- docs/project/wsl-integration-test.md: WSL code-only verification guide
- docs/project/line-walk-audit-standard.md: audit methodology
- docs/project/mysql-mcp-setup.md: MCP config guide
Changelogs: 18 entries (2026-05-22 to 2026-05-23)
Project memory: CLAUDE.md, AGENTS.md updated to reflect current state
Deploy: nginx_https.conf template updated
Co-authored-by: Cursor <cursoragent@cursor.com>
2.4 KiB
2.4 KiB
Phase 2 审计待办修复(P1/P2 批次)
日期: 2026-05-22
已修复
| ID | 说明 | 变更 |
|---|---|---|
| F2h-03 | Agent /exec/kill 不得对未登记 pid 调用 os.kill |
web/agent/agent.py 仅杀 _running_procs 内进程,否则 404 |
| F2h-04 | /exec/wait 超时未清理 _running_procs |
超时分支 pop + kill/wait |
| F2a-08 | 安装后安装向导仍可 POST | install.py 统一 _reject_if_installed() → 403(除 GET /status) |
| F2g-03 | apply_update 中 json.loads(server_ids) 无防护 |
_parse_server_ids_json() |
| F2i-01 | update_status 无记录时 flush 异常 |
返回 Optional;flush_to_mysql 跳过并出队 |
| F2i-02 | 死模型 AgentExec |
已从 schemas.py 删除 |
| F2g-05 / F2h-01 | credential_id 未贯通 |
模型列 + schema + API + 存库 + retry 继承 |
| F2b-05 | duration_seconds 用 .seconds |
sync_engine_v2.py → total_seconds() |
| F2a-13 | Dashboard stats.online 用 MySQL |
servers.py 优先 Redis heartbeat:* |
| F2g-02(部分) | 脚本回调无限流 | script_callback_rate.py + agent.py 429 |
第二批(2026-05-22 续)
| ID | 说明 | 变更 |
|---|---|---|
| F2d-03 | 安装模式仍可连 WS | main.py 安装模式 /ws/ → 503 |
| F2d-04 | MySQL 异常原文进 Telegram | self_monitor.py 通用文案 |
| F2g-02 | 回调可能 HTTP | master_callback_url() 非 localhost 强制 HTTPS |
| F2g-06 / F2h-02 | script-callback 无限流 | 见上(已完成) |
| F2c-05 | 迁移失败仅 log | migrations.py 非重复列错误 re-raise |
| F2f-05 | CREATE DATABASE f-string | bootstrap_database.py 库名白名单 |
| F2f-07 | wsl 脚本硬编码路径 | wsl_mcp_mysql.sh 相对仓库根目录 |
| F2g-04(文档) | 重试新 id | API parent_execution_id + SSOT 文档 |
| F2f-01 / F2g-01(文档) | shell 执行面 | SSOT §4.1 + Agent WARNING 日志 |
| — | 前端 credential | scripts.html DB 凭据下拉 |
| F2f-06(部分) | P0 回归测试 | tests/test_security_unit.py |
未改(需架构/运维)
- F2f-01 / F2g-01:
subprocessshell 执行(文档/隔离) - F2g-04:重试生成新 execution id(产品设计)
- F2a-10 / F2d-02:全局 JWT 收紧
- F2e-03 / F2a-18:告警 WS — 已讨论接受,不做换票
- F2f-04:轮换曾泄露 API Key(运维)
部署注意
启动时会执行 schema migration:script_executions.credential_id。已有库无需手工 SQL。