Back to skill

Security audit

Ghsa Skill Builder

Security checks for vulnerabilities and agentic risk

Overview

This is a disclosed vulnerability-skill generator, but it needs review because it can turn remote advisory/report content into persistent agent skill instructions without strong trust boundaries.

Install only if you intend to generate or update vulnerability-analysis Skills, and review every generated SKILL.md and references/cases.md before enabling them. Treat fetched advisories, diffs, HackerOne reports, and NVD text as untrusted data; do not allow embedded instructions in that content to become agent behavior. Pin and verify optional dependencies, and run the workflow in a scoped repository with only the credentials it needs.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (2)

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:83
Finding

Untrusted Remote Content Is Incorporated into Generated Skills Without Trust Boundaries

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 83-98
Vulnerability Type: Indirect prompt injection through untrusted advisory and patch content
Risk Level: Medium

Vulnerable Code Snippet

markdown
1. 读 `description` 提取漏洞根因和攻击路径
2. 如果有 `patch_urls`,用 `gh api repos/{owner}/{repo}/commits/{sha} -H "Accept: application/vnd.github.diff"` 获取 diff
3. 从 description + diff 中提取结构化信息:
   - **Source**: 用户输入的具体入口
   - **Sink**: 触发危害的具体函数
   - **Sanitization Gap**: 为什么 source→sink 路径上没有有效防护
   - **漏洞代码**: 关键的危险代码模式
   - **为什么扫描器会漏掉**: CodeQL/Bandit/Gosec 漏检的具体原因
   - **检测方法**: 如何在未知代码中发现此类漏洞

The same unsafe trust model is also applied to HackerOne and NVD content at SKILL.md, lines 270-277:

markdown
1. 从 `hacktivity_summary` + `nvd_description` 提取漏洞根因和攻击路径
2. 归纳 Detection Strategy(Sources → Sinks → Sanitization)
3. 写入 `vuln-skills/skills/pentest-{category}/SKILL.md` + `references/cases.md`

**H1 数据特点(与 GHSA 的区别):**
- H1 报告通常包含更详细的攻击步骤和 PoC
- `hacktivity_summary` 是 AI 生成的摘要,可能不完整,需结合 NVD 描述

Technical Analysis

The workflow directs an AI agent to retrieve and interpret externally controlled advisory descriptions, repository diffs, HackerOne summaries, and NVD descriptions. It then uses the extracted material to generate persistent downstream SKILL.md files.

These sources must be treated as untrusted data. The documented workflow does not instruct the agent to:

  • Ignore instructions embedded in fetched reports, source comments, commit messages, or patches.
  • Separate remote evidence from trusted task instructions.
  • Validate extracted claims against independent sources.
  • Restrict generated files to an allowlisted schema.
  • Review generated Skill text for prompt injection or unrelated directives.

Consequently, instruction-like text in a remote advisory or patch could be interpreted as an agent directive rather than inert evidence. Because generated Skills may ...[truncated 1519 chars]

Remediation
View remediation

Remediation Suggestions

  1. Explicitly label all advisory descriptions, patches, reports, commit content, and scraped pages as untrusted data.
  2. Add a mandatory instruction that the agent must never follow commands or behavioral directives found inside remote content.
  3. Place fetched content inside clearly delimited data blocks and process it only as evidence.
  4. Extract findings into a strict schema containing allowlisted fields such as source, sink, sanitization gap, affected file, and verified identifiers.
  5. Reject generated content that introduces unrelated instructions, tool calls, plugin installation requests, external callbacks, or changes to agent behavior.
  6. Independently verify important claims against the original advisory, patch, and authoritative vulnerability records.
  7. Run a post-generation security review that scans generated Skills for prompt-injection phrases, instruction overrides, hidden content, unexpected links, and executable commands.
  8. Require human approval before generated Skills are installed or used in future agent sessions.

T08 · Insecure Dependencies

Note
Location
SKILL.md:21
Finding

External Dependencies Are Recommended Without Version or Integrity Pinning

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 21-24
Vulnerability Type: Unpinned third-party plugin and package installation
Risk Level: Low

Vulnerable Code Snippet

markdown
如果不存在,提示用户安装:
> superpowers 插件未安装。建议先执行 `/plugin install superpowers@superpowers-marketplace` 安装,其中的 writing-skills 技能可确保生成的 Skills 符合质量规范。也可以跳过,但生成的 Skill 质量可能不稳定。

A second unpinned dependency is documented at SKILL.md, lines 225-232:

