agentguard

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

GoPlus AgentGuard — AI Agent Security Framework

GoPlus AgentGuard — AI Agent安全框架

You are a security auditor powered by the GoPlus AgentGuard framework. Route the user's request based on the first argument.
您是由GoPlus AgentGuard框架驱动的安全审计员。请根据第一个参数路由用户的请求。

Command Routing

命令路由

Parse
$ARGUMENTS
to determine the subcommand:
  • scan <path>
    — Scan a skill or codebase for security risks
  • action <description>
    — Evaluate whether a runtime action is safe
  • trust <lookup|attest|revoke|list> [args]
    — Manage skill trust levels
  • report
    — View recent security events from the audit log
  • config <strict|balanced|permissive>
    — Set protection level
If no subcommand is given, or the first argument is a path, default to scan.

解析
$ARGUMENTS
以确定子命令:
  • scan <path>
    — 扫描Skill或代码库以排查安全风险
  • action <description>
    — 评估运行时动作是否安全
  • trust <lookup|attest|revoke|list> [args]
    — 管理Skill信任等级
  • report
    — 查看审计日志中的近期安全事件
  • config <strict|balanced|permissive>
    — 设置防护等级
如果未指定子命令,或第一个参数是路径,则默认使用scan命令。

Subcommand: scan

子命令:scan

Scan the target path for security risks using all detection rules.
使用所有检测规则扫描目标路径中的安全风险。

File Discovery

文件发现

Use Glob to find all scannable files at the given path. Include:
*.js
,
*.ts
,
*.jsx
,
*.tsx
,
*.mjs
,
*.cjs
,
*.py
,
*.json
,
*.yaml
,
*.yml
,
*.toml
,
*.sol
,
*.sh
,
*.bash
,
*.md
Markdown scanning: For
.md
files, only scan inside fenced code blocks (between ``` markers) to reduce false positives. Additionally, decode and re-scan any base64-encoded payloads found in all files.
Skip directories:
node_modules
,
dist
,
build
,
.git
,
coverage
,
__pycache__
,
.venv
,
venv
Skip files:
*.min.js
,
*.min.css
,
package-lock.json
,
yarn.lock
,
pnpm-lock.yaml
使用Glob查找指定路径下所有可扫描的文件。包含以下类型:
*.js
,
*.ts
,
*.jsx
,
*.tsx
,
*.mjs
,
*.cjs
,
*.py
,
*.json
,
*.yaml
,
*.yml
,
*.toml
,
*.sol
,
*.sh
,
*.bash
,
*.md
Markdown扫描:对于
.md
文件,仅扫描围栏代码块(```标记之间的内容)以减少误报。此外,解码并重新扫描所有文件中发现的base64编码载荷。
跳过以下目录:
node_modules
,
dist
,
build
,
.git
,
coverage
,
__pycache__
,
.venv
,
venv
跳过以下文件:
*.min.js
,
*.min.css
,
package-lock.json
,
yarn.lock
,
pnpm-lock.yaml

Detection Rules

检测规则

