Back to skill

Security audit

Didi Map JSAPI

Security checks for vulnerabilities and agentic risk

Overview

This guide is not malware, but some examples could lead developers to expose users' map and location data if used as written.

Install only if you are comfortable treating this as developer reference material that needs review. Use HTTPS for any proxy, keep keys server-side, avoid logging raw coordinates or search terms, require clear user consent for geolocation and continuous tracking, and prefer text-safe popup APIs or sanitize HTML before using setHTML.

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

T09 · Insecure Skill Coding Practices

Warning
Location
references/jsapi-auth.md:20
Finding

Plaintext HTTP Proxy Configuration Exposes Map API Traffic

Content
View full analysis
window._DiMapSecurityConfig = { serviceHost: "你的代理服务器域名" // 例如:serviceHost: 'http://1.1.1.1:80/api/v2/web/' } ``` ```nginx server { listen 80; # nginx端口设置,可按实际端口修改 server_name 127.0.0.1; # nginx server_name 对应进行配置,可按实际添加或修改 # Web服务API 代理 location /api/v2/web/ { set $args "$args&jscode=客户端key"; proxy_pass https://lbs.xiaojukeji.com/api/v2/web/; } # Web静态文件 代理 location /api/v2/static/ { set $args "$args&jscode=客户端key"; proxy_pass https://lbs.xiaojukeji.com/api/v2/static/; } } ``` ### Technical Analysis The security guidance demonstrates a browser-facing proxy URL using plain HTTP and configures Nginx to listen only on TCP port 80. Although the connection from Nginx to the DiDi provider uses HTTPS, TLS protection does not cover the network path between the user's browser and the proxy. Applications adopting this example may transmit map API requests, search terms, route information, coordinates, or geolocation-related data without transport encryption. An attacker positioned on the same untrusted network, or otherwise able to intercept the browser-to-proxy connection, can observe requests and alter requests or responses. The issue does not independently grant operating-system privileges or access to the proxy host. Exploitation requires network visibility or control over the plaintext connection. ### Attack Path 1. A developer deploys the documented configuration with an `http://` `serviceHost` and an Nginx listener on port 80. 2. A user accesses map functionality through a network observable by an attacker, such as an untrusted wireless network. 3. The browser sends map API traffic to the configured proxy over plaintext HTTP. 4. The attack ...[truncated 824 chars]
Remediation
View remediation
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 (43)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- `references/types.md` - 类型定义:TypeScript 类型声明

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

This markdown file presents the skill/API documentation entirely in Chinese, including headings and parameter descriptions, with no indication that the language is optional or intentionally region-specific. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The document describes obtaining current location and continuous location tracking via watchPosition() and trackUserLocation but provides no guidance about user consent, privacy expectations, or responsible handling of location data. In a developer skill, this omission can normalize unsafe integration patterns and lead downstream applications to collect or monitor precise location without adequate disclosure or minimization.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This markdown file documents a capability to obtain device geographic coordinates and set up location watching, which affects user privacy. The description and examples explain parameters and callbacks but do not warn that the skill accesses sensitive location data or that continuous watching may track the user's position.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This markdown file presents the API documentation entirely in Chinese, starting with the primary description at L0009, with no indication that language selection is optional or that the locale restriction is intentional. Under the policy rule, forcing a specific language without user opt-in is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The documentation exposes a setHTML(html: string) API for popup content without any warning that untrusted HTML can lead to DOM-based cross-site scripting if developers pass user-controlled input. In the context of a map popup, this is especially relevant because popups commonly display dynamic POI names, addresses, or search results, increasing the chance that consumers will insert attacker-controlled markup directly.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The documentation describes geocoding and reverse-geocoding of precise location data, which inherently involves sensitive personal data, but it provides no warning about privacy obligations, user consent, retention, or transmission to a remote service. In a developer skill, this omission can lead integrators to collect or send precise address/coordinate data without adequate notice or safeguards, increasing privacy and compliance risk.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The documentation says '周边搜索' corresponds to inputTips and '输入提示' corresponds to aroundSearch, but the rest of the file shows inputTips is the input suggestion service and aroundSearch is the nearby search service. This is an active contradiction in the skill documentation about what each capability does.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The examples encourage sending user-entered keywords and optional location coordinates to a third-party POI service without any privacy notice, consent guidance, or data-minimization warning. In a maps/search skill, this increases the risk that developers will unknowingly transmit sensitive search terms or precise location data, creating avoidable privacy and compliance exposure.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The file forces a specific language for all user-facing documentation and examples, which can violate language/locale policy when no opt-in or alternative is offered. There is no statement that the skill is region-specific or that Chinese is required for compliance or product scope.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The documentation encourages sending precise origin/destination coordinates, timestamps, and city data to a route-planning service without any privacy notice, consent guidance, or data-minimization advice. Because location data is highly sensitive and can reveal home/work patterns and movements, omitting warnings or handling guidance can lead downstream developers to collect and transmit user location in ways that create privacy and compliance risk.

Content

No source excerpt is available for this finding.

Vague Triggers

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

The manifest says the skill auto-triggers when the user mentions DiMap, 滴滴地图, didi-jsapi, or related map-development needs, but it does not define the boundaries of 'related' needs or provide negative examples. This ambiguity could cause the skill to activate in broader mapping discussions than intended.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

The user-facing documentation and parameter descriptions are entirely in Chinese, with no indication that language choice is optional or that the skill is specifically scoped to a Chinese-speaking or region-specific audience. This creates a natural-language locale policy concern because it imposes a language constraint without documented opt-in or justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
71% confidence
Finding

The natural-language content and labels are presented only in Chinese, and the file does not indicate that the language is optional or region-specific. The policy calls for flagging cases where a skill forces a specific language without user opt-in, and this documentation appears to do so.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

The user-facing documentation and parameter descriptions are written entirely in Chinese, with no indication that the skill is region-specific or that alternative language support is available. Per the policy, a forced language/locale without opt-in or documented 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
89% confidence
Finding

This markdown file presents all human-readable API descriptions exclusively in Chinese, with no indication that language is selectable or that the locale restriction is intentionally justified. Under the language/locale policy check, this is a natural-language constraint that can violate policy when imposed without 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 contains end-user documentation entirely in Chinese, including the class description and method explanations. Under the stated policy, forcing a specific language without user opt-in can be a natural-language policy violation unless the locale restriction is 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
91% confidence
Finding

This markdown file presents all descriptive natural-language documentation in Chinese, with no indication that language choice is optional or that the locale restriction is intentional. Under the stated policy, a skill that forces a specific language without user opt-in can be a language/locale policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

This markdown file presents the skill name and note only in Chinese, with no indication that users can choose another language or locale. Under the policy rule for natural-language violations, forcing a specific language without user opt-in is a reportable issue.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
81% confidence
Finding

The user-facing documentation is written in Chinese and does not indicate that language is configurable or intentionally limited to a specific locale or audience. Under the policy, forcing a specific language without user opt-in or documented justification can be a natural-language policy issue.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

该文档全文以中文撰写,未见提供其他语言选项、用户语言选择机制,或说明这是特定中文受众/区域专用文档。按规则,强制单一语言且无用户选择可能构成语言/locale 政策问题。

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

The primary skill description is presented entirely in Chinese, and the document does not indicate any user language choice or opt-in. Under the policy criteria, forcing a specific language without user selection 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
98% confidence
Finding

This markdown file presents the skill documentation in Chinese ('一般点标记,它位于地图图层之上,是个DOM UI') and continues in that language throughout, with no indication that language choice is optional or that the skill is region-specific. Under the policy, forcing a specific language without user opt-in is a natural-language locale 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 markdown file presents all user-facing documentation in Chinese and does not mention that the language is fixed, optional, or intended for a China-specific audience. Under the stated policy, forcing a specific language without user opt-in or 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
90% confidence
Finding

The user-facing documentation and method descriptions are entirely presented in Chinese, with no indication that other languages are available or that this locale is intentionally limited. Under the policy, forcing a specific language without user opt-in is a natural-language locale violation.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.