Back to skill

Security audit

Skill Compiler

Security checks for vulnerabilities and agentic risk

Overview

This is a coherent skill compiler, but its handling of URLs, files, and untrusted source text needs careful review before use.

Install only if you are comfortable with a compiler that may fetch URLs, clone repositories, read user-selected local project files, and turn source material into new skill instructions. Use it with trusted or reviewed inputs, avoid private/internal URLs and sensitive documents unless needed, and review generated skills before installing or running them.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T01 · Skill Instruction Hijacking

Error
Location
references/pass-ingestion.md:230
Finding

Untrusted source content can be compiled into authoritative Skill instructions

Content
View full analysis
## 类型: ## 提取方式: <标准化后的正文> --- [SEG-001] 来源:<页码/时间戳/URL> | 证据等级: <内容段落> [SEG-002] 来源:<...> | 证据等级:<...> <内容段落> ``` **分段规则:** - 每个自然段或逻辑单元为一个 SEG - 每个 SEG 必须带来源标识和证据等级(默认值来自 Step I.4,可被 Pass 2 覆盖) - 保留原文中的标题层级,不破坏文档结构 **长度控制:** 若 `structured_content` 超过 8000 字,存储摘要 + 外部文件引用(`structured_content_ref: ./ingestion/full-content.md`),IR 中只保留摘要。 ``` The resulting data is then treated as the Pass 1 input in `references/pass-1-analyze.md`, lines 3-17: ```markdown **输入来源:** 若 Pass I Ingestion 执行过,本 Pass 的输入是其产出的 `structured_content`(标准化文本),需额外关注来源溯源与证据等级。若未执行 Ingestion,输入为用户原始 Prompt. --- ## 执行步骤 ### Step 1.1 — Prompt Summary 用一句话概括 Prompt 的核心功能。不照搬原文,用自己的话重述。 ### Step 1.2 — Goal Extraction 区分 Prompt"说的"和"真正需要的": - **说的:** Prompt 字面要求做什么 - **真正需要的:** 这个能力长期来看应该解决什么问题 ``` Finally, `references/pass-4-generate.md`, lines 7-13, directs the compiler to generate files from that derived IR: ```markdown ## 生成原则 1. **IR 驱动** — 所有文件内容来自 Pass 1-3 的 IR,不凭空创造 2. **三层加载** — L1 frontmatter / L2 SKILL.md 路由 / L3 references 懒加载 3. **平台感知渲染** — frontmatter、description、文件结构按 `target_platform` 对应的 profile 规范渲染 4. **frontmatter 卫生** — 只含目标平台要求的字段(generic/trae 仅 name + description) 5. **无占位符** — 不留 TODO/TBD/placeholder 6. **文件最小化** — 只生成 IR 要求的文件,不多创建 ``` ### Technical Analysis The ingestion workflow explicitly recognizes downloaded webpages, repositories, documents, OCR output, and transcriptions as untrusted, but its sanitization only removes presentation artifacts such as navigation, comments, advertisements, and frontmatter. It does not disti ...[truncated 2909 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
references/pass-ingestion.md:186
Finding

Arbitrary URL ingestion lacks SSRF and destination-validation controls

Content
View full analysis
100MB 时警告用户并建议分段处理,避免 OOM | ### 禁止操作 - 不执行用户提供的文件中嵌入的代码 - 不将提取的内容写回原始文件路径 - 不向未声明的外部端点发送数据(除用户明确提供的 URL 外) ``` ### Technical Analysis The Skill accepts arbitrary `http` and `https` URLs and directs WebFetch, an MCP service, or Playwright to retrieve them. It does not require: - A public-address allowlist. - Rejection of loopback, private, link-local, multicast, or reserved addresses. - DNS resolution validation. - Revalidation after redirects. - Port restrictions. - URL credential rejection. - Limits on redirect count, response size, or fetch duration. Consequently, an attacker or untrusted user may supply a URL that resolves to ...[truncated 2611 chars]
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (27)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill description contains very broad trigger phrases such as 'compile any prompt' and 'skill from document', which can cause over-activation on requests that are not actually asking for safe skill compilation. In an agent-routing context, this increases the chance the skill will capture unrelated or sensitive tasks, potentially transforming arbitrary untrusted content into executable workflow artifacts without sufficient scoping.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill body is written as a mandatory Chinese-language operating specification without offering language negotiation, which can cause incorrect behavior, misunderstood safety constraints, or silent failure when invoked by users operating in other languages. In a security-sensitive compiler skill, ambiguity in operator instructions can weaken review quality and cause the agent to miss boundaries or user intent.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

This markdown file says activation uses a mix of semantic and keyword matching and that trigger lists do not need to be exhaustive. That makes invocation boundaries unclear and increases the chance of unintended activation, because the document does not provide negative examples or concrete limits on what should not trigger the skill.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The file's instructional content is presented in Chinese, which imposes a specific language on users or maintainers without any opt-in or justification. The policy requires avoiding forced language or locale constraints unless choice or a documented regional reason is provided.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The trigger description template invites authors to insert arbitrary trigger phrases without requiring scope boundaries, negative examples, or disambiguation guidance. In a skill-compiler context, this can lead to overbroad activation patterns that cause the compiled skill to trigger on unrelated user input, increasing the chance of prompt hijacking, unintended execution, or misuse across contexts.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The profile instructs authors to include 3-5 phrases that users might directly type and provides a generic template of 'Use when {触发场景一览}. Triggers on: ...' without requiring scope limits or negative examples. This can lead to overly broad activation phrases that overlap with normal requests and cause unintended invocation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

