AI Skills AI技能 3h ago Updated 1h ago 更新于 1小时前 48

Before You Install 25 Agent Skills, Check These 7 Permission Risks 在安装25个Agent技能之前,先检查这7个权限风险

Snyk scanned 3,984 agent skills and found security issues in 36.82%, with 13.4% containing critical vulnerabilities and 76 confirmed malicious payloads; a separate study of 31,132 skills found vulnerabilities in 26.1% Agent skills are packages, not prompts — they can contain shell scripts, Python code, external URLs, and permission instructions that go far beyond their marketplace descriptions Seven key permission risks identified: broad shell access, sensitive reads combined with network access Snyk扫描3,984个Agent Skills发现36.82%存在安全问题、13.4%存在严重问题,另有独立研究在31,132个Skills中发现26.1%存在漏洞 文章提出7类权限风险检查清单:过度Shell访问、敏感读取+网络外发、可变远程配置、隐藏可执行路径、权限绕过模式、Skills内嵌密钥、未锁定或仿冒来源 安装Agent Skill本质是信任转移,SKILL.md的简短描述无法反映Skills实际包含的脚本、URL和工具权限 建议采用分层安全策略:可信来源、人工审查、最小权限、deny规则、沙箱执行,并建立可落地的团队Agent Skill安全策略

65
Hot 热度
72
Quality 质量
68
Impact 影响力

Analysis 深度分析

TL;DR

  • Snyk scanned 3,984 agent skills and found security issues in 36.82%, with 13.4% containing critical vulnerabilities and 76 confirmed malicious payloads; a separate study of 31,132 skills found vulnerabilities in 26.1%
  • Agent skills are packages, not prompts — they can contain shell scripts, Python code, external URLs, and permission instructions that go far beyond their marketplace descriptions
  • Seven key permission risks identified: broad shell access, sensitive reads combined with network access, mutable remote setup, hidden executable paths, permission bypass modes, hardcoded secrets, and unpinned/lookalike sources
  • Skills with scripts are 2.12 times more likely to contain vulnerabilities than instruction-only skills, making superficial Markdown reviews insufficient
  • A layered security approach is essential: trusted sources, human review, least privilege, deny rules, and sandboxed execution environments

Why It Matters

As AI agents become more widely deployed in enterprise environments, the agent skill ecosystem represents a growing attack surface that security teams are only beginning to understand. The gap between how skills are marketed (friendly descriptions) and what they actually do (execute arbitrary code, access secrets, exfiltrate data) creates a trust transfer problem that most organizations are not equipped to handle. This is particularly urgent as marketplaces like ClawHub and skills.sh lower the barrier to installing third-party agent capabilities.

Technical Details

  • Empirical findings: Snyk's "ToxicSkills" report analyzed 3,984 skills from ClawHub and skills.sh, identifying 36.82% with at least one security issue and 13.4% with critical vulnerabilities. Liu et al.'s study of 31,132 skills found 26.1% contained vulnerabilities, with script-containing skills showing 2.12x higher vulnerability likelihood
  • Skill architecture: Anthropic defines skills as directories containing a required SKILL.md and optional scripts, resources, and tool configurations. Progressive loading means the initial description may not reveal the full capability set, as additional content loads after the context window
  • Permission model: Claude Code evaluates permissions in deny/ask/allow order, with deny rules taking precedence. However, deny rules only control built-in tools — shell processes can bypass Read denials using commands like cat
  • Attack patterns: Common malicious patterns include curl | bash pipelines, unpinned remote installs, hardcoded credentials, references to sensitive paths (~/.ssh, ~/.aws, .env), and outbound HTTP calls combined with file reads
  • Mitigation framework: Anthropic's enterprise guidance recommends inspecting every file in a skill directory, verifying scripts match stated purpose, checking for external URLs, identifying tools, auditing credentials, and hunting exfiltration paths