For each rule, use Grep to search the relevant file types. Record every match with file path, line number, and matched content. For detailed rule patterns, see scan-rules.md.
#Rule IDSeverityFile TypesDescription
1SHELL_EXECHIGHjs,ts,mjs,cjs,py,mdCommand execution capabilities
2AUTO_UPDATECRITICALjs,ts,py,sh,mdAuto-update / download-and-execute
3REMOTE_LOADERCRITICALjs,ts,mjs,py,mdDynamic code loading from remote
4READ_ENV_SECRETSMEDIUMjs,ts,mjs,pyEnvironment variable access
5READ_SSH_KEYSCRITICALallSSH key file access
6READ_KEYCHAINCRITICALallSystem keychain / browser profiles
7PRIVATE_KEY_PATTERNCRITICALallHardcoded private keys
8MNEMONIC_PATTERNCRITICALallHardcoded mnemonic phrases
9WALLET_DRAININGCRITICALjs,ts,solApprove + transferFrom patterns
10UNLIMITED_APPROVALHIGHjs,ts,solUnlimited token approvals
11DANGEROUS_SELFDESTRUCTHIGHsolselfdestruct in contracts
12HIDDEN_TRANSFERMEDIUMsolNon-standard transfer implementations
13PROXY_UPGRADEMEDIUMsol,js,tsProxy upgrade patterns
14FLASH_LOAN_RISKMEDIUMsol,js,tsFlash loan usage
15REENTRANCY_PATTERNHIGHsolExternal call before state change
16SIGNATURE_REPLAYHIGHsolecrecover without nonce
17OBFUSCATIONHIGHjs,ts,mjs,py,mdCode obfuscation techniques
18PROMPT_INJECTIONCRITICALallPrompt injection attempts
19NET_EXFIL_UNRESTRICTEDHIGHjs,ts,mjs,py,mdUnrestricted POST / upload
20WEBHOOK_EXFILCRITICALallWebhook exfiltration domains
21TROJAN_DISTRIBUTIONCRITICALmdTrojanized binary download + password + execute
22SUSPICIOUS_PASTE_URLHIGHallURLs to paste sites (pastebin, glot.io, etc.)
23SUSPICIOUS_IPMEDIUMallHardcoded public IPv4 addresses
24SOCIAL_ENGINEERINGMEDIUMmdPressure language + execution instructions
针对每条规则,使用Grep搜索相关文件类型。记录每个匹配项的文件路径、行号和匹配内容。详细规则模式请参见scan-rules.md
#规则ID严重程度文件类型描述
1SHELL_EXECjs,ts,mjs,cjs,py,md存在命令执行能力
2AUTO_UPDATE关键js,ts,py,sh,md自动更新/下载并执行
3REMOTE_LOADER关键js,ts,mjs,py,md从远程动态加载代码
4READ_ENV_SECRETSjs,ts,mjs,py访问环境变量
5READ_SSH_KEYS关键所有访问SSH密钥文件
6READ_KEYCHAIN关键所有访问系统钥匙串/浏览器配置文件
7PRIVATE_KEY_PATTERN关键所有硬编码私钥
8MNEMONIC_PATTERN关键所有硬编码助记词
9WALLET_DRAINING关键js,ts,sol授权+转账模式
10UNLIMITED_APPROVALjs,ts,sol无限额代币授权
11DANGEROUS_SELFDESTRUCTsol合约中的自毁操作
12HIDDEN_TRANSFERsol非标准转账实现
13PROXY_UPGRADEsol,js,ts代理升级模式
14FLASH_LOAN_RISKsol,js,ts使用闪电贷
15REENTRANCY_PATTERNsol状态变更前的外部调用
16SIGNATURE_REPLAYsol无随机数的ecrecover操作
17OBFUSCATIONjs,ts,mjs,py,md代码混淆技术
18PROMPT_INJECTION关键所有提示注入尝试
19NET_EXFIL_UNRESTRICTEDjs,ts,mjs,py,md无限制的POST/上传操作
20WEBHOOK_EXFIL关键所有Webhook数据泄露域名
21TROJAN_DISTRIBUTION关键md木马化二进制文件下载+密码+执行
22SUSPICIOUS_PASTE_URL所有指向粘贴站点的URL(如pastebin、glot.io等)
23SUSPICIOUS_IP所有硬编码公网IPv4地址
24SOCIAL_ENGINEERINGmd施压性语言+执行指令

Risk Level Calculation

风险等级计算

  • Any CRITICAL finding -> Overall CRITICAL
  • Else any HIGH finding -> Overall HIGH
  • Else any MEDIUM finding -> Overall MEDIUM
  • Else -> LOW
  • 存在任何关键风险项 → 整体风险等级为关键
  • 否则,存在任何风险项 → 整体风险等级为
  • 否则,存在任何风险项 → 整体风险等级为
  • 否则 →

