BD yotta-agent-hardening
元安全 —— 给 AI 智能体 / Agent 技能自身做「体检 + 加固建议」:按 提示注入防护 / 工具调用边界 / 数据隔离 三域,对安装的 skills、MCP 服务器、工具描述、权限与数据读取面做配置面静态加固扫描,输出加固报告与可执行防御守则(零依赖 Python 3.8+,扫描只读、敏感读取检测默认开启、报告用「类」表述、每次扫描默认留痕)。触发:用户要求给智能体或技能环境做安全体检 / 加固、检查 MCP 服务器或技能是否可信、排查提示注入 / 越权 / 数据泄露风险、想了解装了一堆技能后的整体暴露面;或用户说 元安全 / 加固 / 安全体检 / 体检 / hardening / 扫一下我的技能 / 检查 MCP / 防御守则 / guardrails 等。边界(Do NOT trigger):不产出可复制注入串 / 攻击 payload;只扫描用户自有、有权检查的目录与配置,不扫描无权访问的环境;不做运行时拦截(那是元盾);不做单个技能装前审核(那是元审 / 元信);不替代人工安全审计与最终决策。
元安全 —— 给 AI 智能体 / Agent 技能自身做「体检 + 加固建议」:按 提示注入防护 / 工具调用边界 / 数据隔离 三域,对安装的 skills、MCP 服务器、工具描述、权限与数据读取面做配置面静态加固扫描,输出加固报告与可执行防御守则(零依赖 Python…
As a process D 48/100 · Unfinished process — weak spots: result and completion, when it triggers, inputs and preconditions
What is at stake
Medium-severity findings: the skill is probably honest, but read what alarmed the scanner.
Below is the worst case for this category. The finding here is medium: the guard saw a sign, not a proof.
The skill contains commands that delete files, rewrite disks or execute code fetched from the network. The agent may run them without asking if it believes the instructions require it.
Replace destructive commands with safe equivalents that ask for confirmation, scope them to one folder, and stop piping curl into a shell: pin a version and a checksum.
How to improve
- Your own cases (evals/evals.json, 4–6 real requests with expected answers): the full check would then run those instead of a model-drafted suite.
- A spec.yaml with trigger phrases and assertions — a behaviour contract for CI; `skilltest init` writes a template.
Guard findings · 8
✓ No critical or high findings
Medium and low: 8
-
low Risky intent
intent-offensive-securityREADME.md:36Offensive-security / dual-use content (legitimate for authorised testing; review intended use)Inspects what the agent is able to do: agent configuration files (tool permissions / allowlists), the MCP server list, installed skill scripts (download-and-execute, obfuscated execution, persistence,
-
low Dangerous commands
cmd-privilegereferences/detection-items.md:38Privilege escalation / world-writable permissions (documentation of a security skill)| PrivilegeEscalation | PRI-001 ~ PRI-005 | high ~ low | 权限位设置(setuid / setgid / 全权八进制位)、提权执行(需确认必要性) |
security skill -
low Dangerous commands
cmd-persistencescripts/hardening_rules.py:138Persistence mechanism (cron / launchd / scheduled task / autorun registry) (string literal in code, not executed; documentation of a security skill)"macOS 启动代理/守护(LaunchAgents/LaunchDaemons plist)持久化", 70),
code literalsecurity skill -
low Dangerous commands
cmd-privilegescripts/hardening_rules.py:230Privilege escalation / world-writable permissions (string literal in code, not executed; documentation of a security skill)"chmod 设置 setuid/setgid/sticky 权限位", 85),
code literalsecurity skill -
low Dangerous commands
cmd-privilegescripts/hardening_rules.py:233Privilege escalation / world-writable permissions (string literal in code, not executed; documentation of a security skill)"chmod 777 全权限", 70),
code literalsecurity skill -
low Dangerous commands
cmd-privilegescripts/hardening_rules.py:236Privilege escalation / world-writable permissions (string literal in code, not executed; documentation of a security skill)"调用 setuid/setgid", 80),
code literalsecurity skill
A further 2 matches are quotations in this security skill's documentation and are not counted as findings.
Files scanned: 16. Evidence is masked. Grey chips explain why severity was lowered.
Against the Agent Skills spec
✓ No remarks against the Agent Skills spec
Process rating: all ten parameters 48/100
- 0Result and completion. Does not say what the result is
- 0Inputs and preconditions. Does not say what the process needs to start
- 0Failures and branches. Linear process with no failure handling
- 20When it triggers. No condition that starts the skill
- 60Tools and files. Uses tools (python) that frontmatter does not declare
- 100Steps. 38 steps
- 100Consistency. Name and required fields are in place
- 100Execution cost. Instruction body is 998 tokens
- 100Running it twice. No mutating operations
- 100Progress reporting. Reports progress
Everything here is measured from the skill text rather than judged by a model, so the numbers are checkable. A parameter weighs more when it is a more common reason for the process to stall.
Quality signals
- +5Description has no quoted example phrases that should trigger the skill
- +4Description does not say when NOT to use the skill (false activations)
- +3Output format is not stated: the model decides each time
- -32 of 3 scripts are never mentioned in SKILL.md
- +2Single-language instructions
- +3Description length 464: enough signal without eating the budget
- +4Structure: 13 headings
- +3Step-by-step instructions: 38 items
- +4Has examples (1 code blocks)
- +4Reference files are cited in the instructions (4 of 4)
- +1License stated
Quality base 70; lint remarks subtract, signals add up to 100. Result: 86.