Commit Graph
44 Commits
Author SHA1 Message Date
ji ruo 7140d14a17 feat: use DeepSeek Search API for web search 2026-11-03 14:07:32 +08:00
RuoJi6 05dd5b40e8 Merge pull request #107 from RuoJi6/feat/proxy-pool
feat: 全局代理池(健康检查、定时/失效轮换、热切换、脱敏)— Depends on #106
2026-11-02 15:45:28 +08:00
RuoJi6 cb0a69ef60 Merge pull request #60 from RuoJi6/fix/task-runtime-exclude-pause
fix: 运行时长排除暂停时间
2026-10-27 00:44:03 -07:00
RuoJi6 287021b494 Merge pull request #58 from RuoJi6/feat/task-auto-title
feat: 双能力自动标题(任务名 + 对话标题)
2026-10-27 00:43:31 -07:00
RuoJi6 7e5c828fc2 fix(web): show egress IPs in navbar middle via settings toggle 2026-10-27 13:46:34 +08:00
artex 41c967f7ad fix: exclude pause time from task run duration
Persist active_run_seconds + run_segment_started_at so task list and
orchestration list_tasks accumulate only actual execution time across
pause/resume/queue/terminal transitions.
2026-10-27 13:37:43 +08:00
artex-bot 6c781f21f4 feat: Agent 任务名与对话标题双能力自动生成
新增 task_auto_title_enabled / chat_auto_title_enabled(默认关)、
共享 GenerateAutoTitle、spawn_task 同步写 name、对话首条先截断再异步 AI,
设置页「自动标题」双 Switch。closes #55
2026-10-27 12:33:53 +08:00
RuoJi6 d1b2b5a996 feat: 多模型 Worker 池(#41,Codex 重写:绑定配置不可用时报错而非回退)
Code authored by Codex CLI (gpt-6-astra main implementation; gpt-6-sol / gpt-6-astra continuation passes).
2026-10-24 22:22:05 +08:00
RuoJi6 6ffe04cf3d chore: reset #41 multi-model worker files to origin/main for Codex rewrite 2026-10-24 21:17:59 +08:00
RuoJi6 6f09b313d6 feat: 多模型 Worker 池,支持按 LLM 配置分配并发会话
实现 #41:系统配置可设置 worker_pools,使本地模型与云端模型等各占用若干 Work Agent 会话并在同一任务内并行执行。空配置保持原 workers 遗留行为。
2026-10-23 19:14:35 +08:00
ji ruo 851e3f99ed feat: add optional credential processing with dependent switches and traffic evidence 2026-10-20 13:01:03 +08:00
ji ruo d70dd15e11 feat: add optional task intelligence recording and views 2026-10-20 11:16:04 +08:00
ji ruo 9b0d1bdb3c feat: expose scripts to review and add approval side chat 2026-10-12 11:06:38 +08:00
Autumn-27 87b3c3c770 feat(tasks): 漏洞列改为按严重度分档显示 严/高/中/低
- TaskListMetricsAll 用 COUNT(*) FILTER 按 severity 分四档统计(同一条查询)
- TaskListMetrics.Findings 及 TaskDTO.findings 由数字改为 {critical,high,medium,low}
- 列表页「漏洞」列渲染 x/x/x/x,配色沿用 severity 语义、为 0 的档位弱化
- severity 为空/白名单外的记录不计入任一档;mock 同步为对象结构
2026-09-24 13:32:45 -04:00
Autumn-27 e65d3e5202 feat(tasks): 任务列表新增漏洞数量列,描述/目标列收窄
- 任务列表接口 TaskListMetricsAll 批量统计每任务的漏洞数(findings 表,
  按 task_id),经 TaskDTO.findings 下发;列表页新增「漏洞」列,>0 高亮
- 描述/目标列宽 max-w-xs → max-w-40,目标列补 title 悬浮全文
- mock data/handler 同步补 findings 字段
2026-09-24 13:26:22 -04:00
Autumn-27 d95f0d002d feat(web): 播报板节点详情展示上游节点信息与锚定资产
上游/下游节点从只显示 id 改为悬停弹出节点名片(类型/状态/来源/时间/摘要/payload);
展开时顺带展示该节点锚定的资产(类型标签 + 可辨识文本)。

服务端 /exploration/nodes 新增 assets 字段(节点id→资产),读 exploration_anchors
并复用发现列表的资产打标逻辑;同页节点互引时用本页 items 兜底 refs 查找表。
2026-09-17 11:23:53 -04:00
Autumn-27 865d52267d feat(settings): 增加实验功能开关,可开启 noa 上下文压缩
系统设置新增「实验功能」区块,内含 noa 模型驱动上下文压缩开关(默认关)。
开启后平台接入的四类 agent(planner / worker / 主 agent / 对话)由 noa 接管
上下文压缩,取代内置 compaction;关闭即恢复内置压缩。

- agent: 新增 enableNoa 共享接入器(noaadapter.Enable 唯一入口,all-or-nothing),
  四类 agent 各加 noaEnabledFn 解析器 + SetNoaEnabled,每 run 读一次,切换只影响
  之后启动的 run,无需重建 agent。归档落在各 agent 本 run 工作目录下(任务级持久),
  session id 与 transcript 同规则。启用失败经 onWarn 上报并回退内置压缩,不中断任务。
- server: settings key noa_compaction + Manager 读写;8 处 agent 装配点注入平台级
  解析器(server 5 + task_llm 3);GET/PUT /api/settings 增加字段。
- web: 系统设置页新增实验功能卡片与开关(乐观更新、失败回滚),类型与 mock 补字段。

官方默认行为不变:开关默认关闭时 noaadapter.Enable 不被调用,内置 compaction
原样工作。
2026-09-15 09:20:35 -04:00
Autumn-27 e8efce605c Merge PR #102: feat: 支持漏洞关联多条流量证据
冲突解决:
- db/schema.sql: 复测表(#103)与流量证据表(#102)均为追加,两者保留
- server/server.go: 启动序列同时保留 seedFindingRetester 与 evidence GC
- web/src/lib/types.ts: InterceptAudit/InterceptDetail(#101) 与流量证据类型(#102)并存
- findings/detail/page.tsx: 去掉 #103 带入的重复 import,仅保留 FindingRetestPanel
- chat/page.tsx: 保留 #103 的 Spinner import
2026-09-10 10:04:53 -04:00
Autumn-27 071d87896d Merge PR #103: feat: 支持会话级漏洞复测与运行状态展示 2026-09-10 10:02:39 -04:00
ji ruo 82c1ed9cbb feat: 支持会话级漏洞复测与运行状态展示 2026-09-10 16:06:08 +08:00
ji ruo 9ad323dc4c feat(intercept): 增加审批记录详情与执行审计 2026-09-10 15:10:50 +08:00
ji ruo a3bb2c7959 feat: 增加 Agent 流量绑定开关并补齐证据交接 2026-09-10 14:08:40 +08:00
Autumn-27 b513b656aa feat(proxy): 新增全局出口代理配置
所有目标流量可经统一的全局代理出网(http/https/socks5,支持 user:pass):
- 开启流量捕获时,作为 MITM 记录代理的上游(流量照录再经代理出网);
  拦截与透传两条路径都走上游,不泄露源 IP。
- 关闭捕获时,直接注入 agent 的 bash 环境与 WebFetch;proxyEnv 增加
  ALL_PROXY 以支持 socks5。

配置存于 settings KV 表(无需迁移),前端系统配置页新增「全局代理」卡片。
与网络搜索代理、LLM 代理相互独立。
2026-09-07 10:43:38 -04:00
Autumn-27 7cc467c159 feat(llm): 模型配置新增输出上限,支持 max_completion_tokens 字段名
llm_profiles 加两列:max_tokens(单次回复输出上限,0=不发送该字段,由服务端
默认值决定)与 max_tokens_field(上限发哪个键)。后者仅对 format=openai 生效:
空(默认)= max_tokens;'max_completion_tokens' = 新键。OpenAI 推理模型
(o 系列/GPT-5)拒收 max_tokens、只认新键,而多数兼容网关反过来只认旧键,
故做成显式开关而非自动推断。anthropic 与 openai-responses 自带字段名,
存下来只会误导,保存时一并清空。

顺带补上一处从未接通的链路:planner/worker/chat/mainagent/goals 五个
agentcore.Options 都没设过 MaxTokens,恒为 0——openai 系因 omitempty 压根
不发上限,anthropic 走 norma 的 8192 兜底。光加配置项而不接这条线,用户在
后台填了数字也不会生效,故本次一并接通,取值与 streaming 一样按 profile
每轮解析,故障转移切换后下一轮即生效。

task_llm.go 里 nonStreaming() 的来源优先级(agent 绑定 → 任务链激活 profile
→ 全局)抽成共用的 activeCfg(),避免 maxTokens() 再抄一份同样的三级回退。

norma 升到 v0.3.3(该版本提供 Config.MaxTokensField)。go.mod 只动 norma 这
一行:仓库此前未 tidy 过,跑 go mod tidy 会顺带升 x/crypto、x/net 等一批无关
依赖,不混进本次改动。

迁移:新列走 ADD COLUMN IF NOT EXISTS + 默认 0/'',旧库升级后行为完全不变;
CHECK 约束限定取值,每次启动先删后建保持幂等。
2026-08-31 12:20:31 -04:00
Autumn-27 48e14e8cf2 fix(findings): 补齐「按资产」视图的 mock,修两处标签重复
demo 模式(NEXT_PUBLIC_MOCK=1)下资产树接口没有实现,点开是空白。

- mock findings 关联到 fixture 里已有的资产:一条挂两个资产(验证父节点不重复
  计数)、一条不挂(演示「未关联资产」桶)
- mock handler 实现 asset-tree,并在平铺/分组两个列表分支接上 asset_scope。
  父子优先级、祖先补齐、去重计数、企业层出现条件都与 db/finding_assets.go
  一致;顺带把三处重复的筛选链抽成 mockFilterFindings
- 没有 URL 的服务(SMB、非 HTTP 端口)标签回退成裸 IP,与宿主那行显示得一模
  一样 —— 后端与 mock 都改为补端口(10.10.10.20:8080)
- 接口挂在 host:port 形式的服务下时没触发简写,仍显示完整 URL。宿主判断统一
  成解析后的 host,现在显示 /script

跑 mock handler 实测:17 个节点逐个对账「树上 total == 该节点子树查出的条数」,
无不一致。
2026-08-31 11:10:47 -04:00
Autumn-27 9534e5e8a8 feat(demo): enrich planner rounds in the Vercel mock dataset
The demo's Plan session showed one line per round with no visible
reasoning, no cross-reference to worker output, and no intent-generation
tool calls, so it looked hollow and unrealistic.

Rebuild all five planner rounds as the full decision chain a real
planner emits: read the situation, pull the relevant worker facts for
detail (node_detail / list_findings), judge goals with prove_goal
(including the quantified-acceptance check that refuses to mark g2 met on
a foothold alone), and derive new directions through add_intent with
asset_ids / parent_ids / priority whose results reference the intent ids
already in the graph. Reasoning now cites the worker facts (fa1–fa10) by
id, so the plan is tied to what the workers actually found.

Also renumber the planner activity seq into a single monotonic range so
the rounds render in chronological order; previously round 4 (seq 4–5)
sorted ahead of rounds 1–3 (seq 300+).

Only the mock dataset changes; this affects the NEXT_PUBLIC_MOCK demo
build only, no backend behaviour.
2026-08-29 02:19:48 -04:00
Autumn-27 19a7206d12 feat(llmrec): 录制 LLM 请求/响应 HTTP 原文
归一化视图(request_body/response_body)会丢弃工具 schema、tool_use 块,
且看不到原始 SSE 帧,排查 provider 侧问题时信息不足。新增在 HTTP transport
层捕获真实 wire body 的能力:

- llmrec: 新增 Capture,Recorder 挂到 ctx,quotaAwareTransport 填充。
  请求取 GetBody 副本(不消费原 body),响应用 tee 保持流式;norma 内部重试
  的多次尝试逐次保留(旧代码会读掉丢弃),单次时为字节级原文。
- db: llm_records 增加 raw_request/raw_response 两列,含旧库 ALTER 迁移。
- web: 录制页详情面板增加「原文」视图切换,及请求/响应内容复制按钮
  (兼容非安全上下文的 execCommand 回退)。
- 测试: 单元(capture)、端到端(逐字节比对捕获=服务器实际收到)、
  迁移(真实 PG 事务回滚)、全链路(Recorder→provider→PG 落库)。
2026-08-25 09:40:05 -04:00
pphua d968727460 抽屉优化 2026-08-25 12:05:26 +08:00
pphua 7234874797 取消mock 2026-08-25 00:36:02 +08:00
pphua 5301a4fe04 test(mock): add worker domain and IP asset fixtures 2026-08-25 00:33:36 +08:00
pphua ec971c63d2 feat(api): integrate task workflows and mock contracts 2026-08-24 19:31:16 +08:00
pphua 58f23a2773 同步 2026-08-24 14:14:15 +08:00
Autumn-27 e67ff26e90 fix(mock): 补全发现页今日改动的 demo 数据
- findingStats 返回 tasks(按任务筛选下拉);findingsPage 支持 task_id 过滤
- PATCH finding 支持改 name/vulnclass(行内编辑)
- 给 f-1/f-17 补详细报告 Markdown,行内看报告在 demo 里可见(3 条)
2026-08-18 13:33:04 -04:00
Autumn-27 8092167ae5 feat: finding 增加详细报告字段 report(Markdown),详情页证据下方渲染
- findings 表加 report 列(TEXT 默认空,schema + ALTER 补旧库)
- 仅 GetFinding 查 report,列表/分页不带以免 payload 膨胀;FindingDTO.report omitempty
- 详情页「概览」证据卡下方新增「详细报告」卡,复用 <Markdown> 组件渲染,空时占位提示
- 前端 Finding.report? 类型;mock 单条 GET 返回 report、列表剥掉,并给 f-12 加示例报告
- 字段先留空,后续由写入方填充;db 测试补 report 往返断言

next build 通过。
2026-08-18 11:52:34 -04:00
Autumn-27 ff3d41ea35 feat: 漏洞新增 severity=critical(严重) 与 name(漏洞名称)字段
severity 严重级:
- report_finding 工具 severity 说明改为 critical|high|medium|low
- DB 排序 CASE、report 报告 sevRank、FindingStats 增加 critical
- 前端 Severity 类型、status.ts 新增 rose 色调(实心高强调,视觉高于高危)、
  发现页严重度筛选/统计卡、任务发现 Tab 排序、dashboard 汇总均加入严重

name 漏洞名称:
- findings 表加 name 列(schema + ALTER TABLE ADD COLUMN IF NOT EXISTS 补旧库)
- report_finding 工具新增 name 入参(非必填),写入 node payload 与独立 findings 行
- DBFinding/AddFinding/AddStandaloneFinding、FindingDTO、findingPayload、report 全链路透传
- 发现列表页与任务发现 Tab 展示 name,为空时回退 vulnclass;vulnclass 移到展开详情「类型」
- report 报告标题优先 name,回退 vulnclass

无 CHECK 约束,旧库仅需补 name 列;critical/name 均向后兼容。
db 测试补充 critical 排序/统计与 name 往返断言。
2026-08-18 11:21:08 -04:00
Autumn-27 05f0b69469 feat: finding 增加处置状态(待处理/误报/忽略/已处理)+ 发现列表页改版
- findings 表新增 status 列(默认 pending),schema.sql 同步 ALTER TABLE 补旧库
- 新增 PATCH /api/exploration/findings/{id} 更新处置状态,server 侧白名单校验
- FindingDTO 增加 status/finding_id/assets(后端预渲染资产 label)
- 任务内发现节点通过 node_id 关联独立 findings 行,复用同一处置状态
- 发现列表页:漏洞名称(类型主 + 摘要小字)、新增资产列与状态列(可下拉修改)、状态筛选与待处理统计
- 任务详情发现 Tab 同步展示/编辑处置状态与绑定资产
2026-08-18 09:46:46 -04:00
Autumn-27 3c81d3d248 feat(mock): 扩展攻击链路图 mock 数据——外网→DMZ→内网纵深完整杀伤链
探索图从 2 目标/5 意图扩展到 4 目标/14 意图/11 事实/9 漏洞,
覆盖 .git 泄露→Fastjson RCE→提权→内网发现→Jenkins 未授权→
Kerberoasting→psexec 域控 DC01 的完整多层攻击路径。
配套补齐 findings/activity/planner 复盘/mainagent 对话/
tokenWorkers/内网资产/流量/审计/拦截历史等数据。
2026-08-17 09:03:15 -04:00
Autumn-27 052c35a954 Merge PR #18: delete traffic targets and LLM task conversations from UI (laohuan12138)
- Traffic 页:按 host 多选精确批量删 + 子串删 + 删后 _blobs 内容寻址块 GC 回收;新增 GET /api/traffic/hosts
- LLM 记录页:按 task_id 下拉选择 + 按任务删除
- 修复 host 选择器 Popover 高度渲染;.gitignore 加 /dist/
- 新增 traffic/traffic_test.go(DeleteHost/DeleteHostsExact/Hosts/GC 共 4 个测试)

本地已验证:go build/vet、traffic 测试、前端 tsc/build 均通过;与当前 main 无冲突。
2026-08-11 09:38:12 -04:00
Autumn-27 f43f2a7c8f fix(mock): update DeepSeek base URL 2026-08-10 11:18:00 -04:00
FileShare Developer c76d0f4c93 feat: delete traffic targets and LLM task conversations from UI
Add delete controls to the Traffic and LLM Records pages so users can
purge recorded data without hand-editing the data volume.

Traffic page:
- Host target picker (Popover with checkboxes + select-all toggle)
- Exact-match batch delete for multiple hosts (DELETE /api/traffic/hosts)
- Substring delete for the host-filter input (DELETE /api/traffic?host=)
- Orphaned content-addressed blob garbage collection after deletes
- Distinct-hosts endpoint (GET /api/traffic/hosts) for the picker

LLM Records page:
- Task picker dropdown (distinct task_id + record counts)
- Per-task delete (DELETE /api/llm/records?task=)

Other:
- Add /dist/ to .gitignore (build artifact)
- Extend traffic_test.go with DeleteHost, DeleteHostsExact, Hosts tests
- Fix Popover render bug (replace ScrollArea that broke height calc)
- Remove fade/zoom animation on the host picker Popover
2026-08-10 11:10:58 +08:00
Autumn-27andClaude Opus 4.8 5962826f2d feat(mock): 补全工具执行 / LLM 录制的 mock 数据
- data:commandRecords(curl/sqlmap/ffuf/nmap + 超时报错)、llmRecords
  (worker/planner,含一条 429 error) + llmRecordDetail(带 req/resp body)
- handler:/commands、/llm/records、/llm/records/{id} 路由

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-08-09 01:33:23 -04:00
Autumn-27andClaude Opus 4.8 4c407dc448 feat(mock): 补全新功能的 mock 数据(覆盖度/覆盖图/关联/工作空间)
- data:coverage、coverageGraph(11 节点树)、assetRefsFor、WS_TREE +
  workspaceList/Read 示例文件树
- handler:/tasks/{id}/coverage · coverage-graph · asset-refs +
  /workspace/list · read 路由(写/建/删走 {ok:true} 兜底)
- api:workspaceUpload/Download 加 MOCK 守卫(裸 fetch 绕过 http 助手,
  demo 下改为 no-op/占位下载,不再网络报错)

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-08-09 01:23:59 -04:00
Autumn-27andClaude Opus 4.8 ad9f14f140 feat: LLM 录制开关、模型列表第三方回退、命令页改为工具执行
在 review PR5 基础上的三处改进:

1. LLM 录制开关(默认关,settings.llm_record)
   - 录制页数据大小下拉框旁加开关;关闭时 Recorder.Stream 直接透传,
     不序列化、不累积、不写库,零开销。切换即时生效,无需重建 agent。

2. 模型列表拉取支持 Anthropic 兼容第三方
   - pgListModels 改为按序尝试多个候选端点:anthropic 的 /v1/models 拿不到时,
     剥掉 /anthropic 回退到 OpenAI 式 /models(自动切 Bearer 头)。
     修复 DeepSeek(anthropic) 加载模型 404。

3. 命令页改为「工具执行」列表
   - ListCommands 去掉 tool='Bash' 过滤,覆盖所有 tool_use;返回工具名列,
     搜索匹配工具名或参数。前端加「工具」列、标题/侧边栏改为「工具执行」。

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-08-07 09:32:01 -04:00
Autumn-27andClaude Opus 4.8 0ef8561411 chore: ARTEX 初始化
ARTEX — AI 自主渗透测试系统(Go 后端 + Next.js 前端,单二进制内嵌)。

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
2026-07-26 04:27:45 -04:00