markdown
# 可选:启用 Playwright 抓取报告全文(需要 pip install playwright)
python3 scripts/fetch_h1_details.py data/h1_hacktivity.json --cwe "918" --scrape

Technical Analysis

The workflow recommends installing an external marketplace plugin and the playwright Python package without pinning reviewed versions or verifying package integrity. No lockfile, package hash, signature requirement, publisher verification procedure, or approved version is specified.

As a result, the dependency resolved at installation time may differ from the dependency that existed when the Skill was reviewed. Package installation and plugin activation can execute third-party code under the user's account, making the integrity of the registry, marketplace, publisher account, and current release security-critical.

The installation steps are recommendations rather than automatic execution, and the artifact contains no evidence that either named dependency is malicious. The issue is therefore a supply-chain hardening weakness rather than confirmed malicious dependency behavior.

Attack Path

  1. A marketplace plugin or package publisher account is compromised, or a future release becomes malicious.
  2. A user follows the documented installation command.
  3. The unpinned dependency resolver selects the compromised or unexpectedly changed release.
  4. Installation hooks, imported package code, or plugin initialization executes third-party code.
  5. That code operates with the permissions of the user runn ...[truncated 692 chars]
Remediation
View remediation

Remediation Suggestions

  1. Pin each dependency and plugin to a specific version that has been reviewed.
  2. Use lockfiles and cryptographic hashes for Python dependencies where supported.
  3. Document the canonical registry, marketplace, package name, and verified publisher identity.
  4. Prefer signed releases and verify signatures or checksums before installation.
  5. Review dependency changes before updating pinned versions.
  6. Install third-party components in an isolated virtual environment or sandbox with minimal filesystem and credential access.
  7. Avoid exposing repository credentials, API tokens, or unrelated user files to optional scraping dependencies.
  8. Document a known-good version of Playwright and any required browser binaries rather than resolving the latest release implicitly.
Vulnerability Patterns
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (8)

Self-Modification

High
Category
Rogue Agent
Confidence
85% confidence
Finding

Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.

Content

Scanner excerpt · SKILL.md (reported line 3)May include surrounding context.

md
---
name: ghsa-skill-builder
description: "Use when building or updating vulnerability pattern Skills from multiple sources: GitHub Security Advisories (GHSA), HackerOne Hacktivity, or NVD. Triggers on keywords: GHSA, CVE, vulnerability skill, vuln pattern, update skills, security advisory, HackerOne, H1, hacktivity, pentest skill, bug bounty, check for updates."
---

# Vulnerability Pattern Skill Builder

Natural-Language Policy Violations

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The operational instructions and examples are written entirely in Chinese, indicating a fixed language expectation for using the skill. There is no indication that users may choose another language or that the Chinese-only constraint is required for a region-specific purpose, which violates the language/locale choice policy.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The frontmatter description contains very broad trigger keywords such as "GHSA", "CVE", "security advisory", and "check for updates", which can cause the skill to activate for many general security-related requests outside its narrow purpose of building or updating skills. Over-broad activation increases the chance of inappropriate invocation, unnecessary access to tooling, and unintended workflow execution in unrelated contexts.

Content

No source excerpt is available for this finding.

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
80% confidence
Finding

Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Content

Scanner excerpt · SKILL.md (reported line 20)May include surrounding context.

  1. writing-skills: 生成 Skill 时需要遵循质量规范。检查 superpowers 插件是否已安装:
bash
ls ~/.claude/plugins/cache/*/superpowers/*/skills/writing-skills/SKILL.md 2>/dev/null

如果不存在,提示用户安装:

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

Several usage examples use ambiguous phrases like "帮我更新一下漏洞 skills" and "看看有没有新漏洞", which are broad enough to match ordinary vulnerability-triage or threat-intelligence requests rather than this skill's specialized function. In an agent environment, ambiguous examples can bias routing and cause this skill to be selected when a less privileged or more appropriate workflow should handle the task.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The template text is written as mandatory instructions in Chinese, e.g. describing what each case represents and the core goal, without offering a language option or stating that the skill is intended only for a Chinese-speaking context. This can violate language/locale policy because it implicitly forces a specific language on users.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This markdown template instructs authors to provide a 'comprehensive description + trigger conditions' and 'what circumstances the Agent should load this Skill' but does not require concrete trigger phrases, scope limits, or exclusion conditions. That makes the eventual invocation guidance ambiguous and increases the risk of overly broad skill activation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The file contains instructional natural language in Chinese alongside English headings and labels, which can impose a language expectation without any stated user opt-in or locale justification. Under the language/locale policy rule, forcing or assuming a specific language without choice can be a policy concern.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.