Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
a0df3ec
chore: 移除 cyber-ui submodule,收敛 .gitignore
Jul 7, 2026
bbd9c0e
fix(provider): LLM 协议推断/model 覆盖/能力对齐
Jul 7, 2026
8f801d7
feat(probe): 连接与 LLM 主动探活
Jul 7, 2026
e23a3a3
feat(slashcmd): 统一 slash 命令目录,固定盒子渲染 TUI 面板
Jul 7, 2026
d3e5bab
refactor(agent): 评估器结构化断言、事件 JSON、上下文截断
Jul 7, 2026
f70dfcc
refactor(tools): 扫描采集/spray/gogo/zombie 与输出渲染精简
Jul 7, 2026
93ed515
feat(web): 后端会话/SSE/store/配置热重载/webagent
Jul 7, 2026
3dca5ed
feat(web-ui): agent 控制台前端重构(i18n / 主题 / viewer / 原子组件)
Jul 7, 2026
e2938eb
chore(web): 重建内嵌静态资源
Jul 7, 2026
d90bff8
refactor(web-ui): 从 cyber-ui 子模块消费原子组件(ui/theme)
Jul 7, 2026
64694d7
build(deps): bump chainreactors/sdk to the merged ChainExec fix
Jul 7, 2026
5154efc
fix(ci): 源头修 golangci-lint 报错(errcheck/nilerr/gosec/misspell/unused/S…
Jul 7, 2026
c33f2b2
build(deps): tidy go.sum after sdk bump
Jul 7, 2026
b862bdf
fix(web-chat): REPL/! 命令多行输出用代码围栏渲染,避免塌成一行
Jul 7, 2026
a45e8f5
refactor(web-ui): 消费 cyber-ui 第二刀原子 + terminal 迁子模块
Jul 7, 2026
d7346d6
fix(web-ui): Tailwind 扫描 cyber-ui 子模块源码,补齐子模块内 utility
Jul 7, 2026
8770e7b
chore(web): 重建内嵌静态资源
Jul 7, 2026
dba07db
fix(tools): 恢复扫描工具数据事件桥接
Jul 7, 2026
63f6e0d
feat(truncate): 增加行级裁剪辅助函数
Jul 7, 2026
3dfbc6d
chore(web): 更新 cyber-ui 子模块指针
Jul 7, 2026
42bc373
fix(proton): 修复密钥扫描大面积漏报 + JSON 字段名
Jul 7, 2026
5bae092
test(proxy,webagent): 放宽时序 flaky 测试的墙钟 deadline
Jul 7, 2026
d83cc2e
fix(tui): 修复状态面板宽度与 IOA URL 脱敏
Jul 7, 2026
39d729c
refactor(web): 简化本地 Agent 启动配置
Jul 7, 2026
981d9d3
chore(web): 重建内嵌前端静态资源
Jul 7, 2026
bbc8f0d
refactor: 删除 slashcmd 包 + 修正确性 bug + 去重简化 (-229 行)
M09Ic Jul 7, 2026
f4e6db2
refactor: 简化实现 — probe 归位 + 删冗余类型/字段 + 消除重复调用
M09Ic Jul 7, 2026
58a517e
refactor(web-ui): 简化前端数据流 + 消除死代码 + 组件复用
M09Ic Jul 7, 2026
a712e83
chore(web): 移除 MiSans 中文字体,改用系统字体 (static -4.4MB)
M09Ic Jul 8, 2026
a7839c3
chore(web): 移除所有嵌入字体,回归系统字体栈 (static 1.2MB)
M09Ic Jul 8, 2026
a84ffa4
chore: 移除临时分析文档 docs/mechanisms.md
M09Ic Jul 8, 2026
5ca9ccf
feat(web): 统一 access key 认证 + SlashSpec→CommandSpec 重命名
M09Ic Jul 8, 2026
ba6b7c7
feat: 统一认证 — IOA/Web 概念模糊化 + QuickConnect 快速接入
M09Ic Jul 8, 2026
77e0209
fix(ci): 修 lint QF1008 + 跳过 -race 下 flaky MITM 测试
M09Ic Jul 8, 2026
4db4817
build(deps): bump chainreactors/utils 系列到 master (8aa6ca29)
M09Ic Jul 8, 2026
dd2b30d
build(deps): bump sdk 到 dcad8620 + 适配 API 变更
M09Ic Jul 8, 2026
2b31df6
feat(web): QuickConnect 版本对齐 + 架构选择 + 中国镜像 + 跳过引擎加载
M09Ic Jul 8, 2026
829f1ef
fix(agent): improve LLM retry mechanism (#57)
gelusus Jul 11, 2026
4eb0a23
feat(agent): 增加 agent-core 的 JS/WASM 入口(RFC #189 方案 A 验证)
Jul 8, 2026
b7dfc23
feat(agent): 对齐 CyberHub Copilot 的 WASM 通信协议
Jul 8, 2026
63fdb82
feat(wasm): __aiscanLLM 增加 per-run 上下文参数
Jul 11, 2026
2eb32d7
feat(web): 静态资源按指纹永久缓存,index.html 不缓存
Jul 11, 2026
66c14f1
fix(web): 本地 Agent 携带 access key 认证 /api/agent/ws
Jul 11, 2026
9b4aac8
fix(scan): 保留 http/https 同源为独立资产并采集 content_type/redirect_url
Jul 11, 2026
002bea6
feat(web): 侦察报告重写并按语言渲染,scan_complete 落库 marker
Jul 11, 2026
03711e3
feat(web): 扫描结果内联自足,移除详情抽屉
Jul 11, 2026
6ae2a79
feat(web): 移动端适配 — 安全区/dvh/16px 输入/触屏交互
Jul 11, 2026
3b6bd99
fix: add unified recover to all tool Execute methods + bump gogo/neutron
M09Ic Jul 10, 2026
49891b5
feat(scan): integrate cstx SCO standardized output
M09Ic Jul 11, 2026
33c06b0
revert(agent): 移除误提交的 CyberHub 浏览器插件 WASM 代码
Jul 11, 2026
de63952
refactor(web): 删除扫描结果改版后的遗留死代码
Jul 11, 2026
88f8135
refactor: 简化 toolEnvelope/报告 i18n/scan card 状态机/anchor prop 透传
M09Ic Jul 11, 2026
c400548
feat: SCO sidecar + DataBus pipeline for standalone tool calls + @cyb…
M09Ic Jul 11, 2026
aef112c
refactor: clean up legacy intermediate types, deprecated flags, and d…
M09Ic Jul 11, 2026
e38f9ba
refactor: migrate cstx dependency from utils/cstx to libcstx/go
M09Ic Jul 12, 2026
cbe35a3
fix repl ux and startup logging
M09Ic Jul 13, 2026
0b057d9
feat: add /compact command with eval-path unification and auto-suggest
M09Ic Jul 13, 2026
650c6ea
fix: stabilize agent console completion and logs
M09Ic Jul 13, 2026
eff6af9
fix(tui): isolate split-mode input rendering
M09Ic Jul 13, 2026
5efe652
fix(tui): exit cleanly on double ctrl-c
M09Ic Jul 13, 2026
5fd03c0
style(telemetry): simplify startup ready logs
M09Ic Jul 13, 2026
c5c46e2
refactor: migrate SCO types from local sco_gen.ts to @cyber/cstx-easm
M09Ic Jul 16, 2026
3b30dc6
feat(web): add asset SCO import, mention picker, and i18n for asset p…
M09Ic Jul 16, 2026
04a12f1
refactor(cli): scope flag groups to their subcommands for independent…
M09Ic Jul 16, 2026
0651fa6
build: enable native cstx and slim katana
M09Ic Jul 16, 2026
91a7ec1
build: add re2_cgo to Makefile and CI
M09Ic Jul 16, 2026
42901fe
build: switch to go-re2 fork with bundled static RE2
M09Ic Jul 16, 2026
77beb25
build: pin go-re2 fork to latest with static CGO docs
M09Ic Jul 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 13 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,12 @@ jobs:
go-version-file: go.mod
cache: true


- name: Run golangci-lint
uses: golangci/golangci-lint-action@v9.2.1
with:
version: v2.12.2
args: --timeout=5m
args: --timeout=5m --build-tags "re2_cgo re2_static"

tidy:
runs-on: ubuntu-22.04
Expand Down Expand Up @@ -89,12 +90,13 @@ jobs:
go-version-file: go.mod
cache: true


- name: Generate embedded resources
run: go generate ./core/resources/...

- name: Run unit tests with coverage
run: |
go test -race -count=1 -timeout 5m \
go test -tags "re2_cgo re2_static" -race -count=1 -timeout 5m \
-coverprofile=coverage.out \
-covermode=atomic \
./...
Expand Down Expand Up @@ -136,26 +138,27 @@ jobs:
go-version-file: go.mod
cache: true


- name: Run proxy tool tests
run: |
go test -race -count=1 -timeout 5m -v \
go test -tags "re2_cgo re2_static" -race -count=1 -timeout 5m -v \
./pkg/tools/proxy/

- name: Run tmux command tests
run: |
go test -race -count=1 -timeout 5m -v \
go test -tags "re2_cgo re2_static" -race -count=1 -timeout 5m -v \
-run 'Tmux|BashProxy' \
./pkg/commands/

- name: Run PTY interactive session tests
run: |
go test -race -count=1 -timeout 5m -v \
go test -tags "re2_cgo re2_static" -race -count=1 -timeout 5m -v \
-run 'MultiRound|SendCtrlC' \
./pkg/agent/tmux/

- name: Run agent tmux integration tests
run: |
go test -race -count=1 -timeout 5m -v \
go test -tags "re2_cgo re2_static" -race -count=1 -timeout 5m -v \
-run 'AgentTmux' \
./pkg/agent/

Expand All @@ -177,12 +180,13 @@ jobs:
go-version-file: go.mod
cache: true


- name: Run go generate for templates
run: go generate ./core/resources/...

- name: Run resources tests
run: |
go test -race -count=1 -timeout 5m \
go test -tags "re2_cgo re2_static" -race -count=1 -timeout 5m \
./core/resources/...

# ── E2E tests (depends on test) ───────────────────────────────
Expand All @@ -203,11 +207,12 @@ jobs:
go-version-file: go.mod
cache: true


- name: Run e2e tests
run: |
if [ -d pkg/e2e ]; then
go test -race -count=1 -timeout 10m \
-tags e2e \
-tags "e2e re2_cgo re2_static" \
-v \
./pkg/e2e/
else
Expand Down
65 changes: 22 additions & 43 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,53 +23,32 @@ dist/
*.sock.lock
/aiscan
/spray
aiscan_test
aiscan_test_eval
aiscan-test-provider
aiscan-test-ioa*
out/
scan_results.jsonl
pw_driver_bin
node_modules/
community.yaml
aiscan.yaml
config.yaml

# Local data / logs
.aiscan/
.playwright-cli/
tmp/
*.log
*.jsonl
*.png
*.jar
# Local runtime state / operator artifacts
/aiscan-deploy.yaml
/*.log
/.claude/
# operator scan outputs dumped at repo root (screenshots, IP lists, app dumps, findings/reports)
/*.png
/*_ips.txt
/apps_*.json
/*_findings.md
/*_report.md

# frontend build output (generated by npm run build)
web/static/
web/static.oldroot*
web/static.rootold*
web/static.*
web/static-stale/

# Test payloads / scratch files
webhook.json
xss_payload.json
xss_prod.json
cookies.txt
cookies_sup.txt
login_data.txt
weak_pwd.txt
sqli_payload.txt
ssrf_payload.json
ssti_payload.json
spoof_prod.json
payload.json
cart.json
chat.json
chat_msg.json
checkout.json
cms_body.html
cms_post.json
cms_post.txt
cms_xss.txt
portal.html
portal_full.html
refer/
agent
*.events.jsonl
*.err.log
*.out.log
*.pid
# operator artifacts kept on disk but out of git (2026-07-06 post-reset cleanup)
/monitor/
/scripts/
/scan_report.md
aiscan.yaml
1 change: 1 addition & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
[submodule "web/frontend/cyber-ui"]
path = web/frontend/cyber-ui
url = https://github.com/chainreactors/cyber-ui.git
branch = main
2 changes: 2 additions & 0 deletions .goreleaser-community.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ builds:
ldflags:
- >-
-s -w
-X 'github.com/chainreactors/aiscan/core/config.Version={{.Version}}'
-X 'github.com/chainreactors/aiscan/core/config.DefaultProvider=deepseek'
-X 'github.com/chainreactors/aiscan/core/config.DefaultAPIKey={{ .Env.COMMUNITY_LLM_KEY }}'
-X 'github.com/chainreactors/aiscan/core/config.DefaultModel=deepseek-chat'
Expand Down Expand Up @@ -71,6 +72,7 @@ builds:
ldflags:
- >-
-s -w
-X 'github.com/chainreactors/aiscan/core/config.Version={{.Version}}'
-X 'github.com/chainreactors/aiscan/core/config.DefaultProvider=deepseek'
-X 'github.com/chainreactors/aiscan/core/config.DefaultAPIKey={{ .Env.COMMUNITY_LLM_KEY }}'
-X 'github.com/chainreactors/aiscan/core/config.DefaultModel=deepseek-chat'
Expand Down
8 changes: 5 additions & 3 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ project_name: aiscan

before:
hooks:
- npm --prefix web/frontend ci
- npm --prefix web/frontend run build
- go generate ./core/resources

builds:
Expand Down Expand Up @@ -31,7 +33,7 @@ builds:
- osusergo
- netgo
ldflags:
- -s -w
- -s -w -X github.com/chainreactors/aiscan/core/config.Version={{.Version}}
asmflags:
- all=-trimpath={{.Env.GOPATH}}
gcflags:
Expand Down Expand Up @@ -63,7 +65,7 @@ builds:
- full
- sqlite
ldflags:
- -s -w
- -s -w -X github.com/chainreactors/aiscan/core/config.Version={{.Version}}
asmflags:
- all=-trimpath={{.Env.GOPATH}}
gcflags:
Expand Down Expand Up @@ -93,7 +95,7 @@ builds:
- osusergo
- netgo
ldflags:
- -s -w
- -s -w -X github.com/chainreactors/aiscan/core/config.Version={{.Version}}
asmflags:
- all=-trimpath={{.Env.GOPATH}}
gcflags:
Expand Down
76 changes: 76 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
.DEFAULT_GOAL := standard

GO ?= go

WEB_DIR ?= web/frontend
WEB_ADDR ?= 127.0.0.1:8080
WEB_TOKEN ?=
BIN_DIR ?= bin

RE2_TAGS := re2_cgo re2_static

ifeq ($(OS),Windows_NT)
EXE := .exe
NPM ?= npm.cmd
else
EXE :=
NPM ?= npm
endif

STANDARD_BIN ?= $(BIN_DIR)/aiscan$(EXE)
AGENT_BIN ?= $(BIN_DIR)/aiscan-agent$(EXE)
FULL_BIN ?= $(BIN_DIR)/aiscan-full$(EXE)

# Keep the local feature tiers aligned with the release workflow.
STANDARD_TAGS := forceposix emptytemplates noembed osusergo netgo cstx_native $(RE2_TAGS)
AGENT_TAGS := forceposix emptytemplates noembed osusergo netgo
FULL_TAGS := forceposix emptytemplates noembed osusergo netgo full sqlite cstx_native katana_slim $(RE2_TAGS)
BUILD_FLAGS := -trimpath -buildvcs=false

.PHONY: help prepare frontend standard agent full web-build web-run web all clean

help:
@echo "AIScan build targets (aligned with release editions):"
@echo " make / make standard Build the standard AIScan edition"
@echo " make agent Build the lightweight agent edition"
@echo " make full Build frontend, then build the full edition"
@echo " make web Build the full edition and start the Web UI"
@echo " make frontend Build only web/frontend into web/static"
@echo " make all Build all three editions"
@echo ""
@echo "Variables:"
@echo " BIN_DIR=path Binary output directory (default: $(BIN_DIR))"
@echo " WEB_ADDR=host:port Web listen address (default: $(WEB_ADDR))"
@echo " WEB_TOKEN=token Optional fixed Web access token"

prepare:
mkdir -p "$(BIN_DIR)"

frontend:
$(NPM) --prefix "$(WEB_DIR)" run build

standard: prepare
CGO_ENABLED=1 $(GO) build $(BUILD_FLAGS) -ldflags "$(CGO_LDFLAGS)" -tags "$(STANDARD_TAGS)" -o "$(STANDARD_BIN)" ./cmd/aiscan
@echo "Built standard edition: $(STANDARD_BIN)"

agent: prepare
CGO_ENABLED=0 $(GO) build $(BUILD_FLAGS) -ldflags "-s -w" -tags "$(AGENT_TAGS)" -o "$(AGENT_BIN)" ./cmd/agent
@echo "Built agent edition: $(AGENT_BIN)"

# The full binary embeds web/static, so frontend must finish first.
full: frontend prepare
CGO_ENABLED=1 $(GO) build $(BUILD_FLAGS) -ldflags "$(CGO_LDFLAGS)" -tags "$(FULL_TAGS)" -o "$(FULL_BIN)" ./cmd/aiscan
@echo "Built full edition: $(FULL_BIN)"

web-build: full

web-run:
"$(FULL_BIN)" web --addr "$(WEB_ADDR)" $(if $(strip $(WEB_TOKEN)),--token "$(WEB_TOKEN)",)

web: full
"$(FULL_BIN)" web --addr "$(WEB_ADDR)" $(if $(strip $(WEB_TOKEN)),--token "$(WEB_TOKEN)",)

all: standard agent full

clean:
rm -f "$(STANDARD_BIN)" "$(AGENT_BIN)" "$(FULL_BIN)"
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,16 @@ go build -o aiscan ./cmd/aiscan # standard
go build -tags full -o aiscan-full ./cmd/aiscan # full (playwright/katana/passive)
```

The Makefile mirrors the three release editions. The full target builds the
frontend first so the latest `web/static` assets are embedded into the binary:

```bash
make # standard edition
make agent # lightweight agent edition
make full # frontend + full edition
make web WEB_ADDR=127.0.0.1:18081 WEB_TOKEN=local-dev # full build + Web UI
```

---

## Features
Expand Down
10 changes: 10 additions & 0 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,16 @@ go build -o aiscan ./cmd/aiscan # 标准版
go build -tags full -o aiscan-full ./cmd/aiscan # 完整版(含 playwright/katana/passive)
```

Makefile 对应 Release 的三种功能层级。`make full` 会先构建前端,再将最新的
`web/static` 嵌入 full 二进制:

```bash
make # Standard 默认版
make agent # Agent 轻量版
make full # 前端 + Full 完整版
make web WEB_ADDR=127.0.0.1:18081 WEB_TOKEN=local-dev # Full 构建并启动 Web UI
```

---

## Features
Expand Down
Loading
Loading