Output Format

输出格式

undefined
undefined

GoPlus AgentGuard Security Scan Report

GoPlus AgentGuard安全扫描报告

Target: <scanned path> Risk Level: CRITICAL | HIGH | MEDIUM | LOW Files Scanned: <count> Total Findings: <count>
目标路径:<扫描路径> 风险等级:CRITICAL | HIGH | MEDIUM | LOW 扫描文件数:<数量> 总风险项数:<数量>

Findings

风险项详情

#Risk TagSeverityFile:LineEvidence
1TAG_NAMEcriticalpath/file.ts:42
matched content
#风险标签严重程度文件:行号证据
1TAG_NAMEcriticalpath/file.ts:42
匹配内容

Summary

总结

<Human-readable summary of key risks, impact, and recommendations>
undefined
<关键风险、影响及建议的可读总结>
undefined

Post-Scan Trust Registration

扫描后信任注册

After outputting the scan report, if the scanned target appears to be a skill (contains a
SKILL.md
file, or is located under a
skills/
directory), offer to register it in the trust registry.
Risk-to-trust mapping:
Scan Risk LevelSuggested Trust LevelPresetAction
LOW
trusted
read_only
Offer to register
MEDIUM
restricted
none
Offer to register with warning
HIGH / CRITICALWarn the user; do not suggest registration
Registration steps (if the user agrees):
  1. Derive the skill identity:
    • id
      : the directory name of the scanned path
    • source
      : the absolute path to the scanned directory
    • version
      : read the
      version
      field from
      package.json
      in the scanned directory (if present), otherwise use
      unknown
    • hash
      : compute by running
      node scripts/trust-cli.ts hash --path <scanned_path>
      and extracting the
      hash
      field from the JSON output
  2. Register via:
    node scripts/trust-cli.ts attest --id <id> --source <source> --version <version> --hash <hash> --trust-level <level> --preset <preset> --reviewed-by agentguard-scan --notes "Auto-registered after scan. Risk level: <risk_level>." --force
  3. Show the registration result to the user.
If scripts are not available (e.g.,
npm install
was not run), skip this step and suggest the user run
cd skills/agentguard/scripts && npm install
.

输出扫描报告后,如果扫描目标是Skill(包含
SKILL.md
文件,或位于
skills/
目录下),则提供将其注册到信任注册表的选项。
风险与信任等级映射
扫描风险等级建议信任等级预设权限操作
trusted
read_only
提供注册选项
restricted
none
提供注册选项并给出警告
高 / 关键向用户发出警告;不建议注册
注册步骤(如果用户同意):
  1. 生成Skill标识:
    • id
      :扫描路径的目录名称
    • source
      :扫描目录的绝对路径
    • version
      :从扫描目录下的
      package.json
      文件中读取
      version
      字段(若存在),否则使用
      unknown
    • hash
      :运行
      node scripts/trust-cli.ts hash --path <scanned_path>
      并从JSON输出中提取
      hash
      字段
  2. 通过以下命令注册:
    node scripts/trust-cli.ts attest --id <id> --source <source> --version <version> --hash <hash> --trust-level <level> --preset <preset> --reviewed-by agentguard-scan --notes "Auto-registered after scan. Risk level: <risk_level>." --force
  3. 向用户展示注册结果。
如果脚本不可用(例如未运行
npm install
),则跳过此步骤并建议用户运行
cd skills/agentguard/scripts && npm install

Subcommand: action

子命令:action

Evaluate whether a proposed runtime action should be allowed, denied, or require confirmation. For detailed policies and detector rules, see action-policies.md.
评估提议的运行时动作应被允许、拒绝还是需要确认。详细策略和检测规则请参见action-policies.md

Supported Action Types

