Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
14 changes: 7 additions & 7 deletions README.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ tanswer:
url: https://tanswer.example.com
api_key: YOUR_API_KEY

# cws ddr get-api-token --url https://ddr.example.com:8443 --jwt-token "YOUR_JWT_TOKEN" can directly get url & api_key & company_id
# chaitin-cli ddr get-api-token --url https://ddr.example.com:8443 --jwt-token "YOUR_JWT_TOKEN" can directly get url & api_key & company_id
ddr:
url: "https://ddr.example.com:8443/qzh/api/v1"
api_key: "YOUR_API_KEY"
Expand Down Expand Up @@ -88,14 +88,14 @@ Priority is `flags > environment/.env > config.yaml`.
Use root-level `-c` or `--config` to load a different config file. This is useful when you switch between multiple product instances, for example multiple SafeLine environments:

```bash
cws -c ./configs/safeline-prod.yaml safeline stats overview
cws -c ./configs/safeline-staging.yaml safeline stats overview
chaitin-cli -c ./configs/safeline-prod.yaml safeline stats overview
chaitin-cli -c ./configs/safeline-staging.yaml safeline stats overview
```

Use root-level `--dry-run` for commands that support dry-run:

```bash
cws --dry-run xray plan PostPlanFilter --filterPlan.limit=10
chaitin-cli --dry-run xray plan PostPlanFilter --filterPlan.limit=10
```

## Project Structure
Expand Down Expand Up @@ -124,19 +124,19 @@ The same binary can be invoked directly by subcommand name through a symlink or

```bash
task build
ln -s ./bin/cws ./chaitin
ln -s ./bin/chaitin-cli ./chaitin
./chaitin
```

This is equivalent to:

```bash
./bin/cws chaitin
./bin/chaitin-cli chaitin
```
Comment on lines 125 to 135

## AI Agent Skill

This project provides an AI Agent skill. Once installed, AI agents (Claude Code, Cursor, etc.) can invoke `cws` commands to manage Chaitin security products directly.
This project provides an AI Agent skill. Once installed, AI agents (Claude Code, Cursor, etc.) can invoke `chaitin-cli` commands to manage Chaitin security products directly.

```bash
npx skills add chaitin/chaitin-cli
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ tanswer:
url: https://tanswer.example.com
api_key: YOUR_API_KEY

# cws ddr get-api-token --url https://ddr.example.com:8443 --jwt-token "YOUR_JWT_TOKEN" 可以直接获取 url & api_key & company_id
# chaitin-cli ddr get-api-token --url https://ddr.example.com:8443 --jwt-token "YOUR_JWT_TOKEN" 可以直接获取 url & api_key & company_id
ddr:
url: "https://ddr.example.com:8443/qzh/api/v1"
api_key: "YOUR_API_KEY"
Expand Down Expand Up @@ -89,14 +89,14 @@ XRAY_API_KEY=YOUR_API_KEY
可以通过根命令的 `-c` 或 `--config` 指定其他配置文件。这在切换多个产品实例时很有用,例如多个 SafeLine 环境:

```bash
cws -c ./configs/safeline-prod.yaml safeline stats overview
cws -c ./configs/safeline-staging.yaml safeline stats overview
chaitin-cli -c ./configs/safeline-prod.yaml safeline stats overview
chaitin-cli -c ./configs/safeline-staging.yaml safeline stats overview
```

支持 dry-run 的命令可以使用根级别的 `--dry-run`:

```bash
cws --dry-run xray plan PostPlanFilter --filterPlan.limit=10
chaitin-cli --dry-run xray plan PostPlanFilter --filterPlan.limit=10
```

## 项目结构
Expand Down Expand Up @@ -125,19 +125,19 @@ Taskfile.yml # 构建、运行、检查任务

```bash
task build
ln -s ./bin/cws ./chaitin
ln -s ./bin/chaitin-cli ./chaitin
./chaitin
```

等价于:

```bash
./bin/cws chaitin
./bin/chaitin-cli chaitin
```
Comment on lines 126 to 136

## AI Agent Skill

本项目提供了 AI Agent skill,安装后 AI Agent(Claude Code、Cursor 等)可以直接调用 `cws` 命令管理长亭安全产品。
本项目提供了 AI Agent skill,安装后 AI Agent(Claude Code、Cursor 等)可以直接调用 `chaitin-cli` 命令管理长亭安全产品。

```bash
npx skills add chaitin/chaitin-cli
Expand Down
16 changes: 8 additions & 8 deletions products/tanswer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ tanswer:

