173 Commits
Author SHA1 Message Date
MuCheng 867e3fd1c5 test(db): compare reproduction JSON semantically after JSONB round-trip 2026-10-27 17:26:56 +08:00
MuCheng 93dc83165c feat(findings): structured reproduction steps with per-step traffic bind
Align finding detail reproduction with AntiFox: store reproduction JSONB
(entry_point/prerequisites/steps/provenance), bind traffic via step_index,
syntax-highlight HTTP in steps/traffic panel, fall back to legacy evidence
when reproduction is absent. Old findings are not backfilled.
2026-10-27 17:17:34 +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 be65ab4425 Merge pull request #59 from zabcxky-123/codex/fix-task-findings-time-sort
fix(web): 恢复项目发现页按时间排序
2026-10-27 00:43:51 -07:00
zabcxky-123 80316252b8 fix(web): restore chronological sorting in task findings 2026-10-27 14:25:36 +08:00
artex d8bda59d7d fix: harden task runtime across restart and terminal mirror
Clear open run segments on process start without imputing downtime.
Mirror terminal/pause runtime fields into memory before hydration, make
SetPaused finalize segments, and add DB lifecycle tests.
2026-10-27 14:14:56 +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 3d3ee8827e fix: 自动标题取消语义、清洗循环与拒绝占位回写
spawn_task 标题 20s 超时且父 ctx 取消不建任务;清洗循环剥前缀内外引号;
异步标题拒绝「新对话」并用条件更新防手改竞态;会话 profile 失败回退全局。
2026-10-27 13:07:09 +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 3a4c66d41f Merge pull request #48 from RuoJi6/feat/finding-dedup-1-2-3
feat(findings): 降低重复确认噪音——分组疑似重复建议、候选打分排序、放宽归并验收(方案1+2+3)
2026-10-25 18:37:16 -07:00
ji ruo 71e933c6a3 Merge main and preserve task worker overrides with model pools 2026-10-26 09:36:03 +08:00
RuoJi6 e03bd5c244 Merge pull request #44 from RuoJi6/feat/notes-and-worker-count
feat: 任务/模板备注展示与 Worker 运行数量配置
2026-10-25 18:29:16 -07:00
RuoJi6 06801bc5aa fix: Worker 池评审修复(系统会话可见报错、暂停意图续跑保持绑定模型、加载失败不清空池、原子写入)
Code authored by Codex CLI gpt-6.1-sol (addresses Grok review #1).
2026-10-24 22:55:34 +08:00
RuoJi6 5b342f9f78 fix(findings): address Grok review r1 (Codex gpt-6-astra)
Authored by Codex CLI (gpt-6-astra, reasoning high) after 3 gpt-6.1-sol
capacity failures. Scope sweep aggregates per suggestion, veto only kept
suggestion members on exclusion, refresh finding-case tool schemas on existing
DBs, clarify weak tier wording, keep card state across reloads, filter stale
exclusions, always reload after confirm, guard task-switch toasts.
2026-10-24 22:47:16 +08:00
RuoJi6 2bd7953313 fix: mock/前端 Worker 与备注校验对齐后端(Codex gpt-6-astra) 2026-10-24 22:31:54 +08:00
RuoJi6 2e6ceddf95 fix: 按评审补齐 mock 校验、Worker 上限保护与测试(Codex gpt-6-sol) 2026-10-24 22:08:35 +08:00
RuoJi6 09e90b4170 feat(findings): grouped duplicate suggestions, ranked candidates, relaxed merged acceptance (Codex rewrite)
Authored entirely by Codex CLI (codex exec, reasoning effort high), one session
resumed across capacity fallbacks:
- gpt-6.1-sol (schema + initial db work, stopped at capacity)
- gpt-6-astra (db/server/agent/frontend, stopped at capacity)
- gpt-6-sol (remaining items, tests, fixes; stopped at capacity after final checks)

Schemes 1+2+3: prompt/acceptance (2..20, evidenced differences justify
independent, merged no longer blocked by unified report), group suggestions with
member table, superset reuse/subset superseded, veto-aware reject/exclusion,
anchor re-anchoring trigger, sweep after merge/reject/remove, frontend group card
with stale-response guard, candidate scoring with tier/hit_reasons/strong_total.
2026-10-24 21:55:45 +08:00
RuoJi6 a1dc362bae feat: 任务/模板备注展示与 Worker 运行数量配置(Codex gpt-6-astra 重写) 2026-10-24 21:46:03 +08:00
RuoJi6 ba3025d04f chore: 还原 PR #44 手写实现,准备由 Codex 按新规则重写 2026-10-24 21:17:17 +08:00
RuoJi6 b0d6ad5d76 revert(findings): reset dedup files to origin/main before Codex rewrite
Pure git restore (git checkout origin/main -- <files>) so the scheme 1+2+3
implementation can be re-authored entirely by Codex. No hand-written code.
2026-10-24 21:09:20 +08:00
RuoJi6 0c346a7c0a fix(findings): address Grok review — keep folders mergeable after group reject, re-anchor groups on finding delete, guard stale suggestion list writes 2026-10-24 20:48:35 +08:00
RuoJi6 00ec84d14e feat(findings): reduce duplicate-confirmation noise with grouped suggestions and ranked candidates
- Prompt: evidenced endpoint/handler/param differences justify independent; suggest only with concrete shared points
- Review acceptance: merged no longer blocked by unified report
- Suggestions: 2..N member groups, one-click group confirm with per-member exclusion, related cards cleared
- Candidates: score/tier/hit_reasons ranking, low-score kept paginated
2026-10-24 20:01:37 +08:00
RuoJi6 3b2887f349 fix: 模板备注上限与任务备注对齐为 2000 字 2026-10-23 19:05:01 +08:00
RuoJi6 45d4e4e67b feat: 任务/模板备注展示与 Worker 运行数量配置
- 新建任务可填写备注;详情页头部展示备注(列表原有 RemarkEditor 保留)
- 任务模板支持备注与 Worker 数量,应用/另存为模板时同步带入
- 新建任务高级设置与模板均可单独设置 Worker 运行数量(0=回落全局默认)
- schema/API/引擎贯通:tasks.worker_count、task_templates.remark/worker_count
2026-10-23 19:01:21 +08:00
RuoJi6 0a327328f3 fix: 修复发现返回导航(#34)与情报内容搜索及查看对话(#38)
- #34: 任务发现页进入漏洞报告详情后,「←返回」回到该任务的发现页
  (/function/tasks/detail?id=<task>&tab=findings),而非全局发现列表。
  任务自身的 FindingCaseList 与原始上报列表「详情」链接均携带 context_task。
- #38: 情报搜索除标题/上报者外,同时匹配内容(content)与来源证据(evidence)。
- #38: 修复「查看对话」点击无反应:任务详情页标签切换同步写入 URL 的 tab 参数,
  使跳转 tab=sessions&session=... 时能正确切换到会话并打开对应会话。

Closes #34
Closes #38
2026-10-23 18:09:55 +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 a00e58a9bd fix: navigate intelligence to source sessions and related assets 2026-10-20 12:13:07 +08:00
ji ruo bd787f8883 fix: display task intelligence content directly 2026-10-20 11:35:38 +08:00
ji ruo d70dd15e11 feat: add optional task intelligence recording and views 2026-10-20 11:16:04 +08:00
ji ruo 093b2bd367 fix: preserve manual task starts outside schedule windows 2026-10-19 15:09:17 +08:00
ji ruo de7a668b32 feat: align list editors with name hover actions 2026-10-19 09:58:32 +08:00
ji ruo 316889f76a feat: add inline remarks for tasks and schedules 2026-10-19 09:17:59 +08:00
ji ruo 97213e357b fix: avoid false script snapshot reviews 2026-10-12 17:31:33 +08:00
ji ruo 2f2b78cc78 feat: search approval history by content and date 2026-10-12 12:38:31 +08:00
ji ruo 9b0d1bdb3c feat: expose scripts to review and add approval side chat 2026-10-12 11:06:38 +08:00
ji ruo 0af7132ab7 修复计划暂停来源和时间线刷新 2026-10-10 09:16:28 +08:00
ji ruo 8067f3286b 修复计划任务立即运行并区分状态颜色 2026-10-10 08:45:06 +08:00
ji ruo 30db68a86a 优化计划任务列表展示 2026-10-10 00:30:51 +08:00
ji ruo 98321d8262 支持计划任务日期范围 2026-10-09 23:50:05 +08:00
ji ruo 3254c90a03 新增日历式计划任务 2026-10-09 23:05:44 +08:00
ji ruo ada09f6c1a fix(ui): restore original controls and limit folders to merged findings 2026-10-09 13:12:54 +08:00
ji ruo d36812b7e1 feat(findings): show consolidation across report task and asset views 2026-10-09 12:41:46 +08:00
ji ruo 7db7b71cdb fix(findings): protect historical reports and verify consolidation results 2026-10-09 12:23:11 +08:00
RuoJi6 e77c3ae9a3 Merge pull request #2 from RuoJi6/codex/finding-folders
feat(findings): 同一漏洞重复上报归并与文件夹展示
2026-10-09 11:07:16 +08:00
ji ruo 24d4726aee feat(findings): consolidate duplicate reports into expandable cases 2026-10-09 10:43:53 +08:00
ji ruo ead58f0983 fix(auth): keep config persistence off the request lock 2026-10-09 10:39:58 +08:00
Autumn-27 a951e4aad3 fix bug 2026-10-07 07:45:28 -04:00
Autumn-27 86729b65dc feat(intercept): 模型兜底审批单独计量 token 并在配置页展示
兜底审批(LLM judge)调模型判定漏网命令,其 token 消耗此前无法单独查看:
usage 行要么无 worker 归属、要么被并进复用的模型 profile 桶里。

- llmrec 增加 WithWorker 上下文覆盖,reviewer 调用前标注 worker='judge',
  让审批调用的计量行可被单独筛出(复用现有 llm_usage.worker 列,无需迁移)。
- db.JudgeUsageStats 返回累计总量 + 近 N 天每日序列(WHERE worker='judge')。
- 新增 GET /api/intercept/judge/usage。
- 配置页「模型兜底审批」开关下方新增用量卡片:调用次数 / 输入 / 输出 /
  缓存读写 五项统计 + 近 30 天每日消耗迷你柱图 + 刷新。
2026-10-04 02:43:26 -04:00
Autumn-27 93c1d39df3 fix(notify): 汇总模式按消息计量限流,批次大小不再被每轮请求预算掐死
令牌桶的额度此前被同时当成两个量纲用:对实时模式它是「发几条消息」,
对汇总模式却被直接当成「一批装几条漏洞」传给 ClaimDigestBatch。

notifyMaxSendsPerChannelPerTick(=5)是由租约时长倒推的 HTTP 请求预算,
而一个汇总批次只发一次请求,两者本不该相乘。稳态下更糟:rate_per_min=20
的渠道在 3 秒的 tick 里只补得到 1 个令牌,于是每条汇总消息只装 1 个漏洞,
头部还写着「近 30 分钟新增 1 个漏洞」——digest 退化成带汇总文案的实时推送,
MaxDigestBatchSize(500) 永不可达。

改为统一按**消息条数**计量:一批漏洞合成一条消息、消耗一个令牌,
rate_per_min 对 digest 依然生效(每分钟最多这么多条汇总消息),
而批次大小只受 MaxDigestBatchSize 这个内存上界约束。

ClaimDigestBatch 原先的注释声称「单批同时受限流额度与内存上界约束」,
那正是本问题的来源——限流额度本不该充当批次大小。注释一并改掉,
免得下次又按「rate_per_min 对 digest 不生效」把它改回去。

顺带让 takeTokens 接受 want 上限:原先整桶抽空后才由调用方截断,
多出来的令牌(飞书默认 100/min 时是 95 个)直接丢弃,渠道这一轮
没有待发投递时也照扣,注释声称的突发容量在任何情况下都做不到。

决策收在 digestTickPlan 里由新增用例直接钉住。现有端到端用例都手动给
stepDigest 传一个够大的 limit,绕过了 step 里的额度计算,所以覆盖不到这里。
2026-10-01 06:43:29 -04:00
luckoneandClaude Code f2f35ebc2e fix(notify): 复测判定「已修复」时也要推送状态变更
复测结论为 fixed 时,db/finding_retests.go 里是裸的
`UPDATE findings SET status=...`,绕过了带通知的版本——于是配了
on_status_change 的渠道对这种状态流转完全收不到推送:状态在界面上悄悄变了,
运维要打开平台才知道。

把「更新状态 + 登记状态变更事件」抽成事务级的 SetFindingStatusTx,供
patchFinding 与复测路径共用,两者的语义(状态没变就不登记、快照带全渲染字段)
由同一份代码保证,不会再出现只改一处的情况。

附回归用例:复测判 fixed 后必须有一条 finding_status_changed 事件,
且快照里的 from/to 与渲染字段正确。

Co-Authored-By: Claude Code <[email protected]>
2026-09-30 16:25:06 +08:00