Back to skill

Security audit

APQP技能助手

Security checks for vulnerabilities and agentic risk

Overview

The skill fits its APQP document-generation purpose, but a generated Gantt HTML report can run unsafe content if given crafted input.

Review this before installing if you expect to generate HTML reports from untrusted project names or phase JSON. Use only trusted input for Gantt generation, avoid opening generated HTML from untrusted data, and prefer a fixed version that enables HTML escaping and validates phase JSON. Also verify output paths to avoid overwriting existing files.

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/generate_gantt.py:589
Finding

Stored HTML and JavaScript Injection in Generated Gantt Reports

Content
View full analysis
APQP项目甘特图 - {{ project_name }} ``` ```html {% for phase in phases %}
{{ phase.name }}
{% for task in phase.tasks %}
{{ task.name }}
{% if task.type == 'milestone' %}
{% else %}
``` Custom phase and task values are loaded from a user-selected JSON file without content validation: ```python # Lines 576-579 with open(args.phases, 'r', encoding='utf-8') as f: content = f.read() phases = json.loads(content) ``` The template is then rendered through `jinja2.Template`, which does not enable HTML autoescaping by default: ```python # Lines 589-590 template = Template(GANTT_HTML_TEMPLATE) html_content = template.render(**template_data) ``` ### Technical Analysis The `project_name` value originates from the `--project` command-line argument, while phas ...[truncated 2546 chars]
Remediation
View remediation
`, `"`, `'`, and `&`. Verify that the resulting document contains escaped entities and does not create executable elements or event-handler attributes. 6. **Consider a restrictive Content Security Policy** Add a defense-in-depth policy to the generated HTML, for example: ```html ``` The exact policy should be tested against intended report functionality. Autoescaping rema ...[truncated 67 chars]
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 (14)

Tp2

High
Category
MCP Tool Poisoning
Confidence
85% confidence
Finding

Mixing characters from multiple Unicode scripts in a single identifier is a common technique to create visually ambiguous tool names.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

代码的核心功能非常聚焦:读取命令行参数和可选JSON输入,渲染Jinja2模板,生成符合FMEA格式的Markdown文档,并做基础RPN计算与高风险项统计。这与声明中的“文档生成(FMEA)”和部分“风险分析”相符,但远不足以支撑“APQP项目管理全流程”这一主描述。声明还列出了PPAP、控制计划、甘特图、知识库查询、项目阶段定义等多项能力,而在提供的代码片段中均未实现。因此该描述对该代码块而言明显过宽,存在实质性描述与实际行为不一致。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

该代码块的功能范围明显窄于声明描述。它仅实现了PPAP清单生成,依据预定义的PPAP要素和提交等级生成待办/提交状态文件,并不包含APQP全流程管理,也没有实现项目阶段管理、FMEA或控制计划内容生成、甘特图展示、风险分析或知识库检索等能力。未发现额外高风险或越权资源访问;主要问题是声明的能力远超代码实际行为,属于描述与实际功能不符。

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
86% confidence
Finding

The skill describes file-reading and file-writing behavior through referenced scripts and output paths, but it does not declare any explicit tool scope such as permissions or allowed-tools. This creates an authorization ambiguity where an agent runtime may grant broader filesystem access than users or reviewers expect, increasing the chance of unintended file access or overwrite.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The trigger conditions are broad natural-language phrases like 'APQP', 'FMEA', and '项目阶段', which can cause the skill to activate in unrelated conversations. Over-broad activation increases the risk of unintended file operations, generation steps, or context capture when the user did not intend to invoke this skill.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Natural-language policy violations apply to all file types, including code comments, docstrings, CLI help text, and generated templates. Here the docstring, argparse descriptions, and report template are Chinese-only, with no opt-in or alternative locale support, which can violate a policy requiring language choice rather than a forced locale.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This Python file contains user-facing natural-language strings entirely in Chinese, including the script description, CLI help text, and the generated document template. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale restriction is explicitly documented and justified, which is not present here.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script’s natural-language content, including the module docstring, generated template, CLI description, and help text, is entirely in Chinese. There is no option to select another language or indication that the skill is intentionally limited to a Chinese-speaking or region-specific context, which makes this a locale-policy issue.

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 presents its description, HTML labels, and CLI help text entirely in Chinese, including an explicit zh-CN HTML locale at L015. Under the policy rule, forcing a specific language without user opt-in is a natural-language policy violation unless the locale limitation is clearly documented and justified, which is not present here.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

L221 将该技能描述为“纯文档/脚本技能,无外部依赖风险”,而 L018 明确声明依赖 jinja2==3.1.2。这里的注释性评估文字与前文实际描述相矛盾,不只是信息不全,而是对依赖情况作了相反表述。

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

该 markdown 文件从标题开始即全部使用中文撰写,未说明这是面向特定中文用户群体的限定文档,也未提供其他语言选项。根据规则,强制单一语言而无用户选择或明确正当说明,属于自然语言层面的语言/地区策略风险。

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
81% confidence
Finding

This markdown file is entirely written in Chinese and does not indicate that the user can choose another language or that the content is intentionally limited to a Chinese-language audience. Under the policy rule for language or locale constraints, a fixed language without opt-in or justification can be a natural-language policy violation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

This is a code file, so file writes should be checked for user disclosure. Although the argument name suggests an output path, there is no confirmation prompt, visible warning, or log message before writing the rendered report, and the module docstring does not mention that it creates or overwrites a file.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

This Python file contains user-facing docstrings, argument descriptions, and generated Markdown content entirely in Chinese, with no indication that the skill is region-specific or that users may select another language. The policy explicitly calls for flagging language or locale constraints when they are imposed without user opt-in or documented justification.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.