Back to skill

Security audit

Baidu Map JSAPI GL(百度地图官方 WebGL SKills)

Security checks for vulnerabilities and agentic risk

Overview

This is a documentation-only Baidu Maps JSAPI GL skill that fits its stated purpose, with some examples developers should harden before production use.

Install this if you need Chinese-language BMapGL development references. Before using its snippets in production, protect the Baidu Maps AK with appropriate browser restrictions, disclose and minimize location/address queries, avoid inserting user-controlled values into HTML strings, and replace HTTP tile endpoints with HTTPS.

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

T09 · Insecure Skill Coding Practices

Warning
Location
references/custom-overlay.md:127
Finding

DOM-Based Cross-Site Scripting Through Unsanitized Overlay Properties

Content
View full analysis

${this.properties.title}

${this.properties.desc}

`; ``` ### Technical Analysis The documented example interpolates `imgSrc`, `title`, and `desc` directly into an HTML string and assigns it to `innerHTML`. No contextual encoding, sanitization, or URL validation is performed. If an application follows this example and populates these properties from search results, APIs, databases, URL parameters, or other untrusted sources, an attacker can inject HTML attributes or elements. For example, a malicious value placed in `imgSrc` could terminate the `src` attribute and introduce an event handler. Malicious markup in `title` or `desc` would also be parsed as HTML rather than displayed as text. Although the values shown in the documentation are static, this pattern is unsafe when reused with dynamic data. ### Attack Path 1. An application implements the documented `createInfoCard` function. 2. The application assigns attacker-controlled content to `this.properties.imgSrc`, `title`, or `desc`. 3. The function interpolates the content into the template literal without validation. 4. The resulting string is assigned to `div.innerHTML`. 5. The browser parses the injected markup in the application's origin. 6. An injected event handler or other executable HTML context runs when the relevant event occurs. ### Impact Assessment Successful exploitation can execute JavaScript in the security context of the integrating web application. Depending on the application's architecture and browser protections, an attacker may: - Read or modify DOM-visible application data. - Perform authenticated actions using the victim's active session. - Access creden ...[truncated 405 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
references/xyz-layer.md:7
Finding

Unencrypted HTTP Tile Endpoints in XYZ Layer Examples

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
references/mvt-layer.md:7
Finding

Unencrypted HTTP Endpoint in MVT Layer Example

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • 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
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (22)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill description states it should auto-trigger when users mention broad terms like “百度地图” or related map-development needs, which can match many ordinary conversations outside the intended narrow JSAPI GL scope. Over-broad triggering can cause the wrong skill to activate, leading to irrelevant guidance, context capture, and reduced trust; in systems with multiple skills, it can also crowd out more appropriate or safer handlers.

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.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The document explains geocoding and reverse-geocoding workflows that inherently send user-supplied addresses or coordinates to an external mapping service, but it provides no privacy notice, consent guidance, or data-handling caveats. In a developer skill, this omission can lead downstream applications to collect and transmit precise location data without informing users, increasing privacy and compliance risk.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This is a natural-language locale policy concern because the file imposes a language fallback behavior that defaults users into Chinese if their language is unsupported. The text does not present this as a user-selectable option or obtain opt-in, which can violate organizational expectations around language/locale choice.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The documentation explicitly encourages passing HTML strings into content and title without warning about untrusted input. In a web mapping context, developers may feed user-controlled or third-party data into these fields, which can lead to DOM XSS if the library renders the HTML directly.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
85% confidence
Finding

At L154-L165, the guide states that returning false from an onClosing callback will block window closure, yet the documented constructor options table at L31-L42 does not include onClosing, and the documented event model at L112-L131 uses addEventListener rather than option callbacks. This is an intent/documentation contradiction that could mislead developers about the actual control surface for InfoWindow closing behavior.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The entire skill reference is written in Chinese and does not provide an opt-in, alternative language, or justification that the content is intended only for a Chinese-speaking or region-specific audience. Under the policy for natural-language violations, forcing a specific language without user choice is in scope.

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 title and all instructional content are written entirely in Chinese, with no indication that users may choose another language or locale. Under the stated policy, natural-language content that imposes a single language without opt-in is a locale/language policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

This markdown file presents all instructional content in Chinese, including headings, parameter descriptions, and method explanations, with no indication that users may choose another language. Under the policy rule for language or locale constraints, this can be a natural-language policy violation unless the locale limitation is explicitly documented and justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
85% confidence
Finding

该 markdown 文件以中文标题和说明呈现,未见为用户提供语言/locale 选择,也没有说明这是面向特定中文区域或受众的限定文档。根据语言/locale 政策,这属于未显式 opt-in 的语言约束。

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
94% confidence
Finding

This markdown file presents all user-facing guidance exclusively in Chinese and does not indicate that the user can choose another language. Under the natural-language policy rule, forcing a specific language without user opt-in is a locale/language policy concern.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
81% confidence
Finding

The methods section at L44-L132 enumerates content, sizing, display, maximize, and event APIs, but L173 tells users to call dispose() to release resources without documenting that method anywhere else in the file. This creates a documentation-level contradiction about the available API surface and cleanup mechanism.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

Line L038 states that common options include language, but this file does not describe whether language selection is optional, user-controlled, or constrained to a justified locale. Because language/locale policy applies across all file types, this is a minor natural-language policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

This markdown file presents all instructions and examples exclusively in Chinese, and does not indicate that the skill/documentation is region-specific or that users can opt into a preferred language. Under the language/locale policy check, forcing a single language without user choice can be a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

This markdown file contains user-facing instructional content exclusively in Chinese, and there is no indication that the skill offers language selection or that it is intentionally limited to a Chinese-speaking or region-specific audience. Under the policy, forcing a specific language without user opt-in can be a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

This file presents all instructions, examples, and warnings only in Chinese, which can amount to a language/locale policy issue when no user opt-in or alternative language is provided. There is no indication that the skill is region-specific or that the language restriction is intentional 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

This markdown file contains user-facing natural language exclusively in Chinese, including the title, section headings, and parameter descriptions. Under the policy, forcing a specific language without user opt-in can be a natural-language policy violation unless the locale restriction is clearly documented and justified, which is not present here.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

This markdown file presents all instructional content and code-context labels exclusively in Chinese. Under the policy scope, forcing a specific language without user choice can be a natural-language policy violation unless the locale restriction is clearly documented and justified, which is not present here.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

This markdown file contains user-facing instructional content exclusively in Chinese, beginning with the title and continuing throughout the document. Under the policy rule for natural-language violations, forcing a specific language without user opt-in can be a locale-policy issue when no alternative or scope justification is provided.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

This markdown file presents all user-facing instructional content in a single language, which can constitute a language/locale policy issue when no user opt-in or alternative is provided. There is no indication that the document is intentionally limited to a Chinese-only regional audience or that users may choose another language.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
77% confidence
Finding

该 markdown 文件包含自然语言与示例配置,其中 language: BMAPGL_LANGUAGE_ZH 将中文作为直接示例值提供,但附近未说明这是可选示例、需由用户自行选择,或仅适用于中文场景。根据规则,强制或默认特定语言而未提供用户 opt-in/选择,可能构成语言/地区策略方面的自然语言问题。

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

该 Markdown 文档从标题到说明内容全部使用中文,未提供多语言选项、语言切换提示或对语言限制的合理性说明。按规则,强制单一语言而无用户选择可构成自然语言层面的语言/区域政策问题。

Content

No source excerpt is available for this finding.