Back to skill

Security audit

briefing-visualizer简报转手机长图

Security checks for vulnerabilities and agentic risk

Overview

The skill appears to generate briefing images as described, but it needs Review because its local renderer opens user-supplied HTML in Chrome with the browser sandbox disabled.

Review this before installing if you may process HTML from scraped or third-party sources. Prefer trusted or sanitized HTML, consider removing --no-sandbox or running the renderer in a hardened container, and verify that briefing content and banner assets are accurate and authorized before sharing publicly.

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
process_briefing.py:45
Finding

Chrome Sandbox Disabled While Rendering Input HTML

Content
View full analysis

Vulnerability Details

File Location: process_briefing.py, lines 45–52
Vulnerability Type: Unsafe browser security configuration
Risk Level: Medium

Vulnerable Code

python
cmd = [
    chrome,
    "--headless", "--disable-gpu", "--no-sandbox",
    "--hide-scrollbars",
    "--screenshot=" + output_path,
    f"--window-size={SCREENSHOT_W},{SCREENSHOT_H}",
    f"--virtual-time-budget={VIRTUAL_TIME}",
    "file://" + os.path.abspath(html_path),
]

Technical Analysis

The script launches headless Chrome with the --no-sandbox option when rendering the supplied HTML file. This disables Chrome's operating-system-level process isolation and substantially weakens containment of the renderer.

The script accepts the HTML path as a command-line argument and does not validate or sanitize the document before opening it. HTML can contain active content and references to external resources. An attacker who can provide or influence the rendered document could therefore expose the browser to malicious markup, scripts, fonts, images, or remote content.

Malicious HTML alone does not automatically provide host code execution; successful host compromise would generally require a compatible Chrome vulnerability. However, if such a renderer or browser exploit succeeds, disabling the sandbox removes an important defense-in-depth boundary and can allow the exploit to operate with the privileges of the account running this skill.

The command is constructed as an argument list and executed without a shell, so the reviewed code does not expose shell command injection through these arguments.

Attack Path

  1. An attacker supplies or influences the briefing HTML processed by the skill.
  2. The HTML embeds malicious active content or loads a crafted browser resource.
  3. The script opens the document in headless Chrome with --no-sandbox.
  4. The content exploits a compatible vulnerability in the installed Chrome version.
  5. Because Chrome's sandbox is dis ...[truncated 710 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove --no-sandbox and run Chrome with its standard sandbox enabled:
python
cmd = [
    chrome,
    "--headless",
    "--disable-gpu",
    "--hide-scrollbars",
    "--screenshot=" + output_path,
    f"--window-size={SCREENSHOT_W},{SCREENSHOT_H}",
    f"--virtual-time-budget={VIRTUAL_TIME}",
    "file://" + os.path.abspath(html_path),
]
  1. Run the renderer as a dedicated, unprivileged operating-system account with no access to credentials or unrelated user files.
  2. Execute rendering inside a hardened container or equivalent isolation boundary with a read-only filesystem, a restricted writable directory, dropped Linux capabilities, memory and CPU limits, and no host namespace sharing.
  3. Sanitize or validate HTML before rendering. Reject scripts, event-handler attributes, embedded frames, plugins, and resource URLs that are not required by the template.
  4. Disable JavaScript when the briefing template does not require it, and restrict network access so a local document cannot retrieve attacker-controlled remote resources.
  5. Keep Chrome patched and use a supported release to reduce exposure to known renderer vulnerabilities.
  6. Restrict accepted input paths to intended files and canonicalize them before use. Store generated screenshots in a private, per-run temporary directory to reduce interference between concurrent or untrusted runs.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (8)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill instructs the operator to run a local shell command (python3 process_briefing.py ...) and references a core processing script, but the manifest does not declare any tool scope or allowed tools. This creates a capability mismatch: an agent or reviewer cannot accurately assess or constrain shell execution, increasing the risk of unintended command execution or abuse if the referenced script or arguments are influenced by untrusted input.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The description and user-facing guidance are presented entirely in Chinese, which effectively forces a specific language for interaction and usage. Under the policy, language constraints should either offer user choice or be clearly documented as a justified locale-specific limitation.

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 · process_briefing.py (reported line 51)May include surrounding context.

python
f"--virtual-time-budget={VIRTUAL_TIME}",
        "file://" + os.path.abspath(html_path),
    ]
    result = subprocess.run(cmd, capture_output=True, text=True, timeout=30)
    ok = os.path.exists(output_path)
    print(f"  Chrome exit={result.returncode}, file_exists={ok}")
    return ok

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The file is entirely written for a Chinese-language output format and the embedded HTML explicitly sets lang="zh-CN", which indicates the skill is constrained to a specific language/locale. The document does not offer a user opt-in or alternative locale, nor does it explain that this is a region-specific or compliance-driven requirement.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The publishing guide explicitly promotes 'AI-assisted scraping' of briefing content but does not mention data ownership, source terms of service, consent, privacy boundaries, or handling of sensitive third-party information. In a skill designed to transform and redistribute content, this omission can lead users to collect or process proprietary, personal, or restricted data without adequate review or permission.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

The module docstring, usage text, and examples are presented only in Chinese, which imposes a specific language on users. Under the policy, language constraints should either provide user choice or be clearly documented as a justified locale-specific requirement.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
61% confidence
Finding

SQP-3 applies to natural-language policy issues in any file, including markdown. The guide is entirely in Chinese and presents all usage and publishing text in that locale without indicating whether language selection is optional or region-specific; if this skill is intended for a broader audience, that can be a locale-policy concern.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
76% confidence
Finding

The document markets a one-command flow from text briefing to polished mobile image for WeChat, Moments, and Xiaohongshu distribution, but does not warn users to verify accuracy, rights, branding, and compliance before publication. This increases the risk of rapid dissemination of misleading, unauthorized, or sensitive content because the automation is optimized for immediate sharing.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.