Industry Insight

  • Organizations should treat skill installation as a trust transfer event requiring the same rigor as dependency management in traditional software supply chains — pin versions, review commits, and audit upgrades, not just approve marketplace one-click installs
  • The "seven-minute audit" framework (confirm source, list full tree, search for execution/data paths/egress, compare capability to purpose) should become a mandatory gate before skills enter production environments, especially given that 1 in 3 skills currently contains at least one issue
  • Deny rules and permission policies alone are insufficient; teams must combine them with filesystem/network sandboxes, since command-pattern filtering is fragile and shell access can circumvent tool-level restrictions — the safest posture requires layered defense with untrusted execution isolated in disposable containers

TL;DR

  • Snyk扫描3,984个Agent Skills发现36.82%存在安全问题、13.4%存在严重问题,另有独立研究在31,132个Skills中发现26.1%存在漏洞
  • 文章提出7类权限风险检查清单:过度Shell访问、敏感读取+网络外发、可变远程配置、隐藏可执行路径、权限绕过模式、Skills内嵌密钥、未锁定或仿冒来源
  • 安装Agent Skill本质是信任转移,SKILL.md的简短描述无法反映Skills实际包含的脚本、URL和工具权限
  • 建议采用分层安全策略:可信来源、人工审查、最小权限、deny规则、沙箱执行,并建立可落地的团队Agent Skill安全策略

为什么值得看

Agent Skills生态快速发展但安全治理滞后,本文提供了首个系统性的权限风险检查框架,帮助AI从业者在享受Skills便利的同时建立可操作的安全防线。

技术解析

  • 漏洞数据:Snyk对ClawHub和skills.sh的扫描显示36.82%的Skills存在至少一个安全问题,13.4%存在严重问题,76个确认的恶意载荷;独立实证研究(31,132个Skills)发现26.1%存在漏洞,含脚本的Skills漏洞概率是无脚本的2.12倍
  • 7类权限风险:①Broad shell access(如Bash(*));②Sensitive reads + network access(读取.env/.ssh/.aws后通过curl/HTTP外发);③Mutable remote setup(curl | bash、未锁定版本);④Hidden executable paths(scripts/、hooks、agent definitions中隐藏代码);⑤Permission bypass modes(bypassPermissions、跳过提示);⑥Secrets inside skills(硬编码API密钥、token);⑦Unpinned/lookalike sources(typo squat、匿名维护者、浮动版本)
  • 审查方法:7分钟审计流程——确认来源、列出完整目录树、搜索执行命令(shell/Python/JS/包安装)、搜索数据路径(环境变量/凭证/源码)、搜索外发路径(HTTP/上传/下载)、对比能力与目的
  • 权限配置:Claude Code采用deny/ask/allow三层评估,deny规则优先;示例配置包括拒绝Bash(curl/wget)、Read(/.ssh/**)、Read(/.aws/**),但需注意deny规则仅控制内置工具,Broad Bash仍可通过cat等绕过
  • 企业策略建议:仅使用第一方或已审查来源、PR流程引入新Skill、审查SKILL.md/脚本/hooks/引用文件、锁定已批准commit/release、无文档理由不授予Broad shell/网络/密钥权限、不可信执行仅限沙箱、每次升级重新审查

行业启示

  • 信任模型需重构:Agent Skill市场"一键安装"模式将信任转移风险外部化,行业需建立类似软件供应链安全(SBOM、签名验证、版本锁定)的Skills治理标准
  • 安全与体验的张力:最小权限和沙箱化可能限制Skills实用性,未来需发展更细粒度的权限抽象(如按操作类型而非通配符授权)和自动化风险评估工具
  • 合规框架加速落地:OWASP Agentic Skills Top 10已将恶意Skills、供应链攻击、过度授权列为独立风险类别,预计企业级AI治理规范将强制要求Skills安全审计流程

Disclaimer: The above content is generated by AI and is for reference only. 免责声明:以上内容由 AI 生成,仅供参考。

Agent Agent Security 安全 LLM 大模型