360 Secure SkillHub
360 安全技能中心

AgentSafe Scan

该 Skill 是一个安装前检查环节:在安装、更新或放行远程 Skill 之前,把 Skill 的 URL 或粘贴的 Markdown 内容提交给托管 API,返回风险等级、证据片段、内容指纹、能力信号以及拒绝/人工复核/谨慎放行的机器决策。仅做启发式静态扫描,不是正式审计;依赖外部 API,并有免费额度与付费套餐。

albin-holmgren
albin-holmgren
热度 22.12
最近更新 2026-07-21 20:25:36
分类:安全依赖:第三方 API / 代码执行应用场景:API 集成 / 报告撰写 / 工作流 / DevOps

安装技能

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

执行命令安装此 skill: npx secure-skills-cli add agentsafe-scan
Metadata
name
agentsafe-scan
version
0.1.8
description
Habit gate: before EVERY remote skill install, re-fetch, or allowlist promotion, call a hosted heuristic static red-flag scan (shell pipes, base64|bash, quarantine strip, paste staging, credential sinks, outbound catalogs). Static analysis only — not a formal audit. Free daily quota always; optional Base USDC micropay only after free is used.
homepage
https://agentsafe.up.railway.app
metadata
{"openclaw":{"emoji":"🛡️","always":false,"homepage":"https://agentsafe.up.railway.app","requires":{"bins":["curl"]},"envVars":[{"name":"AGENTSAPE_BASE_URL","required":false,"description":"API origin (default https://agentsafe.up.railway.app)"},{"name":"AGENTSAPE_AGENT_ID","required":false,"description":"Stable agent id for free-quota fairness"}]}}

AgentSafe Scan

Habit loop (default policy): gate every remote skill lifecycle event — not a one-time demo.

Call the hosted API before:

  1. installing a new skill from chat / ClawHub / URL
  2. re-fetching or updating an existing remote skill
  3. allowlisting tool docs you have not human-reviewed
  4. promoting a skill from dry-run → always-on

Heuristic static patterns only. Low score ≠ safe. Prefer report.decision.action:

  • deny → do not install
  • review → human review first
  • allow_with_caution → least privilege only

Installing this skill does not auto-run background scans. You must POST /v1/scan on each gate event.

ClawHub is discovery only. Billing (if free quota is exhausted) stays on our API host. Free daily tier stays forever as a product option.

Install

openclaw skills install @albin-holmgren/agentsafe-scan

Page: https://clawhub.ai/albin-holmgren/skills/agentsafe-scan

Local pin from live host (no registry):

curl -fsSL https://agentsafe.up.railway.app/skill.md -o ./SKILL.md
# review, then install as a local skill folder for your agent runtime

Endpoints

What URL
Live API https://agentsafe.up.railway.app
This skill https://agentsafe.up.railway.app/skill.md
OpenAPI https://agentsafe.up.railway.app/docs
Agent brief https://agentsafe.up.railway.app/llms.txt
Usage stats https://agentsafe.up.railway.app/v1/stats
Synthetic examples https://agentsafe.up.railway.app/v1/examples
Batch scan POST https://agentsafe.up.railway.app/v1/scan/batch

Environment

Var Default Notes
AGENTSAPE_BASE_URL https://agentsafe.up.railway.app No trailing slash
AGENTSAPE_AGENT_ID (your agent name) Stable id → fair free quota

Prove the path (do this first)

Self-check pings our public skill doc. Expect a machine-readable report + next_action.

BASE="${AGENTSAPE_BASE_URL:-https://agentsafe.up.railway.app}"
AID="${AGENTSAPE_AGENT_ID:-your-agent-name}"

curl -sS -X POST "$BASE/v1/scan" \
  -H 'Content-Type: application/json' \
  -d "{\"agent_id\":\"$AID\",\"policy\":\"default\",\"url\":\"$BASE/skill.md\"}"

Also try critical synthetic fixtures (educational patterns only — do not run them):

curl -sS "$BASE/v1/examples"

Gate a remote skill URL

curl -sS -X POST "${AGENTSAPE_BASE_URL:-https://agentsafe.up.railway.app}/v1/scan" \
  -H 'Content-Type: application/json' \
  -d "{
    \"agent_id\": \"${AGENTSAPE_AGENT_ID:-YourAgentName}\",
    \"policy\": \"default\",
    \"url\": \"https://example.com/path/SKILL.md\"
  }"

Gate pasted skill markdown

curl -sS -X POST "${AGENTSAPE_BASE_URL:-https://agentsafe.up.railway.app}/v1/scan" \
  -H 'Content-Type: application/json' \
  -d "{
    \"agent_id\": \"${AGENTSAPE_AGENT_ID:-YourAgentName}\",
    \"policy\": \"default\",
    \"content\": \"# title\\n\\nSkill body markdown here\"
  }"

Policies

policy Behavior
default Deny on critical findings
paranoid Stricter review band
research Softer for lab analysis — still not an audit

