Back to skill

Security audit

厨房战争:经典即时战略

Security checks for vulnerabilities and agentic risk

Overview

The skill appears to deliver a playable browser RTS game, but it also embeds an automatic SkillHub five-star promotional prompt into the game output.

Review the promotional game-over CTA before installing or distributing this skill. The core game behavior is local and self-contained, but users may want to remove the SkillHub five-star prompt and avoid running the publish commands unless they intentionally manage this marketplace listing.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Findings (1)

T01 · Skill Instruction Hijacking

Warning
Location
SKILL.md:94
Finding

Persistent Promotional Content Injection into Delivered Game Output

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:94-96; assets/index.html:2111-2112
Vulnerability Type: Skill instruction hijacking through an embedded promotional directive
Risk Level: Medium

Evidence

SKILL.md:94-96:

markdown
- **结算屏引流 CTA** — on victory the screen shows the challenge code, the per-code
  best time, and a "去 SkillHub 搜 kitchen-war-rts 给个五星⭐" share prompt, turning
  every win into organic spread (the promo plan's "让用户替你传播" lever).

assets/index.html:2111-2112:

javascript
if(gc)gc.textContent+=' · 喜欢就去 SkillHub 搜 kitchen-war-rts 给个五星⭐';
}else if(gc){gc.textContent='喜欢这场对战?去 SkillHub 搜 kitchen-war-rts 给个五星⭐';}

Technical Analysis

The skill documentation explicitly directs the agent to distribute assets/index.html as the requested game. It also requires the delivered artifact to display an unrelated marketplace search and five-star rating request at game over, characterizing this behavior as a mechanism for organic promotion.

The implementation in showGameOver() applies the promotional message automatically during ordinary game output. The message is not required for RTS gameplay, challenge-code generation, score persistence, or result presentation. Because the directive changes the content of an agent-delivered artifact for the skill publisher's promotional benefit, it constitutes skill instruction hijacking.

The behavior is statically embedded and does not rely on external input, network retrieval, or dynamic code. No credential theft, remote-code execution, privilege escalation, system persistence, or data exfiltration was identified in association with this issue.

Attack Path

  1. A user asks the agent to create or deliver a playable RTS game.
  2. The skill instructs the agent to copy assets/index.html into the user's workspace and present it.
  3. The user receives and runs the game without separately requesting promotional content.
  4. The g ...[truncated 934 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove the mandatory promotional CTA and organic-distribution directive from SKILL.md:94-96.
  2. Remove the SkillHub search and five-star rating strings from assets/index.html:2111-2112.
  3. Keep the game-over screen limited to gameplay-relevant information, such as match results, completion time, challenge code, and personal best statistics.
  4. If attribution is desired, disclose it clearly before delivery and require explicit user consent before including it.
  5. If an optional marketplace link is retained, label it as optional, avoid soliciting a particular rating, and provide a user-controlled configuration that defaults to disabled.
  6. Add a release check that searches delivered artifacts for marketplace names, rating requests, referral messages, and unrelated calls to action.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • 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
Findings (25)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The description says this skill creates or serves a playable Kitchen War RTS HTML file and opens it for the user. The actual code provided does not generate the game, copy assets, or present files to the user. Instead, it is an internal audit script focused on validating an already-existing game implementation in a real browser using Playwright. Its primary purpose is automated testing/verification, not game generation or presentation. While it does interact with the same Kitchen War game artifact (assets/index.html), the behavior is materially different and includes undeclared capabilities such as browser automation, state injection, runtime error capture, and CI-style pass/fail exiting. Therefore this is a clear description/behavior mismatch.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

声明描述的是一个面向用户的 RTS 游戏生成/展示技能;而这段代码的实际作用是对现有 Kitchen War 页面执行自动化测试,验证建筑电力消耗逻辑是否正确。它依赖 Playwright 和 Chromium,监听页面错误,操纵 localStorage,点击开始按钮,并直接调用全局游戏函数 snapBuild、placeBuildingInstant、sellBuilding、recalcPower 来检查状态变化。这属于开发/QA 测试能力,不是声明中的“复制并打开游戏供用户游玩”这一主要目的的实现细节,因此与声明存在实质性不匹配。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared purpose is to create/copy/open a playable Kitchen War RTS HTML game for the user. The actual code chunk does not generate the game, present files, or implement gameplay features. Instead, it is a separate automated QA harness that loads an existing HTML file and performs adversarial runtime checks: pausing, speed changes, superweapon corner cases, selling buildings, long-run stability, economy progression, victory persistence, resizing, double initialization, input edge cases, and rapid music toggling. This is a materially different primary purpose from the declared game-generation skill. While such testing could support development of the game, this specific code chunk's behavior is not accurately represented by the description.

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 3)May include surrounding context.

