Back to skill

Security audit

competitive-intel-report

Security checks for vulnerabilities and agentic risk

Overview

The skill appears to be a report-template generator, but it needs review because it overstates its analysis capabilities and can write unescaped, user-controlled HTML to an arbitrary output path.

Install only if you trust the report inputs and run it in a low-privilege workspace. Treat its output as a customized static template rather than verified live competitive intelligence, avoid opening generated reports from untrusted parameter values, and constrain the output path before use.

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 (2)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/generate_report.py:13
Finding

Unescaped Report Parameters Permit Stored Script Injection

Content
View full analysis
Remediation
View remediation
`, event-handler markup, and URL-bearing elements in every configurable report field. 8. Ensure downloaded report filenames are generated separately from display values and are sanitized independently. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/generate_report.py:22
Finding

Unrestricted Output Path Allows Arbitrary Writable-File Overwrite

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (24)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared description promises a full competitive-intelligence report generator with substantial analytical and formatting functionality. The supplied code does not implement those capabilities. Its actual function is narrow: load a preexisting HTML template and perform straightforward text replacements for a few predefined placeholders (company names, products, industry, and report period), then save the file. There is no parsing of patent retrieval results, no generation of SWOT/KPI/threat analysis, no chart construction logic, and no direct patent-link creation. While using a template is consistent with preserving a V12 style, the primary purpose and implemented behavior are materially simpler than the declared functionality, so this is a clear mismatch.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

There is a clear material mismatch between the declared description and the actual code. The description claims a fully featured report generator for automotive NVH competitive intelligence, but the code does not implement any of those functions. It merely prints a static readiness message. No data ingestion, analysis, templating, HTML generation, charting, or linking behavior is present.

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
当前模板:**V12**(references/template_v12.html)

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · references/template_v11.html (reported line 291)May include surrounding context.

html
</head>
<body>

<!-- ───────── 侧边导航 ───────── -->
<nav class="sidebar">
  <div class="sidebar-logo">
    <div class="logo-icon"><span>海</span></div>

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · references/template_v12.html (reported line 306)May include surrounding context.

html
</head>
<body>

<!-- ───────── 侧边导航 ───────── -->
<nav class="sidebar">
  <div class="sidebar-logo">
    <div class="logo-icon"><span>海</span></div>

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · references/template_v11.html (reported line 1024)May include surrounding context.

html
</div>
  </div>

  <!-- ══════════════════════════════════════════
       04 Henkel AG
  ══════════════════════════════════════════ -->
  <div id="henkel" class="section">

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · references/template_v12.html (reported line 1063)May include surrounding context.

html
</div>
  </div>

  <!-- ══════════════════════════════════════════
       04 Henkel AG
  ══════════════════════════════════════════ -->
  <div id="henkel" class="section">

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · references/template_v8.html (reported line 162)May include surrounding context.

html
</head>
<body>

<!-- ══ SIDEBAR ══ -->
<nav id="sidebar">
  <div class="logo-area">
    <h2>🏭 海程新材料<br>竞争情报简报</h2>

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The manifest describes a full report generator that produces KPI summaries, SWOT, patent panorama comparisons, threat matrices, recommendations, and PatSnap-linked patent content from supplied inputs. In contrast, this script only reads a fixed HTML template and replaces a small set of hard-coded placeholder strings with environment-variable values before writing the file, with no logic to ingest patent results or generate the claimed analytical sections.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The natural-language description is written as a fixed Chinese-language report generator and does not mention any option for users to select another language or locale. Under the policy, forcing a specific language without opt-in is a locale/language policy concern unless the constraint is explicitly justified.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The usage section tells users to activate the skill with “帮我生成竞争情报报告”, which is a common natural-language request rather than a narrowly scoped trigger. The file does not provide explicit trigger boundaries, exclusions, or negative examples, so this could overlap with ordinary conversation and cause unintended invocation.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest explicitly says the generated HTML should embed charts in pure CSS with no external dependencies. However, the template defines Chart.js-style defaults and calls new Chart(...), which requires an external charting library and contradicts the claimed implementation style.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The manifest describes the output as '内嵌纯CSS图文图表(无外部依赖)', implying charts are implemented without external libraries and using CSS/HTML only. In this file, the script section defines chart defaults and instantiates new Chart(...), which contradicts that stated implementation approach and the dependency-free claim in the skill description.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The template loads Chart.js from a public CDN, which contradicts the stated 'no external dependencies' design and introduces a real supply-chain and availability risk. If the CDN asset is modified, blocked, or unavailable, the generated report can execute untrusted JavaScript or fail to render correctly.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The module docstring is entirely in Chinese and presents the skill as a report-generation script without indicating that it is intentionally China-specific or that another language is unsupported. Under the policy rule for language/locale, this is a natural-language constraint that appears imposed without user opt-in or documented justification.

Content

No source excerpt is available for this finding.

Tainted flow: 'out' from os.environ.get (line 59, credential/environment) → pathlib.Path.write_text (file write)

Medium
Category
Data Flow
Confidence
95% confidence
Finding

The script writes output to a filesystem path taken directly from the OUTPUT_PATH environment variable with no validation or confinement. In an agent or automation context, a user controlling environment input can cause arbitrary file creation or overwrite anywhere the process has permissions, which can damage files, place misleading HTML in sensitive locations, or enable follow-on attacks if written into served or trusted directories.

Content

Scanner excerpt · scripts/generate_report.py (reported line 61)May include surrounding context.

python
out = Path(output_path)
out.parent.mkdir(parents=True, exist_ok=True)
out.write_text(html, encoding="utf-8")

print(f"✅ 报告已生成: {out}")
print(f"   公司: {our_company} ({our_short})")

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The script's user-facing success and summary messages are emitted only in Chinese, which forces a specific language for interaction. The file does not provide a language option or explain that the tool is restricted to a Chinese-speaking context.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

The document declares lang="zh-CN", and the visible content throughout the page is presented only in Simplified Chinese. Under the natural-language policy rule, forcing a specific language/locale without user opt-in can violate locale choice expectations when no region-specific justification is stated in the file.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
81% confidence
Finding

The comments label multiple sections as chart initialization blocks for market share, growth, region distribution, radar charts, OEM scoring, and other visuals, but those sections are empty. Only one new Chart(...) call appears, so the documentation of the script's behavior diverges from what the code actually does.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
97% confidence
Finding

The HTML root declares lang="zh-CN", and the entire interface content is written in Chinese, which imposes a specific language/locale on users. The file does not provide any language selection, opt-in, or region-specific justification that would make the locale constraint compliant with the stated policy.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
72% confidence
Finding

The manifest focuses on generating an HTML competitive-intelligence briefing with interactive modules and embedded charts. This template also exposes a client-side downloadHTML() feature that serializes the full DOM and triggers file download, which is an extra document-export capability not described as part of the report generator's stated scope.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
79% confidence
Finding

The 下载 HTML button triggers downloadHTML(), which creates and downloads a full HTML file copy of the document. While the action is user-initiated, the file lacks any disclosure about what will be saved or that the exported file includes the full page contents.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

The document declares lang="zh-CN", and the entire user-facing interface is written in Chinese, which enforces a specific language/locale experience. Under the policy, locale-specific behavior should either offer user opt-in/choice or clearly document a justified regional constraint; neither is present in this file.

Content

No source excerpt is available for this finding.