Back to skill

Security audit

Markdown → PDF Report

Security checks for vulnerabilities and agentic risk

Overview

This skill mostly does Markdown-to-PDF conversion as advertised, but it needs review because it can automatically send generated reports to chat platforms and includes unrelated personal template instructions.

Review before installing. Use it only for Markdown you trust, confirm the exact chat or platform before sending attachments, avoid target="all" unless explicitly intended, and consider pinning dependencies or running conversion in an isolated environment. Remove or ignore the Jialin/Helen template requirements unless they match your own workflow.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (3)

T01 · Skill Instruction Hijacking

Error
Location
templates/research-digest.md:81
Finding

Hard-Coded Third-Party Identity and Memory-Derived Instructions

Content
View full analysis
**This section is mandatory.** Do not merely list the original proposal's advantages. Examine: 1. **Implicit assumptions** 2. **Unverified claims** 3. **Applicability boundaries** 4. **Ignored counterexamples** 5. **What the original author got right** Provide at least three specific counterexamples. ``` ```markdown - [ ] Source links follow Jialin's preferred `` format **Jialin research-task mandatory format requirements (from memory):** - All answers must include information-source links - Use titled hyperlinks in the `` format - Every information point must have at least one supporting source ``` The template also contains a fixed attribution: ```markdown > **Digested by:** Helen | **Digest date:** YYYY-MM-DD ``` ### Technical Analysis The reusable Skill embeds instructions associated with named third parties, including a purported preference originating from persistent memory. These requirements are presented as mandatory and apply broadly to generated answers rather than being conditional on the current user's request. When an Agent loads this Skill, the embedded rules can alter the current session's output goals by forcing: - Attribution to a fixed identity. - Formatting associated with a different user. - Mandatory report sections not requested by the current user. - Global sourcing requirements stated as applying to all answers. This behavior matches Skill instruction hijacking because the Skill text changes Age ...[truncated 1309 chars]
Remediation
View remediation
**Prepared by:** <author or system name> ``` 4. Change global requirements such as “all answers must” into optional template guidance. 5. Apply special formatting only when explicitly requested by the current user. 6. State that current user and system instructions take precedence over template guidance. 7. Separate presentation examples from executable Agent instructions. 8. Add tests confirming that loading the Skill does not introduce identity, attribution, or preferences absent from the current request. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
md2pdf.py:265
Finding

Unrestricted External and Local Resource Resolution During PDF Rendering

