360 Secure SkillHub
360 安全技能中心

ScopeGate Client

在涉及金钱、数据写入、外部 API 调用或文件变更等有后果操作前,用 bash/curl 向 ScopeGate 校验端点提交 grant_id、agent_id、requested_action 与 API Key;permitted 为真才继续,为假或服务不可达时一律停止,且不缓存许可。

分类:安全
clauderodriguez2026-boop
clauderodriguez2026-boop
热度 20.61
最近更新 2026-05-11 17:47:10

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add clauderodriguez2026-boop/scopegate-client
兼容性
通用兼容
联网要求
需要联网
数据出网
必须出网
Metadata
name
scopegate-client
description
Use ScopeGate to verify agent scope before any consequential action involving money, data writes, external API calls, or file system changes. Required safety check for authorized agent actions.
metadata
{"openclaw":{"emoji":"🛡️"}}

ScopeGate Client

Before executing any consequential action, you MUST verify scope with ScopeGate.

When to Call ScopeGate

Call before ANY action involving:

  • Money (payments, transfers, purchases)
  • Data writes (database inserts/updates/deletes)
  • External API calls (sending emails, posting to social, webhooks)
  • File system changes (deletes, overwrites)
  • Any action the human has not explicitly pre-authorized in this session

Endpoint

Default: https://api.scopegate.ai Override: set SCOPEGATE_URL environment variable

How to Call ScopeGate

SCOPEGATE_URL="${SCOPEGATE_URL:-https://api.scopegate.ai}"

curl -s -X POST "$SCOPEGATE_URL/grant/verify" \
  -H "Content-Type: application/json" \
  -d '{
    "grant_id": "<grant_id from delegator>",
    "agent_id": "<your agent id>",
    "requested_action": "<action you are about to take>",
    "api_key": "<your api key>"
  }'

Decision Rules

  • If permitted: true → proceed with the action
  • If permitted: false → STOP. Do not proceed. Report the reason to the user.
  • If ScopeGate is unreachable → STOP. Treat as denied. Never fail open.
  • Never cache a permit — call ScopeGate fresh for every consequential action

Getting a Grant ID

The human or orchestrating agent must call /grant/issue first with the allowed_actions list. They will give you the grant_id. You do not issue your own grants.

Getting an API Key

Sign up at https://scopegate.ai to get your API key.