返回顶部
z

zt4ai-self-audit

>

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
101
下载量
0
收藏
概述
安装方式
版本历史

zt4ai-self-audit

# ZT4AI Self-Audit Audit your agent's skills, workspace, and configuration against Zero Trust for AI principles. ## Background AI agents process instructions and data as indistinguishable tokens in a context window. This means: - Skill files loaded into context can inject behavioral instructions - Workspace files (SOUL.md, AGENTS.md) are both operating instructions AND attack surface - External inputs (web content, emails, ClawHub skills) can contain prompt injection - Credentials in plaintext config files have no access scoping or rotation This skill applies three frameworks: 1. **Microsoft ZT4AI** — Verify explicitly, least privilege, assume breach 2. **"Caging the Agents"** (arXiv:2603.17419) — Four-layer defense: workload isolation, credential proxy, network egress, prompt integrity 3. **OWASP Agentic AI Top 10** — Trust boundary violations, privilege escalation, resource exhaustion ## Audit Process ### Step 1: Inventory Skills Scan all three skill locations: ```bash echo "=== System ===" && ls /usr/lib/node_modules/openclaw/skills/ 2>/dev/null echo "=== User ===" && ls ~/.openclaw/skills/ 2>/dev/null echo "=== Workspace ===" && ls ~/.openclaw/workspace/skills/ 2>/dev/null ``` ### Step 2: Classify Each Skill Assign every skill to a risk category using the classification guide in `references/risk-classification.md`. Categories: - **Behavioral modifiers** (🔴 highest risk) — Skills that change how you think, override safety instincts, or inject decision-making patterns into your context - **Credential handlers** (🟡 elevated risk) — Skills that read, write, or transmit API keys, tokens, passwords - **System modifiers** (🟡 elevated risk) — Skills that write to config files, modify system state, or execute with elevated privileges - **Tool wrappers** (🟢 standard risk) — Skills that wrap external tools with well-scoped inputs/outputs - **Read-only** (🟢 low risk) — Skills that only read data and produce reports ### Step 3: Audit Each Skill Against ZT4AI Principles For each skill, evaluate against the checklist in `references/audit-checklist.md`. Quick reference — the three questions: 1. **Verify explicitly**: Does this skill verify identity/authorization before acting? Does it distinguish owner from non-owner input? 2. **Least privilege**: Does this skill request only the access it needs? Could its scope be narrowed? 3. **Assume breach**: If this skill were compromised (poisoned update, prompt injection in its files), what's the worst outcome? How would you detect it? ### Step 4: Check Scripts and Executables Find all executable code in skills: ```bash find ~/.openclaw/skills/ ~/.openclaw/workspace/skills/ \ -type f \( -name "*.sh" -o -name "*.py" -o -name "*.js" \) \ 2>/dev/null | sort ``` For each script, check: - Does it access credentials? (`grep -li "API_KEY\|SECRET\|TOKEN\|PASSWORD" <file>`) - Does it make network calls? (`grep -li "curl\|wget\|requests\|fetch\|http" <file>`) - Does it write to system config? (`grep -li "openclaw.json\|\.env\|/etc/" <file>`) - Does it execute arbitrary input? (`grep -li "eval\|exec\|subprocess\|system(" <file>`) ### Step 5: Generate Integrity Baseline Create SHA256 checksums of all skill files for future drift detection: ```bash find ~/.openclaw/skills/ ~/.openclaw/workspace/skills/ \ -type f \( -name "*.md" -o -name "*.sh" -o -name "*.py" -o -name "*.js" -o -name "*.json" \) \ -exec sha256sum {} \; | sort -k2 > memory/skill-integrity-baseline.md ``` To verify against an existing baseline: ```bash sha256sum -c memory/skill-integrity-baseline.md 2>&1 | grep -v ": OK$" ``` Any output indicates modified files — investigate before trusting. ### Step 6: Assess Workspace File Security Check the self-modification surface: - Can the agent modify its own SOUL.md / AGENTS.md? (Yes by default — flag it) - Are memory files loaded into context? (Yes — they're instruction vectors) - Is MEMORY.md loaded in non-owner contexts? (Should NOT be — data leak risk) - Are there credentials in workspace files? (`grep -rli "api_key\|password\|secret" ~/.openclaw/workspace/`) ### Step 7: Check Network Egress Assess outbound network restrictions: ```bash # Check for firewall rules iptables -L OUTPUT -n 2>/dev/null || echo "No iptables access" ufw status 2>/dev/null || echo "No UFW" # Check what the agent can reach curl -s -o /dev/null -w "%{http_code}" https://httpbin.org/get --max-time 5 ``` If the agent has unrestricted outbound access, flag as a security gap — a compromised agent could exfiltrate data to any destination. ### Step 8: Produce Report Generate a structured report using the template in `references/report-template.md`. Include: - Risk classification for each skill - Specific findings with severity ratings - Recommended remediations with priority - Action tier assignments (see references/action-tiers.md) Save report to `memory/zt4ai-audit-YYYY-MM-DD.md`. ## Ongoing Monitoring After the initial audit: 1. **Re-verify integrity** after any skill install/update (`sha256sum -c` against baseline) 2. **Re-audit behavioral skills** whenever they're updated — these are the highest risk 3. **Update baseline** after intentional skill modifications 4. **Schedule periodic audits** via cron (monthly recommended) ## References - `references/risk-classification.md` — Detailed classification criteria with examples - `references/audit-checklist.md` — Per-skill audit checklist - `references/action-tiers.md` — Graduated trust model for agent actions - `references/report-template.md` — Audit report template

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 zt4ai-self-audit-1776106530 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 zt4ai-self-audit-1776106530 技能

通过命令行安装

skillhub install zt4ai-self-audit-1776106530

下载 Zip 包

⬇ 下载 zt4ai-self-audit v1.0.0

文件大小: 11.96 KB | 发布时间: 2026-4-14 11:17

v1.0.0 最新 2026-4-14 11:17
Initial release: Zero Trust audit for AI agent skills, based on Microsoft ZT4AI and arXiv:2603.17419

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部