| 命令 | 说明 |
| ---- | ---- |
| cws tanswer firewall check-ip-is-white | CheckIpIsWhite 检查 IP 是否在白名单中 |
| cws tanswer firewall delete-white-list | DeleteWhiteList 响应处置 / 响应白名单:删除响应白名单 |
| cws tanswer firewall search-white-list | SearchWhiteList 响应处置 / 响应白名单:搜索响应白名单 |
| cws tanswer firewall update-white-list-status | UpdateWhiteListStatus 响应处置 / 响应白名单:启用或禁用响应白名单 |
| cws tanswer rules create-block-rules | CreateBlockRules 响应处置 / 旁路阻断策略:创建旁路阻断策略 |
| cws tanswer rules search-block-rules | SearchBlockRules 响应处置 / 旁路阻断策略:搜索旁路阻断策略 |
| cws tanswer rules update-block-rules | UpdateBlockRules 响应处置 / 旁路阻断策略:编辑旁路阻断策略 |
| cws tanswer rules update-block-rules-status | UpdateBlockRulesStatus 响应处置 / 旁路阻断策略:启用或禁用旁路阻断策略 |
| chaitin-cli tanswer firewall check-ip-is-white | CheckIpIsWhite 检查 IP 是否在白名单中 |
| chaitin-cli tanswer firewall delete-white-list | DeleteWhiteList 响应处置 / 响应白名单:删除响应白名单 |
| chaitin-cli tanswer firewall search-white-list | SearchWhiteList 响应处置 / 响应白名单:搜索响应白名单 |
| chaitin-cli tanswer firewall update-white-list-status | UpdateWhiteListStatus 响应处置 / 响应白名单:启用或禁用响应白名单 |
| chaitin-cli tanswer rules create-block-rules | CreateBlockRules 响应处置 / 旁路阻断策略:创建旁路阻断策略 |
| chaitin-cli tanswer rules search-block-rules | SearchBlockRules 响应处置 / 旁路阻断策略:搜索旁路阻断策略 |
| chaitin-cli tanswer rules update-block-rules | UpdateBlockRules 响应处置 / 旁路阻断策略:编辑旁路阻断策略 |
| chaitin-cli tanswer rules update-block-rules-status | UpdateBlockRulesStatus 响应处置 / 旁路阻断策略:启用或禁用旁路阻断策略 |
Comment on lines +19 to +26

产品级覆盖参数统一为 `--url` 和 `--api-key`。
56 changes: 28 additions & 28 deletions products/xray/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,28 @@

