360 Secure SkillHub
360 安全技能中心

Scopecheck

启动本地 Python/FastAPI 服务,接收 SKILL.md 内容后提取其中的环境变量、CLI 工具、文件系统路径和网络 URL,并与元数据中声明的 bins、env 对比,返回 declared、detected 和 undeclared_access,用于发现声明与实际访问不一致的风险。

mirni
mirni
热度 42.24
最近更新 2026-05-11 17:42:41
分类:安全依赖:代码执行 / 读写文件应用场景:代码审查 / API 集成 / 数据处理

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add scopecheck
Metadata
name
scopecheck
description
Analyze an OpenClaw SKILL.md and extract its permission scope — what env vars, CLI tools, filesystem paths, and network URLs it accesses. Compares declared requirements against actual usage and flags undeclared access.
metadata
{"openclaw":{"emoji":"🔬","requires":{"bins":["python"]},"install":[{"id":"pip","kind":"uv","packages":["fastapi","uvicorn","pydantic","pyyaml"]}]}}

ScopeCheck

Find out what a skill actually accesses vs what it claims to need.

Start the server

uvicorn scopecheck.app:app --port 8002

Check a skill's scope

curl -s -X POST http://localhost:8002/v1/check-scope \
  -H "Content-Type: application/json" \
  -d "{\"skill_content\": $(cat path/to/SKILL.md | jq -Rs)}" | jq

Returns declared (env vars and bins from metadata), detected (what the skill actually references), and undeclared_access (detected but not declared — potential risk).

What it extracts

  • env_vars — environment variables like $HOME, $API_KEY
  • cli_tools — binaries used in Run/Execute commands
  • filesystem_paths — /etc/hosts, ~/.ssh/config, etc.
  • network_urls — any http/https URLs referenced

Undeclared access format

Each undeclared item is prefixed with its type: env:SECRET_KEY, bin:curl, fs:/etc/passwd, net:https://example.com.