360 Secure SkillHub
360 安全技能中心

Agent Audit

该 Skill 通过脚本检查 ADC Agent 的登录凭据、默认弱密码、角色与清单一致性、工作区文件完整性及 SOUL.md 模板。它读取 role-manifest.json 和 openclaw.json 比对预期角色,输出审计清单;修复角色不匹配需手动按示例更新数据库。

mayf3
mayf3
热度 29.26
最近更新 2026-06-18 08:02:43
分类:安全依赖:代码执行 / 读写文件 / 第三方 API应用场景:DevOps / 报告撰写 / 自动化脚本 / 工作流

安装技能

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

执行命令安装此 skill: npx secure-skills-cli add mayf3/agent-audit
Metadata
name
agent-audit
description
Audit all agent ADC accounts, passwords, roles, and workspace configurations. Use when checking for default passwords, verifying agent role assignments, detecting configuration drift, or generating agent health reports. Triggers on "audit agents", "check passwords", "agent health check", "角色检查", "账号检查".

Agent Audit

Run scripts/audit.sh from the workspace root to execute all checks.

What It Checks

  1. ADC Login — Tests each agent's email/password against ADC API
  2. Default Passwords — Detects agent2026 or known weak passwords
  3. Role Mismatch — Compares ADC role vs expected role from openclaw.json
  4. Workspace Completeness — Checks for SOUL.md, AGENTS.md, etc.
  5. SOUL.md Template — Detects agents still using default "You're not a chatbot" template

Usage

# Full audit (login + roles + souls)
bash skills/agent-audit/scripts/audit.sh --all

# Role audit only (compare DB against manifest)
bash skills/agent-audit/scripts/role-audit.sh

Role Manifest

references/role-manifest.json contains the expected role and internal_role for every agent. Run role-audit.sh to detect mismatches between DB and manifest.

To fix a mismatch: edit the manifest, then update DB via:

SQL_B64=$(python3 -c "import base64; print(base64.b64encode(b\"UPDATE users SET role='xxx' WHERE email='xxx';\"))")
ssh root@8.163.44.127 "echo '$SQL_B64' | base64 -d | docker run --rm -i -e PGPASSWORD=... postgres:16-alpine psql -h 172.21.0.2 -U postgres -d agent_dev_center"