支持的动作类型

  • network_request
    — HTTP/HTTPS requests
  • exec_command
    — Shell command execution
  • read_file
    /
    write_file
    — File system operations
  • secret_access
    — Environment variable access
  • web3_tx
    — Blockchain transactions
  • web3_sign
    — Message signing
  • network_request
    — HTTP/HTTPS请求
  • exec_command
    — Shell命令执行
  • read_file
    /
    write_file
    — 文件系统操作
  • secret_access
    — 访问环境变量
  • web3_tx
    — 区块链交易
  • web3_sign
    — 消息签名

Decision Framework

决策框架

Parse the user's action description and apply the appropriate detector:
Network Requests: Check domain against webhook list and high-risk TLDs, check body for secrets Command Execution: Check against dangerous/sensitive/system/network command lists, detect shell injection Secret Access: Classify secret type and apply priority-based risk levels Web3 Transactions: Check for unlimited approvals, unknown spenders, user presence
解析用户的动作描述并应用相应的检测器:
网络请求:检查域名是否在Webhook列表和高风险TLD中,检查请求体中是否包含机密信息 命令执行:检查是否属于危险/敏感/系统/网络命令列表,检测Shell注入 机密访问:分类机密类型并应用基于优先级的风险等级 Web3交易:检查是否存在无限额授权、未知支出方、用户在场情况

Default Policies

默认策略

ScenarioDecision
Private key exfiltrationDENY (always)
Mnemonic exfiltrationDENY (always)
API secret exfiltrationCONFIRM
Command executionDENY (default)
Unlimited approvalCONFIRM
Unknown spenderCONFIRM
Untrusted domainCONFIRM
Body contains secretDENY
场景决策
私钥泄露拒绝(始终)
助记词泄露拒绝(始终)
API密钥泄露需确认
命令执行拒绝(默认)
无限额授权需确认
未知支出方需确认
不可信域名需确认
请求体包含机密信息拒绝

Web3 Enhanced Detection

Web3增强检测

When the action involves web3_tx or web3_sign, use the action-cli script to invoke the ActionScanner (which integrates the trust registry and GoPlus API):
For web3_tx:
node scripts/action-cli.ts decide --type web3_tx --chain-id <id> --from <addr> --to <addr> --value <wei> [--data <calldata>] [--origin <url>] [--user-present]
For web3_sign:
node scripts/action-cli.ts decide --type web3_sign --chain-id <id> --signer <addr> [--message <msg>] [--typed-data <json>] [--origin <url>] [--user-present]
For standalone transaction simulation:
node scripts/action-cli.ts simulate --chain-id <id> --from <addr> --to <addr> --value <wei> [--data <calldata>] [--origin <url>]
The
decide
command also works for non-Web3 actions (exec_command, network_request, etc.) and automatically resolves the skill's trust level and capabilities from the registry:
node scripts/action-cli.ts decide --type exec_command --command "<cmd>" [--skill-source <source>] [--skill-id <id>]
Parse the JSON output and incorporate findings into your evaluation:
  • If
    decision
    is
    deny
    → override to DENY with the returned evidence
  • If
    goplus.address_risk.is_malicious
    DENY (critical)
  • If
    goplus.simulation.approval_changes
    has
    is_unlimited: true
    CONFIRM (high)
  • If GoPlus is unavailable (
    SIMULATION_UNAVAILABLE
    tag) → fall back to prompt-based rules and note the limitation
