Back to skill

Security audit

Yao Tutorial Skill

Security checks for vulnerabilities and agentic risk

Overview

The skill largely matches its tutorial-building purpose, but its export and screenshot tools can render user-controlled Markdown or SVG in ways that may make unintended network requests.

Use this skill only in a dedicated workspace and preferably with renderer network access blocked. Do not export untrusted Markdown, HTML, or SVG unless you have reviewed embedded images, CSS, and links. Expect it to create local output files and to default to Chinese-style tutorial formatting unless you override that in the task.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/export_tutorial.py:96
Finding

Untrusted document resources can trigger arbitrary outbound network requests during export and visual capture

Content
View full analysis
None: cmd = [ pandoc, str(source), "--resource-path", str(source.parent), "--embed-resources", "--standalone", "--toc", "-o", str(target), ] if title: cmd.extend(["-M", f"pagetitle={title}"]) if css: cmd.extend(["-c", str(css)]) run(cmd) postprocess_html(target, document_date) ``` The resulting HTML is then processed by WeasyPrint without a resource-fetching policy: ```python def export_pdf(browser: str, html_file: Path, pdf_file: Path) -> None: try: from weasyprint import HTML except Exception: export_pdf_with_browser(browser, html_file, pdf_file) return HTML(filename=str(html_file), base_url=str(html_file.parent)).write_pdf(str(pdf_file)) ``` The visual-capture utility also inserts arbitrary SVG contents directly into a temporary HTML document and opens it in a headless browser: ```python def capture_svg(browser: str, svg_file: Path, png_file: Path, width: int, height: int, scale: float) -> None: svg = svg_file.read_text(encoding="utf-8") html = f""" html, body {{ width: {width}px; height: {height}px; margin: 0; overflow: hidden; background: #f5f4ed; }} svg {{ display: block; width: {width}px; height: {height}px; }} ...[truncated 4278 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
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (25)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
2. Read `references/input-adaptation.md`; use user material as the spine when sufficient, then add only needed external research.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
2. Read `references/input-adaptation.md`; use user material as the spine when sufficient, then add only needed external research.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
6. Read `references/export-workflow.md`; run `export_tutorial.py` and then `validate_package.py`.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
6. Read `references/export-workflow.md`; run `export_tutorial.py` and then `validate_package.py`.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
6. Read `references/export-workflow.md`; run `export_tutorial.py` and then `validate_package.py`.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The trigger list includes a very broad request pattern: 'I will give you any topic. Research theory, practice, cases, and code examples, then create a textbook-style tutorial for beginners.' This can activate the skill for generic tutorial-generation prompts far outside a narrowly intended scope, increasing the chance the skill is invoked unexpectedly, processes untrusted inputs, or performs expansive research/output actions without sufficient gating.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The display name, short description, and default prompt are broad enough to match ordinary research, tutorial-writing, and document-export requests, which can cause the skill to activate in situations beyond a user's clear intent. Over-broad activation increases the chance of unexpected behavior, unnecessary data processing, or accidental use of skill-specific formatting and external-source handling when a generic response was expected.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The default prompt hard-codes Chinese-style chapter formatting ('第1章/1.1 headings') without indicating that this is optional, which can override user preferences and produce outputs in an unexpected format. While not a direct security exploit, it is a behavioral safety issue because the skill imposes presentation constraints that may confuse users or cause unintended disclosure of locale/style assumptions in generated documents.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The instruction requires textbook-style numbering specifically as 第1章 章节标题 for H2 and 1.1 小节标题 for H3, which imposes a Chinese locale convention in the final output. The file does not indicate that this is optional, user-selected, or limited to a region-specific workflow, so it appears to force a locale-specific format without opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill hard-codes Chinese chapter and section heading formats (## 第1章 ..., ### 1.1 ...) without any indication that this should depend on user preference, locale, or task requirements. This can override user intent, cause unauthorized language switching in generated output, and create policy/quality failures in multilingual environments where the assistant is expected to preserve the user's language.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The instruction requires visible labels to render as 第1章, which forces a specific language/locale in the output. The file does not offer user opt-in or explain that the skill is intentionally limited to Japanese-language materials, so this is a natural-language locale policy concern.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/build_reference_doc.py (reported line 93)May include surrounding context.

python
def build_reference_doc_with_pandoc(target: Path) -> None:
    data = subprocess.check_output(["pandoc", "--print-default-data-file", "reference.docx"])
    target.parent.mkdir(parents=True, exist_ok=True)
    target.write_bytes(data)
    patch_reference_docx(target)

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The generated index page sets <html lang="zh-CN">, which forces a specific language/locale in the output. The file also contains multiple fixed Chinese UI strings, but there is no user opt-in, locale selection, or comment explaining that this skill is intentionally region-specific.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/capture_visuals.py (reported line 79)May include surrounding context.

python
f"--screenshot={raw_png}",
            html_file.resolve().as_uri(),
        ]
        subprocess.run(cmd, check=True, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
        crop_png(raw_png, png_file, width, height, scale)

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/export_tutorial.py (reported line 47)May include surrounding context.

python
def run(cmd: list[str]) -> None:
    subprocess.run(cmd, check=True)


def has_weasyprint() -> bool:

Dynamic import via __import__()

Medium
Category
Dangerous Code Execution
Confidence
75% confidence
Finding

Dynamic import() can load arbitrary modules at runtime, bypassing static analysis and potentially importing malicious code.

Content

Scanner excerpt · scripts/validate_package.py (reported line 524)May include surrounding context.

python
def can_import(module: str) -> bool:
    try:
        __import__(module)
    except Exception:
        return False
    return True

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/validate_package.py (reported line 624)May include surrounding context.

python
import subprocess

    try:
        completed = subprocess.run(
            ["pdftotext", str(path), "-"],
            check=False,
            stdout=subprocess.PIPE,

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

The README explicitly states the skill may supplement user materials with official docs, papers, GitHub, and other external sources, and will also generate screenshots and multiple export files locally. Without clear disclosure of network access behavior and filesystem write effects, users may invoke the skill without understanding that it can fetch remote content or create/overwrite local artifacts, which is a real transparency and safety issue even if not directly exploitable as code execution.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

The markdown contains a Chinese-only note about the source and copyright, which imposes a specific language in part of the skill text without any user opt-in or alternate language. This is a natural-language locale policy concern because the file otherwise targets a broader audience and does not indicate that Chinese-only content is required or region-specific.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The instruction says that when target-language results are weak, the researcher should search both the target language and English. This imposes a specific language fallback in the workflow without stating that the user should opt in to English-language sourcing or cross-language retrieval.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

Lines L070-L071 prescribe different text-length limits for Chinese and English, which embeds a language-specific policy in natural-language guidance. Because the file does not explain why only these languages are supported or offer an opt-in choice for other locales, this can be read as an unjustified language/locale constraint.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

The HTML post-processing inserts the fixed string "更新日期:" into exported output, which forces Chinese-language content regardless of user preference. This is a natural-language locale constraint in a code file and no opt-in or alternative locale handling is provided nearby.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
98% confidence
Finding

The script checks for and inserts "更新日期:" and generates dates in a Chinese year-month-day format by default. Because this behavior is unconditional and not presented as a region-specific tool, it violates the requirement to avoid forcing a specific language or locale without user opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

The stylesheet hardcodes a font stack composed specifically of Simplified Chinese fonts, which can reflect a fixed locale choice in presentation. Under the policy, forcing a specific language or locale without user choice or clear justification is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

The heading font-family is restricted to Chinese serif fonts, indicating a specific locale preference embedded in the skill asset. Because no opt-in or justification is present in this file, this can violate the language/locale policy requirement.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.