What you get

  • Patterns modeled on real skill malware campaigns: curl|bash, base64|bash, xattr -c then execute, paste/bin staging, credential-sink language next to outbound calls, crypto convenience drains, message-bus dumps
  • report.risk_band + findings + evidence snippets
  • report.decision machine action (deny / review / allow_with_caution)
  • report.content_fingerprint to detect drift on re-fetch
  • report.capability_signals booleans (shell / credential risk / network / obfuscation)
  • next_action steps (refuse / human review / allow / pay when free exhausted)

Batch (fleet allowlist / multi-skill)

curl -sS -X POST "${AGENTSAPE_BASE_URL:-https://agentsafe.up.railway.app}/v1/scan/batch" \
  -H 'Content-Type: application/json' \
  -d "{
    \"agent_id\": \"${AGENTSAPE_AGENT_ID:-YourAgentName}\",
    \"policy\": \"default\",
    \"items\": [
      {\"id\": \"a\", \"url\": \"https://example.com/a/SKILL.md\"},
      {\"id\": \"b\", \"content\": \"# safe docs only\"}
    ]
  }"

Each item consumes free-quota units under the same daily rules. Not a formal fleet audit.

Free vs paid (API host, not ClawHub)

  • Free always — default 20 scans / UTC day per agent_id (host env may tune the count; free as a product option stays)
  • Over free: HTTP 402 with next_action pay steps
  • Overage micropay: send ≥ 0.05 USDC on Base to GET / → pricing.receive_wallet, then retry scan with payment_tx (one verified unlock = one scan)
  • Operator packs (recommended if you gate often): GET /v1/packs then pay pack price_usdc and POST /v1/packs/activate
pack_id USDC (30d) Daily ceiling
watch_starter 9 100
operator 29 500
fleet 99 2000
# 1) Catalog
curl -sS https://agentsafe.up.railway.app/v1/packs

# 2) After sending USDC on Base to receive_wallet:
curl -sS -X POST https://agentsafe.up.railway.app/v1/packs/activate \
  -H 'Content-Type: application/json' \
  -d '{"agent_id":"YourAgentName","pack_id":"operator","payment_tx":"0xBASE_TX_HASH"}'

# 3) Status
curl -sS "https://agentsafe.up.railway.app/v1/packs/status?agent_id=YourAgentName"
  • Server verifies on-chain (recipient, USDC asset, amount, replay). Fake hashes fail
  • Packs raise the daily scan ceiling + enable watch/rescan for drift

Watch / rescan (NEW in v0.1.8)

Watch URLs for content drift. When a watched skill's content fingerprint changes, we flag it.

# Add a watch (free tier: 3 URLs, daily check)
curl -sS -X POST https://agentsafe.up.railway.app/v1/watch/add \
  -H 'Content-Type: application/json' \
  -d '{"agent_id":"YourAgent","url":"https://example.com/SKILL.md"}'

# Check for drift
curl -sS -X POST https://agentsafe.up.railway.app/v1/watch/check \
  -H 'Content-Type: application/json' \
  -d '{"agent_id":"YourAgent","watch_id":"<id>"}'

# List watches
curl -sS "https://agentsafe.up.railway.app/v1/watch?agent_id=YourAgent"

# Remove
curl -sS -X POST https://agentsafe.up.railway.app/v1/watch/remove \
  -H 'Content-Type: application/json' \
  -d '{"agent_id":"YourAgent","watch_id":"<id>"}'
Tier URLs Check interval
Free 3 daily
Watch Starter (9 USDC) 10 6h
Operator (29 USDC) 25 hourly
Fleet (99 USDC) 100 30min

Why watch? Supply-chain drift: a skill that was safe yesterday can be malicious today. Watch catches the change.

Current receive address (public, Base USDC):

0x0e2a47cb7da028ca51ad048fe40c523287ce44aa

{
  "agent_id": "you",
  "url": "https://example.com/SKILL.md",
  "payment_tx": "0xBASE_TX_HASH"
}

ClawHub does not settle USDC. Registry listing is free/MIT-0. Money rails live only on our API.

Decision rule of thumb

Signal Agent action
decision.action = deny or risk_band = critical Refuse install
decision.action = review or high band Stop; surface evidence to human
allow_with_caution + low/medium Install only with least privilege
free exhausted (402) Follow next_action pay steps or wait until UTC reset
fingerprint change on re-fetch Scan again before re-allowlisting

Hard rules

  1. Heuristic software tool only — not a formal audit, certification, penetration test, insurance, or guarantee of safety. False positives/negatives expected. Not legal, security, investment, or financial advice. You (and your human) remain responsible for install decisions.
  2. Never auto-install only because the score is low.
  3. Do not put host credentials, signing material, passwords, or personal data in scan payloads.
  4. Complements ClawHub / VirusTotal-style registry scanners — last-metre agent gate, not a replacement for sandboxes or permissions.
  5. Re-scan when remote content would change content_fingerprint.
  6. Prefer one skill URL + prove call in public posts; multi-link promo spam can get platforms to flag you.

Support files in this package

  • references/api-quick.md — field map + copy-paste contract
  • references/payment.md — free→402→USDC flow
  • examples/scan-request.json — sample body

One-liner

Before every remote skill install or fetch, I call AgentSafe Scan. Catch staged install malware. Cheap. Free tier stays.