Back to skill

Security audit

文档可视化

Security checks for vulnerabilities and agentic risk

Overview

This skill has a coherent document-to-dashboard purpose, but it renders untrusted document content as active HTML in Playwright with unclear activation boundaries.

Install only if you control or trust the documents being processed, and prefer running it in an isolated environment with no sensitive network access. The publisher should escape all document content before HTML generation, disable JavaScript or block outbound requests in Playwright, narrow auto-trigger rules, and pin dependencies before broad enterprise use.

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

Error
Location
generator/html_generator.py:571
Finding

Untrusted document content is rendered as active HTML and executed by Playwright

Content
View full analysis
str: headers = data.get("headers", []) rows = data.get("rows", []) hdr_html = "".join(f"{h}" for h in headers) rows_html = "".join("" + "".join(f"{c}" for c in row) + "\n" for row in rows) return f'
\n{hdr_html}{rows_html}\n
\n' ``` The generated document also interpolates an unescaped title: ```python return f""" {title} :root {{ {css_vars} }} {STYLE}
{header_html} {sections_html} {footer_html}
""" ``` The resulting attacker-influenced file is then loaded with JavaScript enabled: ```python html_abs = os.path.abspath(html_path) html_url = f"file:///{html_abs.replace(chr(92), '/')}" with sync_playwright() as p: b = p.chromium.launch(headless=True) page = b.new_page(viewport={"width": 1280, "height": 900}) page.goto(html_url, wait_until="networkidle") ``` ### Technical Analysis Document and spreadsheet values are treated as trusted markup. For example, CSV, Excel, Word, and PDF-derived table cells flow into `build_table()`, where they are concatenated directly into `` and `` elements without HTML escaping. The same unsafe interpolation pattern exists in other rendering helpers, including header, timeline, comparison, SWOT, four-dimensional analysis, source statistics, interview, and section-header rendering. Some values are also inserted into HTML attributes without a ...[truncated 2511 chars]
Remediation
View remediation
str: return escape(str(value if value is not None else ""), quote=True) hdr_html = "".join(f"{text(h)}" for h in headers) rows_html = "".join( "" + "".join(f"{text(c)}" for c in row) + "\n" for row in rows ) ``` 3. Apply the same protection to all renderer functions, especially: - `generate_html()` - `build_header()` - `build_sections()` - `build_timeline()` - `build_compare()` - `build_swot()` - `build_four_dim()` - `build_source_stats()` - `build_interview()` 4. Add defense in depth to the exporter: - Create the browser context with JavaScript disabled if the dashboard does not require scripts. - Intercept and abort all non-`file` or nonessential requests. - Run Chromium in a sandboxed, low-privilege container with no credentials or sensitive mounted files. - Impose navigation, rendering, file-size, page-count, and execution time limits. 5. Add a restrictive Content Security Policy, for example one that denies scripts, network connections, frames, objects, and remote resources: ```html ``` 6. Add regression tests using payloads in every supported format and every rendered field. Tests should verify that payloads appear as literal text and that the exporter makes no external or internal netwo ...[truncated 18 chars]

T08 · Insecure Dependencies

Note
Location
SKILL.md:109
Finding

Third-party installation instructions use mutable, unpinned dependencies

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • 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
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (11)

Vague Triggers

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The trigger condition "任何包含数据的内容文本" is so broad that ordinary chat messages may invoke the skill unintentionally, causing document parsing and export actions on content the user did not mean to process. In this skill, accidental activation is more dangerous because it can read message content, analyze attachments or links, and generate persisted output files automatically.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill description says it can automatically process Feishu document links, attachments, and arbitrary text, but it does not warn users that their content will be read and analyzed. This is a privacy and transparency issue, especially in enterprise chat contexts where documents and attachments may contain confidential or regulated information.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The auto-trigger description does not define clear boundaries for when the skill should and should not run, which creates ambiguity that can lead to unintended execution. Because the skill performs multi-step processing and file generation, unclear activation behavior increases the chance of over-collection and accidental handling of sensitive data.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill explicitly writes HTML, PDF, and image outputs to a local workspace directory, but the description does not warn users that processed document content will be persisted on disk. Persisting transformed copies of potentially sensitive documents increases exposure through residual files, later unauthorized access, or accidental sharing of generated artifacts.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This code presents its primary description and later CLI prompts entirely in Chinese, which effectively forces a specific language for users. The file does not provide any opt-in, fallback, or justification for this locale constraint, which matches the language-policy violation criteria.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The function loads attacker-controlled HTML in a full browser via Playwright using page.goto(..., wait_until="networkidle"), which can trigger external network requests from scripts, images, fonts, or iframes embedded in the HTML. It also writes PDF and screenshot outputs to caller-supplied paths without any disclosure, restriction, or validation, creating SSRF/privacy leakage risk and unsafe file-write behavior if untrusted inputs are allowed.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The generated document sets lang="zh-CN", and the surrounding UI strings throughout the file are Chinese-only, which forces a specific language/locale in the skill output. The file does not offer any user opt-in or configuration for alternative languages, nor does it document a region-specific requirement that would justify the constraint.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The function is named parse_freshdesk_doc, but its docstring says 解析飞书文档 and it imports feishu_fetch_doc to fetch a Feishu document. This is an active contradiction in the code documentation/naming that can mislead maintainers about the integration target.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
98% confidence
Finding

The inline comment says 实际上用subprocess调用更稳定,这里简化, indicating subprocess-based execution, but the actual code performs a direct import and function call via fetch_doc(doc_id). This contradicts the stated implementation approach rather than merely omitting detail.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

The natural-language strings and documentation are entirely in Chinese, with no indication that the skill supports other languages or that Chinese is a justified requirement for a region-specific tool. Under the policy, forcing a specific language without user opt-in can be a locale policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

This CSS file contains natural-language comments entirely in Chinese (for example, theme labels at L002, L031, L060, L089, and L118). Under the policy, forcing a specific language without user opt-in or a documented justification can be a locale-policy violation, and no such opt-in or justification is present in this file.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.