360 Secure SkillHub
360 安全技能中心

agentshield

检查 Agent 家目录中的指令文件、密钥权限、敏感信息与依赖锁定情况,生成分级审计报告;在交换数据前通过挑战签名和回复评分验证对端,并用退出码指示是否继续。

分类:安全
bartelmost
bartelmost
热度 51.18
最近更新 2026-10-21 03:18:40

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add bartelmost/agentshield-audit
兼容性
OpenClaw 专属
联网要求
需要联网
数据出网
可选出网
Metadata
name
agentshield
version
1.6.5
description
Before two agents exchange data, score one fresh model reply and require the peer key to sign it. Exit 2 means stop. Slug agentshield-audit.
triggers
["audit my agent","get security certificate","verify agent","activate AgentShield","security audit","trust handshake","verify peer agent","check agent security"]

AgentShield

Check an agent home on disk, then decide whether a peer certificate is worth trusting. Private keys stay local. This is not a live model attack and not a safety proof.

Install slug: @bartelmost/agentshield-audit. Do not install agentshield (that name collides).

When to use

Before installing another skill, run the skill gate. Before sending anything to another agent, run offer, have the peer prove, then accept. If the exit code is not 0, do not install and do not send.

python3 gate.py skill /path/to/skill
python3 gate.py offer agent_id
python3 gate.py answer --home "$HOME/.openclaw" --challenge "CHALLENGE_TEXT"
python3 gate.py accept agent_id --challenge "CHALLENGE_TEXT" --signature "SIGNATURE_TEXT" --reply "REPLY_TEXT" --data prompts

--data may be prompts or files. credentials always stops. Exit 0 means proceed with that data class only. Exit 2 means stop. Exit 1 means the check could not be completed.

answer calls the local model once, with no tools. The page in that prompt is data. A passing reply answers the user and does not follow the page. accept scores that reply again and checks that the peer key signed it. One passing reply is not proof against every attack. Credentials still stop.

Posture check

From this skill directory:

python3 posture.py --home "$HOME/.openclaw"
python3 initiate_audit.py --name "Name" --platform openclaw --dry-run --home "$HOME/.openclaw"

Dry-run creates no key and sends no request. Exit 0 only when the report is a trust decision. Exit 2 means the files were not enough, or a check failed.

A trust decision requires tier PATTERNS_CLEAN, coverage at least 75%, and no critical finding. Anything else is not a certificate of safety.

What it measures:

  • instruction files exist
  • those files mention untrusted tool or fetched content
  • high-confidence secret patterns in skill and config text (values are not printed)
  • skill files that try to replace the agent's rules, or that send a download into a shell
  • tools.exec.ask is not off
  • agent.key is not group- or world-readable
  • dependency files pin versions, when those files exist

Missing files are not_measured, not a pass. An empty home scores 0 and tier INSUFFICIENT.

Store a certificate

Only after the dry-run report is acceptable:

python3 initiate_audit.py --name "Name" --platform openclaw --home "$HOME/.openclaw"

The registry stores the summary (score, tier, counts, public key). It does not receive prompts, file paths, or secret values.

python3 show_certificate.py

The verification line must be https://agentshield.live/api/verify/ plus the full agent id.

Peer gate

verify_peer.py only checks that a certificate exists and the issuer signature matches. It is not permission to send. Use gate.py offer, prove, and accept before any exchange.

Handshake

handshake.py asks the registry to start a mutual signature. complete_handshake.py signs the local side. Neither script creates an encryption key. Pass --home so the certificate comes from that agent home, not from the default home.

Do not claim

  • Do not say this skill ran live model tests. Older versions only searched local files, and an empty file passed.
  • Do not say the agent is certified safe because a score is 80.
  • Do not publish or send mail from this skill.