Back to skill

Security audit

Financial Report Render Claw

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly does what it claims, but it needs review because untrusted report content can be written into HTML/PDF output and can trigger arbitrary resource loads.

Review before installing if you expect to render configs from third parties or shared sources. Use trusted report JSON and local chart assets only, sanitize report text and image paths before rendering, and do not rely on the advertised PPT/dashboard capabilities unless they are added later.

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/report_renderer.py:237
Finding

Unescaped Report Data Enables Stored HTML Injection and Unrestricted Resource References

Content
View full analysis
{{ section.title }} {% if section.caption %}
{{ section.caption }}
{% endif %} {% endif %} {% if section.analysis %}
{{ section.analysis }}
{% endif %} ... {% elif section.type == 'text' %}
{{ section.content | safe }}
``` ```python def render_html(config, output, theme="professional"): """Render an HTML report.""" env = jinja2.Environment( loader=jinja2.DictLoader({"report.html": HTML_TEMPLATE}), autoescape=False, ) env.filters["status_class"] = status_class env.filters["risk_class"] = risk_class env.filters["pct_class"] = pct_class template = env.get_template("report.html") html = template.render(config=config) output_path = Path(output) output_path.parent.mkdir(parents=True, exist_ok=True) output_path.write_text(html, encoding="utf-8") ``` ```python env = jinja2.Environment( loader=jinja2.DictLoader({"report.html": HTML_TEMPLATE}), autoescape=False, ) env.filters["status_class"] = status_class env.filters["risk_class"] = risk_class env.filters["pct_class"] = pct_class template = env.get_template("report.html") html = template.render(config=config) output_path = Path(output) output_path.parent.mkdir(parents=True, exist_ok=True) HTML(string=html).write_pdf(str(output_path)) ``` ### Technical Analysis The renderer treats data loaded from the report configuration as trusted markup. Jinja autoescaping is disabled globally for both HTML and PDF rendering, and the `text` section explicitly applies the `sa ...[truncated 2984 chars]
Remediation
View remediation
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (12)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

声明描述的是一个报告渲染/导出类技能,核心价值在于直接交付正式报告文件,并涵盖多种文档格式和排版整理能力。实际代码仅提供图表图片生成功能,输入为 CSV,输出为图像文件,未见任何报告拼装、文档模板渲染、PDF/Word/PPT/HTML 导出、仪表板截图或多页汇报材料生成逻辑。虽然声明中提到“生成图表”属于其适用场景之一,但该代码的主功能明显缩窄为图表绘制,不足以支撑“正式报告文件生成器”的整体描述,因此存在实质性描述与行为不匹配。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

整体上,代码的核心目的与描述高度相关,确实是在把已有结构化内容渲染成正式报告文件,并支持 HTML/PDF/Word 输出。但声明中包含若干更广泛能力,代码并未体现。具体来说,CLI 只接受 html、pdf、docx 三种格式,没有 PPT/PowerPoint 导出;描述还提到“生成图表、制作仪表板截图”等,而代码仅在 chart section 中引用已有 image 路径或在 HTML 中显示 img,不包含图表生成、截图采集或 dashboard 渲染逻辑。因此存在描述比实际能力更宽的功能性不匹配。未发现与声明无关的敏感行为或额外资源访问。

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding

The skill describes behaviors that write files and produce output artifacts, but it does not declare any explicit tool scope or allowed-tools constraints. In an agent environment, missing scope boundaries can permit broader file-write behavior than intended, increasing the risk of unauthorized writes or misuse if the skill is auto-invoked.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest uses very broad trigger phrases such as generic requests for reports, formatting, and chart generation, which can cause the skill to activate in contexts beyond the user's intent. Over-broad activation increases the chance that sensitive business data is routed into a file-writing/report-rendering workflow unnecessarily, raising risks of unintended data exposure or unsafe tool use.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The manifest description is entirely in Chinese and the workflow later specifies Chinese font defaults and Chinese-title behavior for Chinese reports, but there is no statement that the skill supports multiple languages or that Chinese is an intentional, justified locale restriction. This can violate language/locale policy when users have not opted into Chinese output.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The document explicitly sets the page language to "zh-CN", and the visible content is entirely in Simplified Chinese. For SQP-3, forcing a specific language or locale without user opt-in or a clearly documented regional justification is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This markdown file presents all report-template instructions in Chinese and does not indicate that language selection is optional or limited to a specific region or audience. Under 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.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This code embeds its primary natural-language interface in Chinese, including the module description, docstrings, CLI description, and argument help text. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale restriction is clearly documented and justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The module docstring and all user-facing descriptions are written only in Chinese, and the HTML template explicitly sets lang="zh-CN". This indicates the skill is designed around a fixed language/locale without any user opt-in or documented region-specific justification, which matches the language/locale policy violation criteria.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The manifest explicitly states the skill can export PDF/Word/PPT/HTML files, but the CLI and renderer dispatch only support html, pdf, and docx. This is a direct mismatch between the advertised capability and the actual implemented behavior.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The configuration defines separate family_cn and family_en font stacks, which embeds language/locale-specific behavior in the skill asset. Because there is no accompanying opt-in, selection logic, or documented regional justification in this file, it may conflict with the policy against forcing language or locale behavior without user choice.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

This markdown specification begins with and continues in Chinese, which imposes a single language on readers without any stated opt-in or explanation. Under the language/locale policy, forced single-language content can be a natural-language policy violation unless the locale constraint is documented and justified.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.