Back to skill

Security audit

baidu map jsapi-ui-kit

Security checks for vulnerabilities and agentic risk

Overview

This is a documentation-only Baidu Maps UI kit skill whose external map/API use is expected for its stated purpose, with some privacy and dependency-pinning cautions for implementers.

Reasonable to install if you are building with Baidu Maps. Treat map searches, selected places, coordinates, phone fields, and route endpoints as potentially sensitive user data, and add your own notice/consent where appropriate. Pin package versions, prefer lockfile-based installs or reviewed self-hosted assets, restrict BMAP_JSAPI_KEY by allowed origins/APIs, and use a restrictive Content Security Policy for production apps.

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

T08 · Insecure Dependencies

Warning
Location
references/getting-started.md:5
Finding

Unpinned third-party packages and remotely hosted scripts

Content
View full analysis
``` `references/getting-started.md:31-32`: ```html ``` `references/place-autocomplete.md:442`: ```html ``` ### Technical Analysis The installation command does not specify an exact package version. It therefore resolves according to the package registry's current metadata and the consuming project's package-manager configuration. A future release, compromised publisher account, or manipulated package-distribution path could cause users to install code that was not reviewed when this Skill was audited. Package installation may also invoke lifecycle scripts with the privileges of the developer or build environment. The unpkg references similarly omit an immutable package version and do not provide a Subresource Integrity hash. The JavaScript response is executed directly in the application's browser origin and can change independently of this repository. The remotely hosted Baidu Maps API is also executed without an integrity control, although this is an expected functional dependency and may be intentionally updated by its provider. The CSS resource is not equivalent to arbitrary JavaScript execution, but loading mutable third-party styles c ...[truncated 1829 chars]
Remediation
View remediation
``` 5. Generate integrity hashes from independently reviewed artifacts. Do not obtain both the artifact and expected hash from an untrusted response during the same deployment. 6. Prefer self-hosting reviewed JavaScript and CSS artifacts when licensing and update requirements permit. 7. Deploy a restrictive Content Security Policy that explicitly limits `script-src`, `style-src`, and `connect-src` to required origins. Avoid allowing `unsafe-inline` or `unsafe-eval` unless strictly necessary. 8. Restrict the Baidu Maps API key by approved web origins and enabled APIs through the provider's controls. Use separate keys for development and production, monitor usage, and rotate keys if exposure or abuse is suspected. 9. Document a controlled dependency-update process that includes security review, integrity regeneration, testing, and rollback procedures. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (9)

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · references/getting-started.md (reported line 32)May include surrounding context.

使用前需先加载百度地图 JS API:

html
<script src="https://api.map.baidu.com/api?v=1.0&type=webgl&ak=YOUR_AK"></script>

基础示例

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · references/place-autocomplete.md (reported line 442)May include surrounding context.

使用前需先加载百度地图 JS API:

html
<script src="https://api.map.baidu.com/api?v=1.0&type=webgl&ak=YOUR_AK"></script>

基础示例

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
85% confidence
Finding

This markdown file documents a component that updates suggestions in real time and shows examples of user-entered place queries being processed, which implies network-backed handling of potentially sensitive location/search data. The document includes implementation notes and usage examples but does not warn users that typed queries and selected locations may be sent to external map services.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

该 Markdown 文档全文以中文编写,未说明这是面向特定中文区域用户的限定文档,也未提供其他语言版本或语言选择。根据语言/locale 政策,若技能内容强制单一语言而无用户选择或明确地域性正当说明,属于自然语言层面的合规风险。

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

This markdown file uses Chinese throughout, including headings and instructional text, and does not indicate that the language is optional or that the skill is intended only for a Chinese-speaking or region-specific audience. Under the policy rule for language/locale constraints, 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
73% confidence
Finding

A natural-language policy issue exists when a skill or documentation forces a specific language without user opt-in. This file presents all headings, descriptions, examples, and notes only in Chinese, with no indication that Chinese is optional or that the skill is region-specific and intentionally localized.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

The file presents all user-facing natural-language documentation in Chinese and does not indicate that language selection is optional or that the component is intentionally restricted to a Chinese-speaking or region-specific audience. Under SQP-3, forcing a specific language without user opt-in is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

This markdown file documents optional display of phone as well as event payloads and examples that expose POI contact and coordinate data, but it does not include any warning about privacy or handling of potentially sensitive location/contact information. For markdown files, SQP-2 applies when descriptions omit warnings about behaviors that could affect user data or privacy.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

This markdown file describes a component that uses Baidu's route planning service and later notes that clicking navigation can jump to the Baidu Maps app, but it does not include any user-facing warning about sharing origin/destination coordinates or related location metadata with external services. For markdown files, missing disclosures about behaviors affecting user privacy are in scope.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.