Commit Graph
748 Commits
Author SHA1 Message Date
ji ruo cc1d84d573 Merge pull request #155 from RuoJi6/mcp-server-implementation 2026-11-14 20:51:24 +08:00
ji ruo a4ad95d716 Merge pull request #154 from RuoJi6/codex/fix-socks5-nil-panic 2026-11-14 20:51:24 +08:00
ji ruo 900c176435 Merge pull request #152 from RuoJi6/fix/intercept-match-decoded-input 2026-11-14 20:51:24 +08:00
ji ruo 437a28cddc Merge pull request #138 from RuoJi6/agent/agent/github-10 2026-11-14 20:51:24 +08:00
ji ruo 32d8619d36 Merge pull request #122 from RuoJi6/docs/fix-readme-mistakes 2026-11-14 20:51:23 +08:00
ji ruo 0a0158a4ab feat(mcp): add a source allowlist for the MCP server endpoint
Restrict which source addresses may call /mcp with a list of IPs/CIDRs
(IPv4 and IPv6). The check runs before token authentication, so a source
that is not listed is refused with 403 even when it holds a valid token.
An empty list keeps the previous behaviour (any source).

Behind a reverse proxy the TCP peer is always the proxy, so proxies can be
registered as trusted: for requests from them the client is the rightmost
X-Forwarded-For hop that is not itself a trusted proxy. Without a trusted
proxy the header is ignored, so a caller cannot claim an allowed address.

- A stored configuration that cannot be read or parsed refuses requests
  instead of falling back to no restriction.
- The audit log records the resolved client address.
- The settings API reports the address the server sees for the caller.
- The allowlist applies to /mcp only; the web UI and admin API are
  unaffected.

Refs RuoJi6/ARTEX#144
2026-11-14 14:32:39 +08:00
RuoJi6 c9b1e240ec Update README.md 2026-11-14 14:22:43 +08:00
RuoJi6 9b8073a763 Update README.md 2026-11-14 14:22:19 +08:00
RuoJi6 faf4d4fb4a Update README.md 2026-11-14 14:22:01 +08:00
ji ruo 8cf118e34d feat(mcp): expose ARTEX as an MCP server for external agents
Add a stateless Streamable HTTP endpoint at /mcp that lets external agents
list tasks and findings, create tasks, pause/resume them and add hints.

- Access tokens (api_tokens): scopes (read, task:create, task:control),
  optional company restriction, task quotas, expiry, revocation. Only the
  SHA-256 is stored; the plaintext is returned once.
- /mcp authenticates with access tokens only. It sits outside the HTTP Basic
  Auth gate and rejects Basic credentials and the admin JWT.
- Whitelisted tools only; nothing that edits tools, skills, MCP servers,
  workspace files or settings is exposed.
- Every tools/call is audited (mcp_audit_log), refusals included.
- POST /api/tasks and the MCP spawn_task tool now share one creation path.
- Settings card for the switch, token management and the call audit.
- Off by default.

Refs RuoJi6/ARTEX#144
2026-11-14 14:08:07 +08:00
darkkid 0fed4ba3a3 fix(traffic): 升级 go-mitmproxy 修复 socks5 上游握手失败时的 nil panic
全局出口代理配置为 socks5:// 时,SOCKS5 握手失败会刷出
"http: panic serving ...: nil pointer dereference"。

根因在依赖库 go-mitmproxy v1.9.2 的 internal/helper/proxy.go:40:
x/net 的 SOCKS5 DialContext 失败时返回 (nil, err),库仍调用
conn.Close(),必然空指针。net/http 每连接 recover,进程不退出,
但每条 CONNECT 被直接掐断(客户端见到 EOF),且 panic 发生在
HTTPConnectError 回调之前,导致 reportUpstreamFailure 不触发,
代理池自愈与任务重连完全收不到失败信号。

