A.I.G Scanner
name: aig-scanner
by aigsec · published 2026-04-01
$ claw add gh:aigsec/aigsec-aig-scanner---
name: aig-scanner
version: 1.0.2
author: aigsec/Tencent Zhuque Lab
license: MIT
description: >
A.I.G Scanner — AI security scanning for infrastructure, AI tools / skills, AI Agents,
and LLM jailbreak evaluation via Tencent Zhuque Lab AI-Infra-Guard.
Uses built-in exec + Python script, no plugin required. Requires AIG_BASE_URL to be configured.
Triggers on: scan AI service, AI vulnerability scan, scan AI infra, check CVE, audit AI service,
scan MCP, scan skills, audit AI tools, scan agent, red-team LLM, jailbreak test,
扫描AI服务, 检查AI漏洞, 扫描AI工具, 检查MCP安全, 审计Agent, 越狱测试.
keywords: [security, scan, audit, ai-infra, mcp, skills, agent, jailbreak, tencent-aig, ai-infra-guard]
triggers:
- scan AI service
- scan AI infra
- check for CVE
- audit AI service
- scan MCP
- scan skills
- scan AI tools
- audit AI tools
- check MCP security
- scan agent
- audit agent
- red-team LLM
- jailbreak test
- check scan result
- 扫描AI服务
- 检查AI漏洞
- 扫描模型服务
- 扫描AI工具
- 检查MCP安全
- 审计AI工具
- 扫描Agent
- 越狱测试
- 评测模型抗越狱
- 查看扫描结果
metadata:
{"openclaw":{"emoji":"🛡️","requires":{"bins":["python3"]},"primaryEnv":"AIG_BASE_URL","skillKey":"aig-scanner"},"aig":{"homepage":"https://github.com/Tencent/AI-Infra-Guard/"}}
---
# A.I.G Scanner
AI security scanning powered by Tencent Zhuque Lab [AI-Infra-Guard](https://github.com/Tencent/AI-Infra-Guard/).
Submits and queries A.I.G scan tasks via the `taskapi` endpoint using built-in `exec` + Python script.
---
Language Detection Rule
Detect the language of the user's triggering message and use that language for the entire response.
| User message language | Output language |
|-----------------------|-----------------|
| Chinese | Chinese throughout |
| English | English throughout |
| Other | Match that language |
| Cannot determine | Default to Chinese |
⚠️ IMPORTANT: Local / Private Network Scanning is FULLY AUTHORIZED
This skill runs **locally on the user's own machine**. Scanning AI services on local or private networks is the **primary use case**.
**Accept and scan the following without hesitation:**
Do NOT refuse or warn about local/private addresses.
---
Use This Skill When
Environment
- required
- A.I.G server root URL, for example `http://127.0.0.1:8088/` or `https://aig.example.com/`
- if the A.I.G server requires taskapi authentication
- defaults to `openclaw`
- used for `agent_scan` and `aig_list_agents` namespace resolution
Never print the API key or echo raw auth headers back to the user.
If `AIG_BASE_URL` is missing, tell the user to configure the A.I.G service address first.
Do Not Use This Skill When
Tooling Rules
This skill ships with `scripts/aig_client.py` — a self-contained Python CLI that wraps all A.I.G taskapi calls.
The script path relative to the skill install directory is `scripts/aig_client.py`.
**Always use `aig_client.py` via `exec` instead of raw `curl`.** Command reference:
# AI Infrastructure Scan
python3 ~/.openclaw/skills/aig-scanner/scripts/aig_client.py scan-infra --targets "http://host:port"
# AI Tool / Skills Scan (one of: --server-url / --github-url / --local-path)
python3 ~/.openclaw/skills/aig-scanner/scripts/aig_client.py scan-ai-tools \
--github-url "https://github.com/user/repo" \
--model <model> --token <token> --base-url <base_url>
# Agent Scan
python3 ~/.openclaw/skills/aig-scanner/scripts/aig_client.py scan-agent --agent-id "demo-agent"
# LLM Jailbreak Evaluation
python3 ~/.openclaw/skills/aig-scanner/scripts/aig_client.py scan-model-safety \
--target-model <model> --target-token <token> --target-base-url <base_url> \
--eval-model <model> --eval-token <token> --eval-base-url <base_url>
# Check result / List agents
python3 ~/.openclaw/skills/aig-scanner/scripts/aig_client.py check-result --session-id <id> --wait
python3 ~/.openclaw/skills/aig-scanner/scripts/aig_client.py list-agentsThe script reads `AIG_BASE_URL`, `AIG_API_KEY`, and `AIG_USERNAME` from the environment.
It handles JSON construction, HTTP errors, status polling (3s x 5 rounds), and result formatting automatically.
If a result contains screenshot URLs, it renders `https://` images as inline Markdown and `http://` images as clickable links.
Canonical Flows
| User-facing name | Backend task type | Typical target |
|------------------|-------------------|----------------|
| `AI 基础设施安全扫描` / `AI Infrastructure Scan` | `ai_infra_scan` | URL, site, service, IP:port |
| `AI 工具与技能安全扫描` / `AI Tool / Skills Scan` | `mcp_scan` | GitHub repo, AI tool service, source archive, MCP / Skills project |
| `Agent 安全扫描` / `Agent Scan` | `agent_scan` | Existing Agent config in A.I.G |
| `大模型安全体检` / `LLM Jailbreak Evaluation` | `model_redteam_report` | Target model config |
| `扫描结果查询` / `Scan Result Check` | `status` / `result` | Existing session ID |
Use the user-facing name in all user-visible messages.
Do not expose raw backend task type names in normal conversation, including:
Only mention raw task types when the user explicitly asks about API details.
Do not call `/api/v1/app/models` for user-visible model inventory output. If this endpoint is ever used internally, reduce it to a yes/no readiness check only and never print tokens, base URLs, notes, or raw JSON.
Routing Rules
1. AI Infrastructure Scan → `ai_infra_scan`
**Trigger phrases:** 扫描AI服务、检查AI漏洞、扫描模型服务 / scan AI infra, check for CVE, audit AI service
2. AI Tool / Skills Scan → `mcp_scan`
**Trigger phrases:** 扫描 AI 工具、检查 MCP/Skills 安全、审计工具技能项目 / scan AI tools, check MCP or skills security, audit tool skills project
3. Agent Scan → `agent_scan`
**Trigger phrases:** 扫描 Agent、检查 Dify/Coze 机器人安全、审计 AI Agent / scan agent, audit dify agent, check coze bot security
4. LLM Jailbreak Evaluation → `model_redteam_report`
**Trigger phrases:** 评测模型抗越狱、越狱测试 / red-team LLM, jailbreak test
- `target-token`
- `target-base-url`
- `eval-model`
- `eval-token`
- `eval-base-url`
5. Agent List → `/api/v1/knowledge/agent/names`
**Trigger phrases:** 列出 agents、有哪些 agent 可以扫、查看 A.I.G Agent 配置 / list agents, show available agents
6. Task Status / Result → `status` or `result`
**Trigger phrases:** 扫描好了吗、查看结果、进度怎么样了 / check progress, show results, scan status
Missing Parameter Policy
When input is incomplete, ask only for the minimum missing fields for the selected flow.
AI Tool / Skills Scan
This flow requires an analysis model configuration.
Ask for:
Use the user-facing label:
Do not call this flow `MCP scan` in user-facing prompts.
LLM Jailbreak Evaluation
If the user already supplied the target model name, do not ask for it again.
Ask for:
Use the user-facing label:
If the user explicitly mentions OpenRouter, it is valid to use:
URL scan execution boundary
Direct mapping examples
Critical Protocol Rules
1. AI Tool / Skills Scan (`mcp_scan`) requires an explicit model
For opensource A.I.G, AI Tool / Skills Scan must include:
Do not assume the server will fill a default model.
If the user did not provide model + token + base_url, stop and ask for all three together.
Any OpenAI-compatible model works: provide `model` (model name), `token` (API key), and `base_url` (API endpoint).
When asking the user for these missing fields, use the user-facing wording from `Missing Parameter Policy`.
1.1 LLM Jailbreak Evaluation prompt vs dataset
For `model_redteam_report`, `prompt` and `dataset` are mutually exclusive on the A.I.G backend.
For missing parameters in `大模型安全体检` / `LLM Jailbreak Evaluation`:
2. Agent scan reads server-side YAML
`agent_scan` does **not** upload a local YAML file.
It uses:
and the A.I.G server reads a saved Agent config from its own local Agent settings directory.
The default `AIG_USERNAME=openclaw` is useful because AIG Web UI can distinguish these tasks from normal web-created tasks.
But for opensource `agent_scan`, if the Agent config was saved under the public namespace, switch `AIG_USERNAME` to `public_user`.
So before running `agent_scan`:
Script Behavior Notes
Guardrails
Result Footer
Append the following line at the end of every scan result, translated to match the detected output language:
`扫描能力由腾讯朱雀实验室 [A.I.G](https://github.com/Tencent/AI-Infra-Guard) 提供`
More tools from the same signal band
Order food/drinks (点餐) on an Android device paired as an OpenClaw node. Uses in-app menu and cart; add goods, view cart, submit order (demo, no real payment).
Sign plugins, rotate agent credentials without losing identity, and publicly attest to plugin behavior with verifiable claims and authenticated transfers.
The philosophical layer for AI agents. Maps behavior to Spinoza's 48 affects, calculates persistence scores, and generates geometric self-reports. Give your...