Commit Graph
464 Commits
Author SHA1 Message Date
lintsinghua 4743ec6867 docs(spec): add DeepAudit production-hardening spec set
Phased plan + cross-cutting designs to raise accuracy and lower FP/FN:
- Phase 0-4: eval harness, FP gating, judge/calibration, recall (taint/
  call-graph/sink coverage), verification ladder, native tool-calling
- Agent role refactor + per-role specs (recon/analysis/orchestrator)
- Tool redesign/inventory/access-forms + reliability & availability

16 docs under spec/, indexed by spec/README.md.
2026-06-20 00:04:35 +08:00
lintsinghua 6a99a0760a Update DeepAudit description in README v3.4.0 2026-06-19 13:37:54 +08:00
lintsinghuaandClaude Opus 4.6 51d94acb4c test: add comprehensive test suite for production readiness
Backend (951 tests):
- Core security: JWT, password hashing, encryption
- Agent core: state, config, validation, retry, circuit breaker,
  rate limiter, persistence, fallback, context, executor
- API endpoints: tasks, projects, rules, prompts, auth deps
- Services: json_parser, event_manager, stream_handler, tools,
  tokenizer, prompt_cache, report generator, scanner utils
- Models, schemas, LLM factory/base adapter

Frontend (331 tests, vitest + @testing-library/react):
- API clients: serverClient, agentTasks, prompts, rules
- Utilities: fetchWrapper, errorHandler, logger, projectUtils,
  zipStorage, performanceMonitor, utils