| 命令 | 说明 |
|------|------|
| `cws xray asset_property` | 资产管理 |
| `cws xray audit_log` | 审计日志管理 |
| `cws xray baseline` | 基线检查管理 |
| `cws xray custom_poc` | 自定义POC管理 |
| `cws xray domain_asset` | 域名资产管理 |
| `cws xray insight` | 数据洞察 |
| `cws xray ip_asset` | 主机资产管理 |
| `cws xray plan` | 任务计划管理 |
| `cws xray project` | 工作区管理 |
| `cws xray report` | 报表管理 |
| `cws xray result` | 任务结果管理 |
| `cws xray role` | 角色管理 |
| `cws xray service_asset` | 服务资产管理 |
| `cws xray system_info` | 系统信息管理 |
| `cws xray system_service` | 系统服务管理 |
| `cws xray task_config` | 任务配置管理 |
| `cws xray template` | 策略模板管理 |
| `cws xray user` | 用户管理 |
| `cws xray vulnerability` | 漏洞资产管理 |
| `cws xray web_asset` | Web资产管理 |
| `cws xray xprocess` | XProcess任务实例管理 |
| `cws xray xprocess_lite` | XProcess精简版管理 |
| `chaitin-cli xray asset_property` | 资产管理 |
| `chaitin-cli xray audit_log` | 审计日志管理 |
| `chaitin-cli xray baseline` | 基线检查管理 |
| `chaitin-cli xray custom_poc` | 自定义POC管理 |
| `chaitin-cli xray domain_asset` | 域名资产管理 |
| `chaitin-cli xray insight` | 数据洞察 |
| `chaitin-cli xray ip_asset` | 主机资产管理 |
| `chaitin-cli xray plan` | 任务计划管理 |
Comment on lines 7 to +16
| `chaitin-cli xray project` | 工作区管理 |
| `chaitin-cli xray report` | 报表管理 |
| `chaitin-cli xray result` | 任务结果管理 |
| `chaitin-cli xray role` | 角色管理 |
| `chaitin-cli xray service_asset` | 服务资产管理 |
| `chaitin-cli xray system_info` | 系统信息管理 |
| `chaitin-cli xray system_service` | 系统服务管理 |
| `chaitin-cli xray task_config` | 任务配置管理 |
| `chaitin-cli xray template` | 策略模板管理 |
| `chaitin-cli xray user` | 用户管理 |
| `chaitin-cli xray vulnerability` | 漏洞资产管理 |
| `chaitin-cli xray web_asset` | Web资产管理 |
| `chaitin-cli xray xprocess` | XProcess任务实例管理 |
| `chaitin-cli xray xprocess_lite` | XProcess精简版管理 |

## 配置

Expand All @@ -47,7 +47,7 @@ xray:
| `--api-key` | 认证令牌 | 从 `config.yaml` 读取 |
| `--debug` | 输出调试日志 | false |

`--dry-run` 由主命令 `cws` 提供,例如 `cws --dry-run xray ...`。
`--dry-run` 由主命令 `chaitin-cli` 提供,例如 `chaitin-cli --dry-run xray ...`。

## 任务管理

Expand All @@ -56,7 +56,7 @@ xray:
快速创建扫描任务,立即执行(马上扫一次)。

```bash
cws xray plan PostPlanCreateQuick \
chaitin-cli xray plan PostPlanCreateQuick \
--targets=10.3.0.4,10.3.0.5 \
--engines=00000000000000000000000000000001 \
--project-id=1
Expand All @@ -77,7 +77,7 @@ cws xray plan PostPlanCreateQuick \
查看扫描任务列表。

```bash
cws xray plan PostPlanFilter \
chaitin-cli xray plan PostPlanFilter \
--filterPlan.limit=10 \
--filterPlan.offset=0 \
--filterPlan.project-id=1
Expand All @@ -88,7 +88,7 @@ cws xray plan PostPlanFilter \
暂停正在运行的扫描任务。

```bash
cws xray plan PostPlanStop \
chaitin-cli xray plan PostPlanStop \
--stopPlanBody.id=783
```

Expand All @@ -97,7 +97,7 @@ cws xray plan PostPlanStop \
恢复已暂停的扫描任务。

```bash
cws xray plan PostPlanExecute \
chaitin-cli xray plan PostPlanExecute \
--executePlanBody.id=783
```

Expand All @@ -106,6 +106,6 @@ cws xray plan PostPlanExecute \
删除指定的扫描任务。

```bash
cws xray plan DeletePlanID \
chaitin-cli xray plan DeletePlanID \
--id=783
```
Loading
Loading