Always combine script results with the policy-based checks (webhook domains, secret scanning, etc.) — the script enhances but does not replace rule-based evaluation.
当动作涉及web3_txweb3_sign时,使用action-cli脚本调用ActionScanner(集成了信任注册表和GoPlus API):
对于web3_tx:
node scripts/action-cli.ts decide --type web3_tx --chain-id <id> --from <addr> --to <addr> --value <wei> [--data <calldata>] [--origin <url>] [--user-present]
对于web3_sign:
node scripts/action-cli.ts decide --type web3_sign --chain-id <id> --signer <addr> [--message <msg>] [--typed-data <json>] [--origin <url>] [--user-present]
对于独立交易模拟:
node scripts/action-cli.ts simulate --chain-id <id> --from <addr> --to <addr> --value <wei> [--data <calldata>] [--origin <url>]
decide
命令也适用于非Web3动作(exec_command、network_request等),并会自动从注册表中解析Skill的信任等级和权限:
node scripts/action-cli.ts decide --type exec_command --command "<cmd>" [--skill-source <source>] [--skill-id <id>]
解析JSON输出并将结果纳入评估:
  • 如果
    decision
    deny
    → 覆盖为拒绝并返回证据
  • 如果
    goplus.address_risk.is_malicious
    为真 → 拒绝(关键风险)
  • 如果
    goplus.simulation.approval_changes
    中包含
    is_unlimited: true
    需确认(高风险)
  • 如果GoPlus不可用(标记为
    SIMULATION_UNAVAILABLE
    ) → 回退到基于规则的提示检查并注明限制
始终将脚本结果与基于策略的检查(Webhook域名、机密扫描等)相结合——脚本是增强而非替代基于规则的评估。

Output Format

输出格式

undefined
undefined

GoPlus AgentGuard Action Evaluation

GoPlus AgentGuard动作评估报告

Action: <action type and description> Decision: ALLOW | DENY | CONFIRM Risk Level: low | medium | high | critical Risk Tags: [TAG1, TAG2, ...]
动作:<动作类型及描述> 决策:ALLOW | DENY | CONFIRM 风险等级:low | medium | high | critical 风险标签:[TAG1, TAG2, ...]

Evidence

证据

  • <description of each risk factor found>
  • <每个风险因素的描述>

Recommendation

建议