Content
View full analysis
str: """Convert Markdown text to a full HTML document with embedded CSS.""" import markdown md = markdown.Markdown(extensions=[ 'extra', # tables, fenced code, footnotes, abbr, def_list 'sane_lists', # better list handling 'toc', # TOC support 'meta', # metadata support ]) body_html = md.convert(md_text) css_str = css or DEFAULT_CSS return f""" {title} {css_str} {body_html} """ ``` ```python def html_to_pdf(html: str, pdf_path: str): """Render HTML to PDF using weasyprint.""" from weasyprint import HTML HTML(string=html).write_pdf(pdf_path) ``` ```python md_text = md_path.read_text(encoding='utf-8') title = md_path.stem html = md_to_html(md_text, css=css, title=title) html_to_pdf(html, str(pdf_path)) ``` ### Technical Analysis The `extra` Markdown extension permits raw HTML to remain in the generated document. The resulting HTML is passed directly to WeasyPrint without a restrictive `url_fetcher`, URL-scheme allowlist, private-network filter, or local-file access policy. An untrusted Markdown document can therefore include resource references such as: ```html ``` CSS supplied through the public Python API can likewise contain external `url(...)` references. During PDF generation, WeasyPrint may resolve supported resources from remote HTTP endpoints or abso ...[truncated 1603 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
README.md:77
Finding

Unpinned and Mutable Third-Party Dependency Installation

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (26)

Vague Triggers

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill advertises very broad trigger phrases and says it fires automatically on general natural-language intent, which can cause accidental invocation on unrelated conversations or sensitive documents. In an agent setting, overbroad activation can lead to unintentional file generation and downstream sharing of content without sufficiently explicit user consent at the moment of action.

Content

No source excerpt is available for this finding.

Vague Triggers

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The trigger list includes broad phrases such as '调研报告', '给我 PDF', and 'PDF 版本', which are common in unrelated workflows. Overbroad activation can cause this skill to run in situations where users did not intend shell execution, file creation, package installation guidance, or external message delivery, creating an opportunity for unintended actions and data handling.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The README states that generated Markdown and PDFs are auto-delivered to chat, but it does not prominently warn that report contents will be transmitted as attachments. For research, fact-checking, or proposal documents, this may include sensitive or private material, so silent transmission creates a meaningful confidentiality risk.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
88% confidence
Finding

The README describes the agent 'automatically' sending generated files, which is autonomous external action on potentially sensitive user content. Even if the action is convenient and expected in many cases, removing an explicit confirmation step increases the chance of unintended disclosure or sharing across devices/accounts.

Content

Scanner excerpt · README.md (reported line 139)May include surrounding context.

  • Page footer with 1 / 3 pagination
  • Native Chinese rendering (no boxes)

Delivery — your agent automatically sends:

text
✅ PDF:  MEDIA:/path/to/report.pdf

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The trigger phrases are broad and overlap with common conversation such as '输出 PDF', '导出 PDF', and '给我个 PDF 版本'. In an agent environment, overly generic triggers can cause unintended activation, leading the skill to process files or generate/send artifacts when the user did not intend to invoke this specific skill.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding

The skill documents use of shell, file read/write, environment-variable manipulation, and package installation, but it does not declare any tool scope or allowed-tools boundary. That makes the skill harder to constrain and audit, and an agent may invoke broader capabilities than users expect when the skill triggers.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The usage criteria include vague conditions like long-form analytical content or reports the user may 'often use later,' which do not clearly bound when the skill should activate. Ambiguous scope increases the chance of accidental invocation and unintended access to file, shell, or delivery capabilities outside the user’s actual request.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill’s stated purpose is Markdown-to-PDF conversion, but the documentation expands behavior into sending generated files over Feishu, Telegram, Discord, and even fan-out to all platforms. This is a scope expansion into external communications, which can cause unintended data exfiltration if sensitive report content is auto-delivered beyond the local environment.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

Cross-platform delivery is not necessary to convert Markdown into a PDF, yet the skill recommends send_message targets for multiple external services. Unnecessary communication capability increases the blast radius of mistakes or abuse by allowing documents to be transmitted to unintended destinations.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The validation checklist requires '链接可点击(导出后 hover 试一下)' as a standard post-generation check. But earlier documentation states that the default weasyprint path does not produce clickable PDF link annotations and requires separate pikepdf post-processing, so the checklist overstates what the default implementation guarantees.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This markdown file presents all substantive instructions and analysis in Chinese, but does not indicate that the user opted into that language or that the skill is intended only for a Chinese-language audience. Under the language/locale policy, forcing a specific language without user opt-in is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The HTML template forces lang="zh-CN" for all generated documents, which is a locale policy concern because it imposes a specific language/locale regardless of the input content or user preference. The file does not offer an option to choose locale or explain that the tool is intentionally limited to a Chinese-language context.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

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

On Linux (Debian/Ubuntu):

bash
sudo apt install libpango-1.0-0 libpangoft2-1.0-0

No env var needed — libraries are in standard paths.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · references/weasyprint-bootstrap.md (reported line 80)May include surrounding context.

On Linux (Debian/Ubuntu):

bash
sudo apt install libpango-1.0-0 libpangoft2-1.0-0

No env var needed — libraries are in standard paths.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

This markdown template is written as a fixed Chinese-language reporting format, including the 'Best for' description and section headings, with no indication that users may choose another language. That creates a natural-language policy concern because it implicitly enforces a specific language/locale without user opt-in or a documented region-specific justification.

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 explicitly requires a '结构化中文摘要', which imposes a specific language on outputs. This is a natural-language locale policy issue because the file does not offer the user any language choice or explain 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
97% confidence
Finding

This markdown template is written almost entirely in Chinese and presents Chinese-only section headings and instructional text, which imposes a specific language/locale by default. The file does not offer an alternative language option or explain a justified region-specific requirement, so it conflicts with the policy against forcing a language without user opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

This markdown file contains substantial user-facing content in Chinese, including headings, body text, lists, and notes, but does not indicate that the language is optional or user-selected. Per the policy, forcing a specific language without user opt-in is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
79% confidence
Finding

This skill is described as converting Markdown into styled PDFs, but merely importing the module automatically changes an environment variable and attempts to preload multiple native libraries with ctypes on macOS. While related to getting WeasyPrint working, this is still a broader process-level capability than a typical document converter needs and is not disclosed in the manifest description.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

This code file mutates the process environment during module import by calling bootstrap_macos(), which may affect runtime behavior outside an explicit function call. Although the module docstring mentions the helper and auto-bootstrap behavior, the import-time side effect itself has no runtime disclosure such as a log or prompt, making the behavior easy to miss for users who only import the module.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

The document frames the comparison specifically around generating Chinese-language PDFs on macOS, and the rest of the guidance consistently assumes Chinese output. Because no user choice or opt-in is mentioned, this can be read as a locale/language constraint embedded in the skill guidance.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

This markdown file instructs the user to run package installation commands and later demonstrates writing a PDF to /tmp, both of which affect the local system. The document presents these actions as routine setup steps but does not include any explicit warning that they modify the machine or create files.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
72% confidence
Finding

These instructions are written as hard requirements for the task format within a Chinese-language template context, reinforcing a fixed-language workflow without offering localization choice. While source-format requirements themselves are fine, the surrounding natural-language constraints continue to enforce a single language/locale experience.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.