上游已在 v1.9.4 修复(issue #110,commit 388f47a),本次升级
v1.9.2 -> v1.9.5。实测同一份 traffic 包:v1.9.2 下 CONNECT 返回
unexpected EOF 且回调不触发;v1.9.5 下返回 502 并正常触发失败回调。

连带升级 go-mitmproxy 要求的最低版本:x/net 0.61.0、x/crypto
0.58.0、x/text 0.43.0、x/sys 0.49.0、x/mod 0.41.0、x/sync 0.24.0、
x/tools 0.51.0。

验证:go build ./... 与 go vet ./... 在 -mod=readonly 下通过;
按包隔离数据库逐包对比升级前后,失败集合完全一致(db、llmrec
为本次改动前既有失败),traffic/evidence/intercept/sidequestion/
guard/notify/server 全绿。
2026-11-14 13:36:57 +08:00
ji ruo aece14df71 chore(agent): baseline — the task worktree started here 2026-11-14 13:26:06 +08:00
nftpixels 4d66a84ac5 fix(intercept): match tool_input rules against decoded values
tool_input rules were only matched against the raw JSON of the tool call.
JSON escapes newlines and tabs, so a multi-line command reaches the rules as
`cd /tmp\nrm -rf /var/www`. There is no word boundary between the `n` of `\n`
and `rm`, so the built-in `\brm\b` / `\bmkfs\b` / `\bDROP ...` rules never
fire on a dangerous command that starts a new line (heredocs, small scripts).
Quotes (`\"`) and, for Go-encoded input, & < > (`&` etc.) have the same
problem.

Decode the input once per Match and also try each string value. The raw
JSON is still checked first, so existing rules written against the JSON
form keep matching; the change can only add matches.
2026-11-14 11:16:27 +13:00
ji ruo 570dc1a14c fix: expand standard browser user agent pool to twenty samples 2026-11-11 19:21:05 +08:00
ji ruo 171db405dd fix: select random browser user agents for outbound HTTP 2026-11-11 19:13:38 +08:00
ji ruo 17c2fc5e08 fix: make HTTP user agents configurable and remove tool identifiers 2026-11-11 18:56:33 +08:00
ji ruo 40746901db chore(agent): baseline — the task worktree started here 2026-11-11 18:42:23 +08:00
ji ruo 73d5437c5a Merge pull request #135 from RuoJi6/agent/mika/github-4 2026-11-11 15:25:36 +08:00
ji ruo 5131905918 Merge pull request #134 from RuoJi6/agent/agent/github-3 2026-11-11 15:25:36 +08:00
ji ruo b9fe1cdaf6 Merge pull request #133 from RuoJi6/agent/agent/github-2-0aaf6221ae02 2026-11-11 15:25:36 +08:00
ji ruo 3306e547b2 fix(tasks): serialize no-result decisions with finding writes 2026-11-11 15:20:58 +08:00
ji ruo 8e030b1fbd Merge existing PR #133 implementation into task worktree 2026-11-11 15:09:15 +08:00
ji ruo 37544a2c63 chore(agent): baseline — the task worktree started here 2026-11-11 15:05:09 +08:00
ji ruo b16958e64b fix(sidequestion): recover incomplete summaries with bounded retries 2026-11-11 14:45:23 +08:00
ji ruo 5860bf8f25 chore(agent): baseline — the task worktree started here 2026-11-11 14:38:22 +08:00
ji ruo 62ed7db7b2 feat(tasks): add read-only task file browser (GITHUB-3) 2026-11-11 14:14:37 +08:00
ji ruo 997d2d98c0 feat(tasks): stop tasks that miss a configurable findings checkpoint 2026-11-11 14:07:39 +08:00
ji ruo 873e3a667b chore(agent): baseline — the task worktree started here 2026-11-11 13:54:13 +08:00
ji ruo 39a8f2c31a chore(agent): baseline — the task worktree started here 2026-11-11 13:49:38 +08:00
ji ruo 5c617ef70e Merge pull request #131 from RuoJi6/codex/english-i18n 2026-11-10 20:12:16 +08:00
ji ruo 151d0e4d43 Merge pull request #129 from RuoJi6/codex/auth-session-recovery 2026-11-10 20:08:49 +08:00
ji ruo 9ccaa81497 feat: add English interface localization and fix preview crashes 2026-11-10 20:03:14 +08:00
ji ruo 0ff2130f46 fix: recover expired Basic Auth sessions in the current tab 2026-11-10 16:28:23 +08:00
ji ruo a05a886d3d fix: support traffic ID copying over HTTP 2026-11-09 16:17:03 +08:00
RuoJi6 9fe993f460 Merge pull request #126 from RuoJi6/codex/issue-125-traffic-id-filter-counts
feat: 展示流量 ID 并让发现统计跟随筛选
2026-11-09 16:15:09 +08:00
ji ruo 8ee94f2215 feat: expose traffic IDs and filter finding statistics 2026-11-09 16:11:15 +08:00
Bhao e45fa6e7b3 docs(readme): 修复前端构建产物复制命令的目录嵌套问题 2026-11-05 22:04:16 +08:00
RuoJi6 459a484237 Merge pull request #120 from RuoJi6/codex/task-global-assets
feat: add opt-in global asset sharing per task
v0.3.27
2026-11-05 16:37:07 +08:00
RuoJi6 25d7b29b12 Merge pull request #119 from RuoJi6/codex/118-save-egress-probe-url
fix: 保存并统一使用自定义 IP 探测服务
2026-11-05 16:37:03 +08:00
ji ruo 080a46eb2d feat: make task global asset sharing opt-in 2026-11-05 16:27:44 +08:00
ji ruo 4868b1816f fix: persist custom egress IP probe service (#118) 2026-11-05 16:00:07 +08:00
RuoJi6 4586634d80 Update README.md 2026-11-04 13:51:54 +08:00
ji ruo d36e1c3295 fix: align Jev integration with official System One protocol v0.3.26 2026-11-03 15:53:24 +08:00
RuoJi6 6353a66953 Merge pull request #114 from RuoJi6/codex/hide-public-fingerprints
fix: 保护健康接口并移除未认证响应中的 ARTEX 指纹
2026-11-02 23:14:25 -08:00
ji ruo f053931a1d fix: require Basic Auth for health checks 2026-11-03 14:56:39 +08:00
ji ruo 5203176364 fix: remove application fingerprints from public responses 2026-11-03 14:48:41 +08:00
RuoJi6 c0b558fa1e Merge pull request #113 from RuoJi6/codex/issue-110
feat: use DeepSeek Search API for web search
2026-11-02 22:16:00 -08:00
RuoJi6 aa1b5635e6 Merge pull request #112 from RuoJi6/codex/issue-111-service-address
fix: show service addresses in task assets
2026-11-02 22:15:32 -08:00
ji ruo 7140d14a17 feat: use DeepSeek Search API for web search 2026-11-03 14:07:32 +08:00
ji ruo 1d1d414082 fix: show service addresses in task assets 2026-11-03 13:36:34 +08:00