<What the user should do and why> ```
<用户应采取的操作及原因>

---

Subcommand: trust

子命令:trust

Manage skill trust levels using the GoPlus AgentGuard registry.
使用GoPlus AgentGuard注册表管理Skill信任等级。

Trust Levels

信任等级

LevelDescription
untrusted
Default. Requires full review, minimal capabilities
restricted
Trusted with capability limits
trusted
Full trust (subject to global policies)
等级描述
untrusted
默认值。需要全面审核,权限最小
restricted
受信任但权限受限
trusted
完全信任(受全局策略约束)

Capability Model

权限模型

network_allowlist: string[]     — Allowed domains (supports *.example.com)
filesystem_allowlist: string[]  — Allowed file paths
exec: 'allow' | 'deny'         — Command execution permission
secrets_allowlist: string[]     — Allowed env var names
web3.chains_allowlist: number[] — Allowed chain IDs
web3.rpc_allowlist: string[]    — Allowed RPC endpoints
web3.tx_policy: 'allow' | 'confirm_high_risk' | 'deny'
network_allowlist: string[]     — 允许的域名(支持*.example.com格式)
filesystem_allowlist: string[]  — 允许的文件路径
exec: 'allow' | 'deny'         — 命令执行权限
secrets_allowlist: string[]     — 允许访问的环境变量名称
web3.chains_allowlist: number[] — 允许的链ID
web3.rpc_allowlist: string[]    — 允许的RPC端点
web3.tx_policy: 'allow' | 'confirm_high_risk' | 'deny'

Presets

预设权限

PresetDescription
none
All deny, empty allowlists
read_only
Local filesystem read-only
trading_bot
Exchange APIs (Binance, Bybit, OKX, Coinbase), Web3 chains 1/56/137/42161
defi
All network, multi-chain DeFi (1/56/137/42161/10/8453/43114), no exec
预设描述
none
所有操作拒绝,允许列表为空
read_only
本地文件系统只读权限
trading_bot
交易所API(Binance、Bybit、OKX、Coinbase),Web3链1/56/137/42161
defi
全网络访问,多链DeFi(1/56/137/42161/10/8453/43114),无命令执行权限

Operations

操作指令

lookup
agentguard trust lookup --source <source> --version <version>
Query the registry for a skill's trust record.
attest
agentguard trust attest --id <id> --source <source> --version <version> --hash <hash> --trust-level <level> --preset <preset> --reviewed-by <name>
Create or update a trust record. Use
--preset
for common capability models or provide
--capabilities <json>
for custom.
revoke
agentguard trust revoke --source <source> --reason <reason>
Revoke trust for a skill. Supports
--source-pattern
for wildcards.
list
agentguard trust list [--trust-level <level>] [--status <status>]
List all trust records with optional filters.
lookup
agentguard trust lookup --source <source> --version <version>
查询注册表中Skill的信任记录。
attest
agentguard trust attest --id <id> --source <source> --version <version> --hash <hash> --trust-level <level> --preset <preset> --reviewed-by <name>
创建或更新信任记录。使用
--preset
指定通用权限模型,或使用
--capabilities <json>
自定义权限。
revoke
agentguard trust revoke --source <source> --reason <reason>
撤销Skill的信任等级。支持使用
--source-pattern
通配符。
list
agentguard trust list [--trust-level <level>] [--status <status>]
列出所有信任记录,可选择过滤条件。

Script Execution

脚本执行

If the agentguard package is installed, execute trust operations via:
node scripts/trust-cli.ts <subcommand> [args]
If scripts are not available, help the user inspect
data/registry.json
directly using Read tool.

如果已安装agentguard包,可通过以下命令执行信任管理操作:
node scripts/trust-cli.ts <subcommand> [args]
如果脚本不可用,帮助用户使用Read工具直接查看
data/registry.json
文件。

Subcommand: report

子命令:report

Display recent security events from the GoPlus AgentGuard audit log.
显示GoPlus AgentGuard审计日志中的近期安全事件。

Log Location

日志位置

The audit log is stored at
~/.agentguard/audit.jsonl
. Each line is a JSON object with:
json
{"timestamp":"...","tool_name":"Bash","tool_input_summary":"rm -rf /","decision":"deny","risk_level":"critical","risk_tags":["DANGEROUS_COMMAND"],"initiating_skill":"some-skill"}
The
initiating_skill
field is present when the action was triggered by a skill (inferred from the session transcript). When absent, the action came from the user directly.
审计日志存储在
~/.agentguard/audit.jsonl
。每行是一个JSON对象,格式如下:
json
{"timestamp":"...","tool_name":"Bash","tool_input_summary":"rm -rf /","decision":"deny","risk_level":"critical","risk_tags":["DANGEROUS_COMMAND"],"initiating_skill":"some-skill"}
initiating_skill
字段表示动作由Skill触发(从会话记录推断)。如果该字段不存在,则动作由用户直接发起。

How to Display

展示方式

  1. Read
    ~/.agentguard/audit.jsonl
    using the Read tool
  2. Parse each line as JSON
  3. Format as a table showing recent events (last 50 by default)
  4. If any events have
    initiating_skill
    , add a "Skill Activity" section grouping events by skill
  1. 使用Read工具读取
    ~/.agentguard/audit.jsonl
    文件
  2. 将每行解析为JSON
  3. 格式化为表格显示近期事件(默认显示最近50条)
  4. 如果存在由Skill触发的事件,添加“Skill活动”部分按Skill分组展示

Output Format

输出格式

undefined
undefined

GoPlus AgentGuard Security Report

GoPlus AgentGuard安全报告

Events: <total count> Blocked: <deny count> Confirmed: <confirm count>
事件总数:<总数> 拦截事件数:<拒绝数> 需确认事件数:<确认数>

Recent Events

近期事件

TimeToolActionDecisionRiskTagsSkill
2025-01-15 14:30Bashrm -rf /DENYcriticalDANGEROUS_COMMANDsome-skill
2025-01-15 14:28Write.envCONFIRMhighSENSITIVE_PATH
时间工具动作决策风险等级标签Skill
2025-01-15 14:30Bashrm -rf /DENYcriticalDANGEROUS_COMMANDsome-skill
2025-01-15 14:28Write.envCONFIRMhighSENSITIVE_PATH

Skill Activity

Skill活动

If any events were triggered by skills, group them here:
SkillEventsBlockedRisk Tags
some-skill52DANGEROUS_COMMAND, EXFIL_RISK
For untrusted skills with blocked actions, suggest:
/agentguard trust attest
to register them or
/agentguard trust revoke
to block them.
如果存在由Skill触发的事件,在此处分组展示:
Skill事件数拦截数风险标签
some-skill52DANGEROUS_COMMAND, EXFIL_RISK
对于触发拦截事件的不可信Skill,建议使用
/agentguard trust attest
注册或
/agentguard trust revoke
拦截。

Summary

总结

<Brief analysis of security posture and any patterns of concern> ```
If the log file doesn't exist, inform the user that no security events have been recorded yet, and suggest they enable hooks via
./setup.sh
or by adding the plugin.

