Back to skill

Security audit

数字宠物

Security checks for vulnerabilities and agentic risk

Overview

This is a mostly coherent digital-pet skill, but it needs review because its helper server is exposed beyond localhost and its web views run third-party JavaScript without integrity checks.

Install only if you are comfortable with a toy pet that starts a local web server and depends on a live CDN. Prefer running it on a trusted network, binding the server to 127.0.0.1, removing wildcard CORS, and bundling Three.js locally or adding SRI/CSP before regular use.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (3)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/serve.py:13
Finding

Development HTTP Server Listens on All Network Interfaces with Permissive CORS

Content
View full analysis
:8888`. 4. The attacker enumerates and downloads files exposed by `SimpleHTTPRequestHandler`. 5. Alternatively, an attacker causes the user to visit a malicious webpag ...[truncated 707 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
index.html:7
Finding

Unverified Third-Party JavaScript Execution in the Main Web Interface

Content
View full analysis
``` ### Technical Analysis The main page downloads and executes Three.js from a third-party CDN at runtime. Although the URL includes a fixed library version, the application does not provide a Subresource Integrity hash, so it does not verify that the returned bytes match a reviewed release. The page also lacks a restrictive Content Security Policy. If the CDN response, CDN account, TLS trust chain, or an installed local trust component is compromised, modified JavaScript can execute with the same browser-page privileges as the application's own scripts. This is a supply-chain trust issue. The reviewed repository may remain unchanged while the effective executable code delivered to users changes externally. ### Attack Path 1. A user opens `index.html` or accesses it through a web server. 2. The browser requests `three.min.js` from `cdnjs.cloudflare.com`. 3. An attacker capable of compromising or altering the trusted CDN response returns modified JavaScript. 4. Because no `integrity` attribute is present, the browser accepts the modified response. 5. The malicious script executes before the application's local scripts initialize. 6. The script can manipulate the application, observe page interactions, use browser APIs allowed in the context, and send accessible information to an attacker-controlled endpoint. ### Impact Assessment Successful exploitation permits arbitrary JavaScript execution within the origin and browser context of the main interface. The attacker could alter the displayed application, capture interactions, perform network requests allowed by the browser, consume system resources, or prevent the application from functioning. This finding does no ...[truncated 67 chars]
Remediation
View remediation
``` 3. Verify the hash directly against the expected upstream artifact before deployment. 4. Add a restrictive Content Security Policy that limits scripts and connections to necessary sources. 5. Establish a dependency-update process that reviews security advisories and verifies new artifacts before changing versions. ]]>

T08 · Insecure Dependencies

Warning
Location
pet_widget.html:7
Finding

Unverified Third-Party JavaScript Execution in the Desktop Pet WebView

Content
View full analysis
``` ### Technical Analysis The desktop widget downloads and executes Three.js from a third-party CDN without a Subresource Integrity hash. The desktop application loads this page in `QWebEngineView`, so externally delivered JavaScript becomes part of the executable content of the embedded browser interface. Pinning the version in the URL does not cryptographically pin the response body. An altered CDN response would be accepted and executed because neither SRI nor an equivalent application-level artifact verification mechanism is configured. The page also does not define a restrictive Content Security Policy. This increases the potential capabilities of malicious JavaScript delivered through the dependency channel. ### Attack Path 1. The desktop pet initializes its embedded Qt WebEngine page. 2. `pet_widget.html` requests Three.js from the external CDN. 3. A compromised CDN, trust chain, or trusted network interception component supplies a modified response. 4. Qt WebEngine executes the response because the page does not provide an integrity requirement. 5. The modified dependency runs inside the desktop widget's web context. 6. The malicious code can manipulate the widget, monitor interactions available to the page, initiate browser-permitted network traffic, or disrupt the desktop application. ### Impact Assessment Successful exploitation provides arbitrary JavaScript execution inside the embedded web-rendering context. Potential effects include application spoofing, interaction monitoring, unauthorized network requests from the web context, resource exhaustion, and loss of widget availability. The reviewed evidence does not demonstrate a direct path from ...[truncated 89 chars]
Remediation
View remediation
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • 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
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (15)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

