MahmoudAlyosify/argus-recon
GitHub: MahmoudAlyosify/argus-recon
ARGUS 是一个多智能体外部攻击面管理平台,通过基于预签名 RoE 的授权引擎在红队和威胁情报行动中强制执行范围与权限控制。
Stars: 0 | Forks: 0
# ARGUS — 第 1 周:基础 + 授权引擎
## 本地运行(无 Docker)
```
pip install -r requirements-dev.txt
cp .env.example .env # uses SQLite-friendly defaults are NOT set here —
# for local Postgres-free testing, just run pytest.
uvicorn api.main:app --reload
```
默认情况下,`core/config.py` 指向位于以下地址的本地 Postgres:
`postgresql+asyncpg://argus:argus@localhost:5432/argus`。最简单的方式:
```
docker compose up # starts Postgres + Redis + the API on :8000
```
然后打开 http://localhost:8000/docs。
## 手动测试门控
两条预签名的 RoE 记录位于 `examples/` 中(使用
`.env.example` 中的开发密钥进行签名 —— 如果修改了
`ARGUS_ROE_SIGNING_KEY`,请使用 `scripts/sign_roe.py` 重新生成):
- `examples/roe_passive_only.json` — `example.com`,仅限被动扫描
- `examples/roe_with_active_scanning.json` — `example.com`,已授权
主动扫描,仅限 `nmap`
```
# in scope -> 201 authorized
curl -X POST localhost:8000/jobs -H "Content-Type: application/json" -d '{
"apex_domain": "example.com",
"roe": '"$(cat examples/roe_passive_only.json)"'
}'
# out of scope -> 403
curl -X POST localhost:8000/jobs -H "Content-Type: application/json" -d '{
"apex_domain": "not-example.com",
"roe": '"$(cat examples/roe_passive_only.json)"'
}'
```
## 测试
```
python -m pytest -q # 28 tests, SQLite-backed, no Docker needed
python -m ruff check .
```
覆盖范围:签名篡改检测、过期的 RoE、domain/CIDR 范围
匹配(包括子域名后缀匹配和排除项)、
被动与主动门控、主动工具白名单,以及在 `/jobs` API 处强制执行的同一门控*也同样*
在 `ReconTool.__call__` 内部强制执行(因此 agent 无法通过直接调用工具来
绕过它)。
## 尚未完成的内容(按设计,遵循 8 周计划)
- 目前还没有实际的收集工具(`tools/whois_tool.py` 等 — 第 2 周)
- 没有 LangGraph orchestrator(`workflows/recon_graph.py` — 第 5 周);任务保持在
`status=authorized` 状态,目前还没有任何程序处理它们
- 基于 Redis 的缓存/速率限制/队列 — 当前的 `core/cache.py` 和
`core/rate_limit.py` 是位于最终接口之后、基于内存的单进程占位符,
将在第 3 周引入队列时替换为 Redis
- Alembic migrations — 目前暂时在启动时使用 `create_all`
标签:AV绕过, FastAPI, GitHub, PostgreSQL, 多智能体, 安全合规, 实时处理, 密码管理, 搜索引擎查询, 测试用例, 版权保护, 网络代理, 逆向工具