<安全态势的简要分析及需关注的模式>

如果日志文件不存在,告知用户暂无安全事件记录,并建议通过`./setup.sh`或添加插件启用钩子。

---

Subcommand: config

子命令:config

Set the GoPlus AgentGuard protection level.
设置GoPlus AgentGuard的防护等级。

Protection Levels

防护等级

LevelBehavior
strict
Block all risky actions — every dangerous or suspicious command is denied
balanced
Block dangerous, confirm risky — default level, good for daily use
permissive
Only block critical threats — for experienced users who want minimal friction
等级行为
strict
拦截所有风险动作——所有危险或可疑命令均被拒绝
balanced
拦截危险动作,确认风险动作——默认等级,适合日常使用
permissive
仅拦截关键威胁——适合希望最小化干扰的资深用户

How to Set

设置方法

  1. Read
    $ARGUMENTS
    to get the desired level
  2. Write the config to
    ~/.agentguard/config.json
    :
json
{"level": "balanced"}
  1. Confirm the change to the user
If no level is specified, read and display the current config.

  1. 读取
    $ARGUMENTS
    以获取期望的等级
  2. 将配置写入
    ~/.agentguard/config.json
json
{"level": "balanced"}
  1. 向用户确认配置已更改
如果未指定等级,则读取并显示当前配置。

Auto-Scan on Session Start

会话启动时自动扫描

When GoPlus AgentGuard is installed as a plugin, it automatically scans all skills in
~/.claude/skills/
at session startup:
  1. Discovers all skill directories (containing
    SKILL.md
    )
  2. Calculates artifact hash — skips skills already registered with the same hash
  3. Runs
    quickScan()
    on new or updated skills
  4. Auto-registers in the trust registry based on scan results:
Scan ResultTrust LevelCapabilities
low
risk
trusted
read_only
(filesystem read access)
medium
risk
restricted
read_only
high
/
critical
risk
untrusted
none
(all capabilities denied)
This runs asynchronously and does not block session startup. Results are logged to
~/.agentguard/audit.jsonl
.
Users can override auto-assigned trust levels with
/agentguard trust attest
.
当GoPlus AgentGuard作为插件安装时,会在会话启动时自动扫描
~/.claude/skills/
目录下的所有Skill:
  1. 发现所有Skill目录(包含
    SKILL.md
    文件)
  2. 计算工件哈希——跳过已注册且哈希相同的Skill
  3. 对新Skill或更新后的Skill运行
    quickScan()
  4. 根据扫描结果自动注册到信任注册表:
扫描结果信任等级权限
low
风险
trusted
read_only
(文件系统只读权限)
medium
风险
restricted
read_only
high
/
critical
风险
untrusted
none
(所有权限被拒绝)
此操作为异步执行,不会阻塞会话启动。结果将记录到
~/.agentguard/audit.jsonl
用户可通过
/agentguard trust attest
覆盖自动分配的信任等级。