描述把该技能定位为支持互动喂食、玩耍、抚摸以及宠物养成游戏的 3D 数字宠物。但当前代码块实际只展示了桌面宠物壳层与窗口行为:创建透明置顶窗口、系统托盘、加载本地 HTML、通过定时器让窗口跟随鼠标、支持拖拽和模式切换。虽然这与“桌面宠物陪伴/3D 展示”部分部分一致,但描述中的关键互动玩法和养成能力并未在该代码中体现,因此描述对功能有明显夸大,属于描述与实际行为不符。

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The file’s natural-language content, including the manifest description and user instructions, is predominantly in Chinese. Under the language/locale policy, forcing a specific language without opt-in or justification is a policy concern, especially since no alternative language option or locale constraint is stated.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The page loads Three.js from a third-party CDN at runtime, which introduces a supply-chain and network trust dependency outside the local skill package. If the CDN response is tampered with, unavailable, or replaced with malicious code, that script executes with full privileges in the page context and can alter behavior beyond the stated digital pet functionality.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

At L429-L451, playAnimation(time) is implemented as the actual per-frame animation routine, but at L478-L481 another playAnimation() method is declared that only sets this.state = 'playing'. In a JavaScript class, the later method overrides the earlier one, so the switch at L352-L353 will call the trigger method instead of the documented rotating/jumping/waving animation logic.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The document declares lang="zh-CN", and the visible UI text throughout the file is Chinese-only. Under the policy criteria, forcing a specific language without user opt-in can be a natural-language policy violation when no language choice or justification is provided.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

Multiple user-facing strings, dialogs, and console messages are presented in Chinese, and the file does not indicate any user opt-in, language selection, or region-specific justification. Under the language/locale policy, forcing a specific language without user choice is a policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The module docstring is entirely in Chinese and presents the skill as a Chinese-language server utility without offering any language choice. Under the policy, forcing a specific language or locale without user opt-in is a natural-language policy violation unless the locale restriction is documented and justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

The entire skill description and usage guidance are written in Chinese, and there is no indication that users may choose another language or that the skill is intended only for a Chinese-speaking or region-specific audience. Under the policy, a fixed language without opt-in is a natural-language locale constraint.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

The document declares lang="zh-CN" and the visible UI text throughout the page is presented in Simplified Chinese, with no indication that users can choose another language. This can violate the language/locale policy when a skill imposes a specific locale without user opt-in or a documented regional justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

SQP-3 applies to all file types and includes language or locale policy violations in comments or string literals. This file presents its descriptive natural-language content entirely in Chinese and does not offer an opt-in, alternative language, or documented region-specific justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

The natural-language description is written entirely in Chinese, which can impose a specific language on users without any indication of language choice or opt-in. Under the language/locale policy, this is a potential policy violation unless the locale restriction is explicitly justified or alternatives are offered.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

The file uses Chinese-only natural-language content in comments and user-facing button labels, such as the scene description and rotation toggle text. Under the stated policy, forcing a specific language without opt-in can be a locale-policy violation when no alternative or justification is provided.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
80% confidence
Finding

This code continuously reads the global cursor position to make the pet follow the mouse, which is a form of ongoing user-input monitoring. While the startup prints mention that the pet follows the mouse, they do not clearly disclose that the application continuously tracks cursor position in the background, including while resident in the system tray.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

This JavaScript file contains natural-language comments and a console warning exclusively in Chinese, including the user-visible message at L016. Under the policy, forcing a specific language without user opt-in or a documented locale justification is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

The stylesheet includes natural-language comments in Chinese (e.g. loading animation and responsive section labels), which imposes a specific language in developer-facing documentation within the file. The policy for this audit flags language/locale constraints when a file forces a specific language without offering choice or documenting justification.

Content

No source excerpt is available for this finding.