Back to skill

Security audit

Typora 主题工程 · Lite(hekouwang)

Security checks for vulnerabilities and agentic risk

Overview

ClawScan rates this skill benign with medium confidence: the findings are judged consistent with a Typora theme and its supporting tools, though some references were unavailable to the scanner.

The verdict is benign, but confidence is medium and the scan was partial: several local references, including pack and unlock scripts, were unavailable for resolution. Before installing, consider whether you are comfortable running the included installer, which may overwrite theme files and remove legacy CSS files.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (10)

Direct Prompt Extraction

High
Category
System Prompt Leakage
Confidence
85% confidence
Finding

Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Content

Scanner excerpt · scripts/contrast_check.py (reported line 126)May include surrounding context.

python
declarations[key.strip()] = value.strip()
        for selector in match.group(1).split(","):
            rules.setdefault(selector.strip(), {}).update(declarations)
    return rules


def expand_vars(value: str, variables: dict[str, str]) -> str:

Direct Prompt Extraction

High
Category
System Prompt Leakage
Confidence
85% confidence
Finding

Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Content

Scanner excerpt · scripts/contrast_check.py (reported line 179)May include surrounding context.

python
def prop(selector: str, key: str) -> str:
        try:
            return rules[selector][key]
        except KeyError as exc:
            raise ValueError(f"{label}: missing {selector} {{{key}}} for contrast audit") from exc

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
95% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · scripts/install.sh (reported line 92)May include surrounding context.

sh
for variant in "${LEGACY_REMOVE[@]}"; do
  if [ -f "$THEME_DIR/$variant.css" ]; then
    rm -f "$THEME_DIR/$variant.css" 2>/dev/null \
      && ok "removed legacy $variant.css from Themes menu" \
      || warn "could not remove legacy $variant.css"
  fi

Direct Prompt Extraction

High
Category
System Prompt Leakage
Confidence
85% confidence
Finding

Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Content

Scanner excerpt · scripts/verify_export_pdf.py (reported line 4)May include surrounding context.

python
#!/usr/bin/env python3
"""Exercise generated export CSS in A4/A5 PDF fixtures.

This uses the Typora 1.14 print rules relevant to code fences and macOS
tables, then loads a generated theme. Chrome PDF verifies full text, table
pagination, custom margins, and CSS page headers/footers. Typora's native
export dialog still needs a manual check.

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/verify_export_pdf.py (reported line 58)May include surrounding context.

python
f"--print-to-pdf={pdf_path}", "--no-pdf-header-footer",
        html_path.as_uri(),
    ]
    result = subprocess.run(command, capture_output=True, text=True, timeout=90)
    if result.returncode or not pdf_path.is_file():
        raise RuntimeError(f"Chrome PDF failed: {result.stderr[-800:]}")

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/verify_export_pdf.py (reported line 64)May include surrounding context.

python
def pdf_text(pdf_path: Path) -> list[str]:
    result = subprocess.run(
        ["pdftotext", "-layout", str(pdf_path), "-"],
        capture_output=True, text=True, check=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/verify_export_pdf.py (reported line 72)May include surrounding context.

python
def paper_size(pdf_path: Path) -> tuple[float, float]:
    info = subprocess.run(
        ["pdfinfo", str(pdf_path)], capture_output=True, text=True, check=True,
    ).stdout
    match = re.search(r"^Page size:\s*([\d.]+) x ([\d.]+) pts", info, re.M)

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/verify_export_pdf.py (reported line 82)May include surrounding context.

python
def first_heading_position(pdf_path: Path, title: str) -> tuple[float, float]:
    xml = subprocess.run(
        ["pdftotext", "-bbox", str(pdf_path), "-"],
        capture_output=True, text=True, check=True,
    ).stdout

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/verify_layout.py (reported line 245)May include surrounding context.

python
widest = max(max(500, width * scale) for _k, width, _e, scale in jobs)
        with tempfile.TemporaryDirectory(prefix="typora-layout-profile-") as profile:
            result = subprocess.run(
                [chrome, "--headless", "--disable-gpu", "--incognito",
                 "--allow-file-access-from-files", f"--user-data-dir={profile}",
                 "--virtual-time-budget=10000",

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/verify_render.py (reported line 128)May include surrounding context.

python
else:
        args += ["--dump-dom"]
    args.append("file://" + html_path)
    r = subprocess.run(args, capture_output=True, text=True, timeout=90)
    shutil.rmtree(tmp, ignore_errors=True)
    return r.stdout