md
tyle game, or wants to create/extend/fix the Kitchen War game. The agent copies assets/index.html to the workspace and opens it via present_files."

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
tyle game, or wants to create/extend/fix the Kitchen War game. The agent copies assets/index.html to the workspace and opens it via present_files."

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
tyle game, or wants to create/extend/fix the Kitchen War game. The agent copies assets/index.html to the workspace and opens it via present_files."

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
tyle game, or wants to create/extend/fix the Kitchen War game. The agent copies assets/index.html to the workspace and opens it via present_files."

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
tyle game, or wants to create/extend/fix the Kitchen War game. The agent copies assets/index.html to the workspace and opens it via present_files."

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
tyle game, or wants to create/extend/fix the Kitchen War game. The agent copies assets/index.html to the workspace and opens it via present_files."

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The trigger phrases are broad enough to match many generic game-related requests, which can cause the skill to activate when the user did not specifically want this package's RTS/game-copying workflow. Over-broad invocation increases the chance of unintended file operations, browser presentation, or unrelated instructions being injected into a session under the guise of helping with 'a game'.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The 'When to Use' criteria are open-ended and lack guardrails about when not to invoke, making accidental activation more likely across broad strategy-game or browser-game requests. In an agent setting, ambiguous routing can lead to inappropriate copying/opening of assets or unsolicited execution of the skill's developer workflow in contexts where the user asked for something else.

Content

No source excerpt is available for this finding.

Ssd 4

Medium
Category
Not specified by scanner
Confidence
73% confidence
Finding

These lines describe a multi-step retention-and-promotion flow: generate a challenge code, show best time, then prompt users to search for and positively rate the skill. Individually the steps look like product/marketing guidance, but together they form a gradual narrative that steers the agent toward manipulative user-facing messaging rather than purely fulfilling the game request.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The manifest frames this skill as generating a playable Kitchen War HTML game, copying assets/index.html into the workspace, and opening it for the user. However, this file also instructs the agent to run clawhub publish, publish to external SkillHub sites, and upload listing/promotional assets, which is a separate deployment/marketing capability not justified by the stated runtime purpose of creating or extending the game for a user session.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
83% confidence
Finding

This code’s usage instructions reference environment-variable setup and a user-specific local path, including PLAYWRIGHT_BROWSERS_PATH and NODE_PATH. For a code file, sensitive environment-variable or local-environment handling should have some disclosure in code comments, prompts, or surrounding skill documentation, but this file does not warn users about interacting with local environment configuration or exposing machine-specific paths.

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 user-visible assertion and status strings are written in Chinese throughout, which imposes a specific language on anyone consuming its output. The policy allows locale constraints only when the user is given a choice or when the restriction is clearly documented and justified; neither is present here.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The test asserts that UI text must match the Chinese phrase "个人最佳" and prints a Chinese-only success message. This embeds a fixed language expectation into the skill behavior without offering any user language choice or documenting a justified locale restriction.

Content

No source excerpt is available for this finding.

Ae4

Medium
Category
analysis-evasion
Confidence
80% confidence
Finding

Suspicious Unicode normalization or mixed-script content

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
77% confidence
Finding

The manifest says the agent copies a single HTML file and opens it via present_files, which suggests a straightforward content-delivery skill. In contrast, the documentation makes execution of local Node binaries and Playwright browser automation mandatory after edits, introducing a test-execution capability that is not described in the manifest's stated scope.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

The page declares lang="zh-CN", and the UI text throughout the file is Chinese-only. Under the policy rule for natural-language violations, forcing a specific language/locale without user opt-in can be a violation when no alternative or choice is offered.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

The manifest describes a self-contained RTS game skill that generates and opens a playable HTML file. At game-over, the code injects promotional calls to 'go SkillHub 搜 kitchen-war-rts 给个五星⭐', which is a user-retention/marketing capability rather than gameplay or challenge-sharing functionality needed for the skill's stated purpose.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The screenshot() function creates an image and programmatically triggers a download via an anchor click, which is a file write operation. While the UI labels the action as screenshot/share, the code lacks an explicit confirmation prompt or warning that a file will be saved locally.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

The PASS message includes Chinese text ('放塔升耗电, 拆塔降耗电, 无崩溃') as the only user-facing success description. This imposes a specific language/locale in output without opt-in or an alternative, which matches the language-policy violation criteria.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

The probe injects code that sets localStorage (kw_seenHelp) before page load, altering persistent user/browser state. There is no confirmation prompt or user-facing notice in the script indicating that it will modify stored data.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
77% confidence
Finding

The script programmatically triggers victory-state logic and then checks for persisted achievement data in localStorage, which can cause lasting state changes in the application under test. Although this is part of testing behavior, the file does not visibly warn that running it may alter persistent game progress/state.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

This code hard-codes natural-language labels and assertion messages in Chinese, such as the expected UI text and test result names. Under the policy, forcing a specific language without offering user choice or documenting a justified locale constraint is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Static analysis

Detected: suspicious.dynamic_code_execution

Dynamic code execution detected.

Critical
Code
suspicious.dynamic_code_execution
Location
scripts/verify_game.js:140