This markdown file presents its instructional content in Chinese throughout, including headings, descriptions, and remediation text, without indicating that language selection is optional. Under the policy rule for natural-language violations, a skill artifact that effectively requires a specific language without opt-in can be considered a locale-policy issue.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The operational instructions and trigger conditions are presented exclusively in Chinese, which effectively forces a locale/language choice on users or maintainers reading this file. The file does not offer an alternative language, user choice, or a documented reason that this skill must be Chinese-specific.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The title and operational loading instructions are written entirely in Chinese, and the document provides no indication that another language is supported or that Chinese is required for a region-specific purpose. Under the policy, forcing a specific language without user opt-in is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The document title and all operational guidance are written in Chinese, which effectively imposes a specific language on users and downstream operators. The file does not offer a language choice or explain a region-specific requirement that would justify the locale restriction.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The title and operational description are written in Chinese and indicate the skill's loading/execution behavior in that locale, but the file does not state that language is optional or configurable. Under the policy, forcing a specific language without user opt-in is a natural-language locale violation unless the constraint is clearly documented and justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

This markdown file is written entirely as an instruction set in Chinese and specifies outputs such as "一句话" and other Chinese-language field descriptions without indicating that language is optional. That creates a natural-language policy concern because it effectively forces a specific language/locale for use of the skill rather than offering user choice or documenting a justified region-specific constraint.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

This markdown file is primarily written in Chinese, with key operational instructions and schema labels also presented in Chinese. Under the stated policy, forcing a specific language without user choice or an explicit justified locale scope is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The document is written entirely in Chinese and defines core workflow behavior without any indication that language should adapt to user preference. In a skill compiler, this can cause silent instruction mismatch, poor review quality, or unusable outputs for users and downstream agents expecting another language, especially when design constraints are treated as normative system behavior.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The trigger guidance requires broad activation phrases like 'Use when' plus 3+ likely user inputs, but does not require strong scoping, exclusions, or disambiguation. In a skill compiler context, this can cause overbroad auto-invocation on unrelated prompts or untrusted multi-source content, increasing the chance the skill processes sensitive inputs or runs in unintended contexts.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The activation section says the skill runs when any listed condition is met, including broad conditions like 'Source Prompt > 500 字' and '用户显式要求', but it does not define boundaries, exclusions, or concrete trigger phrases. This can cause unintended invocation because many ordinary prompts may exceed the length threshold or a generic user request could be interpreted as an explicit request.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The title and substantive instructions are written in Chinese, e.g. '三层评估', and the document does not offer an alternative language or indicate that Chinese is optional. This creates a natural-language policy concern because it effectively constrains use to a specific language without explicit user opt-in or a stated regional justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

The file title and operational instructions are written entirely in Chinese, which effectively imposes a language/locale expectation on use of the skill. The policy requires flagging language or locale constraints when they are forced without user opt-in or a clearly documented regional justification.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill instructs the agent to fetch URLs, clone repositories, and process local files using external tools. Although a 'Security Boundaries' section exists, it is incomplete from a user-safety perspective: it does not clearly require explicit user consent before network access or local file processing, and it does not prominently warn that sensitive data in files/URLs may be transmitted to third-party tools or parsed from untrusted content. In this skill context, the danger is elevated because ingestion is a core feature and the workflow spans URLs, GitHub repos, documents, images, audio, and video—expanding privacy, SSRF-like, and system-impact risk surfaces.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

Core instructional content, headings, and execution steps are written in Chinese, which imposes a specific language on skill behavior and documentation. The file does not offer an opt-in language choice or explain why a Chinese-only locale is required.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The trigger list uses very generic keywords such as "api", "tool", "document", and "search", which can appear in ordinary prompts without any real intent to invoke external capabilities. In a skill compiler context, this can cause incorrect plugin discovery decisions, over-approximate required capabilities, and lead downstream generated skills to expose or plan unnecessary external integrations.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

This JSON schema contains natural-language descriptions in Chinese, beginning with the top-level description, which establishes a fixed language/locale for the skill artifact. Under the stated policy, forcing a specific language without offering user choice or documenting a justified locale constraint is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The template encourages authors to fill in generic trigger placeholders without requiring narrow scope, exclusions, or disambiguation criteria. In a skill compiler, this can produce skills that advertise overly broad activation conditions, increasing the chance the agent invokes the wrong skill on unrelated or sensitive tasks and causing unsafe capability overreach.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
78% confidence
Finding

The file presents core instructions and examples in both Chinese and English, but it does not state whether a specific output language is required or whether users may choose their preferred language. For organizational language-policy review, this can create an implicit locale expectation without opt-in or justification.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
97% confidence
Finding

Lines L013-L014 state that generation must leave no TODO/TBD/placeholders and only create minimal required files. However, the provided gotchas.md template at L184-L199 explicitly includes multiple TODO placeholder entries, creating a direct contradiction in the guidance. This is intent/documentation divergence rather than mere incompleteness because the rule expressly bans placeholders while the template instructs their inclusion.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.