- Hooks: useAsync, useDebounce, useLocalStorage
- Config, services, AgentAudit utils
- Test infra: vitest.config.ts, setup.ts, coverage-v8

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
v3.3.0
2026-04-01 09:19:45 +08:00
lintsinghua 66ccd41ba2 Update README.md 2026-04-01 09:11:19 +08:00
lintsinghua 133050f176 Merge pull request #199 from qqqlsm666/v3.0.0
Update README_EN.md
2026-03-25 22:49:16 +08:00
lsm c266acb105 Update README_EN.md 2026-03-25 22:46:51 +08:00
lintsinghua e760db20bb Update README.md 2026-03-14 17:41:02 +08:00
lintsinghua ba363a6f90 Update README.md 2026-03-14 17:22:53 +08:00
lintsinghua e2cca64a18 Update README.md 2026-03-14 17:18:41 +08:00
lintsinghuaandClaude Opus 4.6 666d8a1a9c 更新README
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-14 17:17:21 +08:00
lintsinghuaandClaude Opus 4.6 50c6d739c1 docs: 添加 OpenClaw 项目 6 个 GHSA 安全漏洞挖掘成果
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-14 17:15:48 +08:00
meraklbz d19c62215c fix bug v3.2.0 2026-02-11 22:33:43 +08:00
meraklbz ea20eb15e5 fix bug 2026-02-10 23:13:51 +08:00
meraklbz 702571d1ef fix bug 2026-02-10 21:04:14 +08:00
meraklbz 3aaa913d7b cve 2026-02-09 23:55:09 +08:00
meraklbz 1f1ca4494f Merge remote-tracking branch 'origin/v3.0.0' into v3.0.0 2026-02-09 23:54:25 +08:00
meraklbz 5a715a10a3 cve 2026-02-09 23:53:55 +08:00
lintsinghuaandClaude Opus 4.6 85b336058b 修复:仪表盘已取消任务错误显示为"待处理"
getStatusBadge 缺少 cancelled 状态处理,导致落入 default 分支。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 23:40:26 +08:00
lintsinghuaandClaude Opus 4.6 f20c698726 修复:agent_tasks.py 启动报错 NameError: zipfile 未导入
safe_extract_zip 函数签名在模块级别引用了 zipfile.ZipFile 类型注解,
但 zipfile 模块只在函数内部局部导入,导致模块加载时报 NameError。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 23:39:27 +08:00
lintsinghuaandClaude Opus 4.6 34a21cef64 修复:仪表盘"最近任务"未显示 Agent 模式任务
在 Dashboard 中同时获取普通审计任务和 Agent 任务,合并后按创建时间
排序展示。同时更新了"最新活动"、"运行中任务"计数和质量趋势图表,
使其包含 Agent 任务数据。Agent 任务以 Bot 图标和紫色 Agent 标签区分。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 23:36:34 +08:00
ez-lbz d664f33622 Merge pull request #149 from Jeremy2214/patch-1
后端Git URL命令注入漏洞修复和后端解压缩路径遍历漏洞修复
2026-02-09 22:55:00 +08:00
lintsinghuaandClaude Opus 4.6 685ff3f873 修复:自定义审计规则类别过滤未生效 (#106)
根据启用的规则类别动态生成 JSON Schema type 枚举和类别约束指令,
确保禁用的规则类别(如性能、代码质量)不会出现在审计结果中。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 12:09:37 +08:00
lintsinghuaandClaude Opus 4.6 f86a34f038 修复:退出登录不跳转 (#142) 和 batch_size 设置不生效 (#91)
- Account.tsx: handleLogout 和 handleSwitchAccount 改为调用
  AuthContext.logout() 清除认证状态,确保退出后重定向到登录页
- agent_tasks.py: 创建 EmbeddingService 后设置用户配置的 batch_size
- indexer.py: batch_size 默认值从 50 改为 100,与 EmbeddingConfig 一致

Fixes #142, Fixes #91

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 11:37:43 +08:00
lintsinghuaandClaude Opus 4.6 c1632460b1 修复:沙箱容器 "operation not permitted" 错误 (exit_code=255)
原因:cap_drop: ["ALL"] 在部分 Docker 环境(AppArmor/SELinux)下
导致容器无法执行 /bin/sh,Semgrep 等工具直接失败。

修改:
- 默认改为丢弃特定危险能力而非全部,提高兼容性
- 新增 SANDBOX_CAP_DROP 环境变量,可自定义丢弃的能力列表
- 新增 SANDBOX_NO_NEW_PRIVILEGES 环境变量,可关闭 no-new-privileges
- 遇到问题时可设置 SANDBOX_CAP_DROP=NONE 完全关闭能力限制

Fixes #157

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 11:22:02 +08:00
lintsinghuaandClaude Opus 4.6 cf59c10ddd 修复:Claude 模型不允许同时传 temperature 和 top_p 的问题
Claude API 要求 temperature 和 top_p 不能同时指定,
当 provider 为 Claude 时不再传递 top_p 参数。

Fixes #160

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 11:12:34 +08:00
lintsinghua 029f61645f Merge pull request #148 from tusik/v3.0.0
fix: add openssh-client for git repo test
2026-02-09 10:58:33 +08:00
lintsinghua cc7abf3e19 Revert "修复:添加 openssh-client 以支持 Git SSH 连通性测试"
This reverts commit 28e1592581.
2026-02-09 10:57:33 +08:00
lintsinghuaandClaude Opus 4.6 28e1592581 修复:添加 openssh-client 以支持 Git SSH 连通性测试
Closes #148

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 10:56:08 +08:00
lintsinghua 4b8f006ebc 修复:嵌入进度不动态刷新的问题 2026-02-09 10:52:18 +08:00
lintsinghua f95a368d7c 更新 README.md 2026-02-08 17:15:58 +08:00
lintsinghuaandClaude Opus 4.6 7c691284dc 修复:Dashboard"已解决"始终为0及相关问题
1. 修复 AgentFinding 已解决计数:改用 fixed/wont_fix/false_positive 判断
2. 修复后端状态更新 API:路由与前端匹配,从 body 读取 status,修正验证逻辑
3. 前端添加状态变更下拉菜单:项目问题列表和任务详情均可标记已解决/误报

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 19:12:45 +08:00
lintsinghua 53d2a8a5db 修复:平均质量分为0.0 2026-02-07 17:19:29 +08:00
meraklbz b2a3b26579 fix bug 2026-02-05 15:48:25 +08:00
lintsinghua 8fc1cd5f91 更新 README.md 2026-02-02 19:07:17 +08:00
Jeremy2214 f1758a18c9 后端Git URL命令注入漏洞修复和后端解压缩路径遍历漏洞修复
- 添加 validate_git_url() 函数验证 Git URL 安全性
- 添加 validate_branch_name() 函数验证分支名称安全性
- 在执行 git clone 前进行输入验证

- 添加 is_path_safe() 函数检查路径是否在基础目录内
- 添加 safe_extract_zip() 函数安全解压 ZIP 文件
- 防止 Zip Slip 攻击
2026-01-28 13:58:37 +08:00
Tusik b82a55e708 fix: add openssh-client for git repo test
测试git ssh连通性时需要用到ssh
2026-01-28 09:46:19 +08:00
lintsinghua 20799ff9ea 更新版本号 v3.1.0 2026-01-26 14:52:05 +08:00
lintsinghuaandClaude Opus 4.5 25e07f4cc9 fix(tokenizer): 延迟输出 Token 计数方案日志
将日志输出时机从模块导入时改为首次实际使用时,
确保日志在应用日志系统配置完成后输出。

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 19:08:54 +08:00
lintsinghuaandClaude Opus 4.5 2f4107a181 feat(llm): 统一 Token 计数,使用 tiktoken 精确计数
- 新增 TokenEstimator 统一 token 计数逻辑
- 优先使用 tiktoken 精确计数,不可用时回退到启发式估算
- 启动时日志显示实际使用的计数方案
- 修复 agent_tasks 中子 Agent 统计数据未累加的问题
- estimate_tokens 现在支持传入 model 参数

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 19:03:16 +08:00
lintsinghuaandClaude Opus 4.5 5ee9e2297b feat(agent): 修复Agent间TaskHandoff通信机制
- Orchestrator: 添加_build_handoff_for_agent()构建并传递TaskHandoff
- Orchestrator: 保存子Agent返回的handoff到_agent_handoffs字典
- Recon Agent: 添加_create_recon_handoff()生成结构化交接信息
- Analysis Agent: 添加_create_analysis_handoff()传递漏洞发现
- Verification Agent: 添加_create_verification_handoff()返回验证结果

通信流程: Recon → Analysis → Verification → Orchestrator
每个Agent现在都能正确接收、使用和生成TaskHandoff

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
v3.0.4
2026-01-24 17:39:32 +08:00
lintsinghuaandClaude Opus 4.5 f7369d4b65 feat: 分支选择支持搜索功能,解决分支过多无法选择的问题 (#143)
- 新增 BranchSelector 组件,支持搜索过滤分支列表
- 显示分支总数和匹配数量
- 支持鼠标滚轮滚动

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 16:28:48 +08:00
lintsinghuaandClaude Opus 4.5 8198f2f390 fix: 嵌入模型向量维度可配置,解决 Ollama 不同参数规模模型维度不匹配问题
Fixes #123

问题:qwen3-embedding:8b 实际维度 4096,但代码硬编码为 1024(只适用于 0.6b 版本),导致 RAG 系统初始化失败

修改内容:
- OllamaEmbedding: 构造函数添加 dimension 参数,用户配置优先
- EmbeddingService: 支持传递自定义维度到各提供商
- embedding_config.py:
  - 补充 _get_model_dimensions 缺失的模型映射
  - get_current_config 优先使用用户配置的维度
  - test_embedding 支持传递自定义维度
- 前端 EmbeddingConfig: 添加"自定义向量维度"输入框

使用方式:
在"系统配置-嵌入模型"页面,输入自定义向量维度(如 4096)即可覆盖默认值

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 14:42:31 +08:00
lintsinghuaandClaude Opus 4.5 da853fdd8c fix: 修复SSRF防护实现的问题
- latency_ms 改为在 sleep 前计算,返回实际嵌入延迟而非固定时间
- FIXED_DURATION 从 10s 降为 3s,改善用户体验
- import 语句移到文件顶部,符合Python规范

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 14:32:33 +08:00
lintsinghua e3ad3241ab Merge pull request #145 from ez-lbz/v3.0.0
通过固定返回时间来防止SSRF扫描内网端口
2026-01-24 14:23:54 +08:00
lintsinghuaandClaude Opus 4.5 551780810c fix: Agent审计LLM超时可配置化,解决硬编码30s超时问题
Fixes #138

问题:Agent审计时LLM超时时间硬编码为30秒,用户配置的超时值不生效

修改内容:
- 前端:在"系统配置-LLM配置-高级参数"增加完整超时配置(默认展开)
  - 首Token超时、流式超时、工具超时、子Agent超时、总超时
- 后端:LLMConfigSchema 增加超时配置字段
- 后端:LLMService 增加 get_agent_timeout_config() 方法
- Agent:BaseAgent 从用户配置读取超时值
- Orchestrator:子Agent调度使用配置的超时值

默认值:
- 首Token超时: 30s
- 流式超时: 60s
- 工具超时: 60s
- 子Agent超时: 600s (10分钟)
- Agent总超时: 1800s (30分钟)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 14:09:36 +08:00
ez-lbz 1429fb7ec2 Merge branch 'lintsinghua:v3.0.0' into v3.0.0 2026-01-24 14:05:25 +08:00
meraklbz b371fbe217 通过固定返回时间来方式SSRF扫描内网端口 2026-01-24 14:04:51 +08:00
lintsinghuaandClaude Opus 4.5 c725be7f26 fix: 统一项目详情页"启动审计"弹窗与项目管理页一致
- 项目详情页"启动审计"按钮现在直接打开 CreateTaskDialog
- 移除了自定义的中间选择弹窗,避免居中问题
- 修复 ZIP 文件上传输入框字体和样式问题

Closes #139

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 13:54:44 +08:00
lintsinghua e05a1daf61 update 2026-01-24 13:11:04 +08:00
lintsinghua d5d96de60a Update README.md 2026-01-16 20:06:41 +08:00