Back to skill

Security audit

Baidu Map WebAPI(百度地图官方Web服务 SKills)

Security checks for vulnerabilities and agentic risk

Overview

This Baidu Maps API skill is purpose-aligned, but it needs Review because it includes apparent hardcoded API keys and gives workflows that can transmit precise location or vehicle data without consistent privacy notice.

Install only if you intend to use Baidu Maps WebAPI and are comfortable sending relevant queries, addresses, coordinates, route details, and possible vehicle identifiers to Baidu. Replace any concrete AK examples with your own restricted environment variable, avoid logging full request URLs, and review consent/privacy handling before using current-location, plate-number, session-id, or free-form demand workflows.

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

T09 · Insecure Skill Coding Practices

Warning
Location
references/admin_division_query.md:19
Finding

Hardcoded Baidu Maps API Credential in Administrative Division Reference

Content
View full analysis

Vulnerability Details

File Location: references/admin_division_query.md:19
Vulnerability Type: Hardcoded API credential
Risk Level: Medium

Vulnerable Code

markdown
| ak | string | T | - | 开发者密钥,即API Key,用于身份验证和配额管理。 | E4805d16520de693a3fe707cdc962045 |

Technical Analysis

The API parameter example contains a concrete value with the format and placement of a Baidu Maps access key rather than an unmistakable placeholder. The repository does not establish whether this credential is synthetic, expired, or revoked. It must therefore be treated as potentially exposed.

Hardcoded credentials in public documentation can be copied directly or collected through automated secret scanning. If the key remains active, an attacker can use it to invoke Baidu Maps services enabled for the associated application. The key is transmitted as the ak query parameter, so it may also be propagated into generated code, command histories, request logs, proxy logs, and monitoring systems.

Attack Path

  1. An attacker reads references/admin_division_query.md or discovers the value through automated repository scanning.
  2. The attacker extracts E4805d16520de693a3fe707cdc962045.
  3. The attacker submits requests containing the extracted value as the ak parameter to compatible Baidu Maps endpoints.
  4. If the credential is active and the request satisfies its IP or signature restrictions, the attacker consumes the application's API quota or accesses services enabled for that key.
  5. Repeated or abusive requests may exhaust quota or trigger provider-side throttling, suspension, or billing consequences.

Exploitation depends on the credential remaining valid and on its configured restrictions.

Impact Assessment

The potential scope is limited to Baidu Maps services and quotas authorized for the exposed application key. An attacker may consume API quota, obtain API responses available under the key, cause serv ...[truncated 348 chars]

Remediation
View remediation

Remediation Suggestions

  1. Replace the concrete value with an unmistakable placeholder such as $BMAP_WEBAPI_AK or YOUR_BAIDU_MAP_AK.
  2. Verify the credential in the Baidu Maps developer console. Revoke and rotate it immediately if it was ever active.
  3. Search repository history, generated documentation, release artifacts, logs, and mirrors for the same value and remove it where feasible.
  4. Restrict replacement credentials using source-IP allowlists, service-level permissions, quotas, and request-signature validation where supported.
  5. Add automated secret scanning to pre-commit hooks and continuous integration checks.
  6. Ensure examples consistently obtain credentials from BMAP_WEBAPI_AK and never print or log complete request URLs containing the key.

T09 · Insecure Skill Coding Practices

Warning
Location
references/domestic_weather_query.md:24
Finding

Hardcoded Baidu Maps API Credential in Domestic Weather Reference

Content
View full analysis

Vulnerability Details

File Location: references/domestic_weather_query.md:24
Vulnerability Type: Hardcoded API credential
Risk Level: Medium

Vulnerable Code

markdown
| ak | string | T | - | 开发者密钥,在API控制台申请获得。 | hhR4GDGHfREwblbolOYhio8HkHyRdDoq |

Technical Analysis

The weather API documentation embeds a concrete value in the example column for the required ak credential. Its format and context are consistent with a Baidu Maps API access key, and it is not marked as a fictitious value. The available evidence does not establish whether it is active or revoked, so it should be handled as an exposed credential.

Anyone with access to the project can extract and reuse the value. Because the credential is supplied in a URL query parameter, copying the example into an integration may additionally expose it through source control, shell history, process inspection, HTTP access logs, proxies, or diagnostic output.

Attack Path

  1. An attacker inspects references/domestic_weather_query.md or scans the project for high-entropy strings.
  2. The attacker extracts hhR4GDGHfREwblbolOYhio8HkHyRdDoq.
  3. The attacker places the value in the ak query parameter of requests to the domestic weather endpoint or other compatible Baidu Maps services.
  4. If the key remains active and its configured restrictions permit the request, the attacker submits weather or other authorized API queries using the owner's quota.
  5. Automated requests may exhaust quotas, interfere with legitimate use, or cause the provider to throttle or suspend the associated application.

Successful exploitation depends on the credential's validity, enabled services, quota, and source or signature restrictions.

Impact Assessment

The exposed value may permit unauthorized use of the Baidu Maps services enabled for its application, including consumption of paid or rate-limited quota. Abuse could lead to degraded availability for le ...[truncated 294 chars]

Remediation
View remediation

Remediation Suggestions

  1. Replace the embedded value with $BMAP_WEBAPI_AK, YOUR_BAIDU_MAP_AK, or another clearly nonfunctional placeholder.
  2. Check the key in the provider console and revoke or rotate it if it was ever valid.
  3. Review repository history, published packages, documentation mirrors, command logs, and generated examples for further copies.
  4. Apply least-privilege service permissions, strict quotas, source-IP allowlists, and signature validation to replacement keys.
  5. Enable automated credential detection in continuous integration and local commit workflows.
  6. Avoid logging complete query strings because the API places ak in the URL. Redact the parameter from diagnostics, proxy logs, and error reports.
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 (68)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill description is broad enough to auto-trigger on many ordinary map/location conversations, which can unnecessarily load this skill and steer the agent toward external API usage. In context, that increases the chance of unneeded handling of user location queries and credential-dependent workflows, even when a simpler or privacy-preserving response would suffice.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
84% confidence
Finding

The example embeds the AK directly into a curl query string, which can expose credentials through shell history, process listings, logs, monitoring systems, proxies, and HTTP referrer-like diagnostics. In a skill context that encourages direct API calls, this pattern normalizes insecure secret handling and can lead to credential leakage and unauthorized API consumption.

Content

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

text
4. 使用 references/ 所有能力时的ak参数请使用 `$BMAP_WEBAPI_AK`, 示例如下:

curl "https://api.map.baidu.com/place/v3/region?query=美食&region=北京&ak=$BMAP_WEBAPI_AK"

text

### 准则 3:地址/地名统一通过 `address_to_poi` 转换

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The recipe instructs users to submit raw address text to the Baidu geocoding API but does not explicitly warn that the address data will be transmitted to an external third-party service. Addresses can contain sensitive personal or business location information, so the omission can lead to unintended disclosure, compliance issues, or misuse in contexts where users assume processing is local.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

This markdown skill file presents all instructions, examples, and operational guidance exclusively in Chinese. Under the policy, forcing a specific language without user opt-in or a documented justification is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The recipe directs POI-name and landmark lookups to administrative_region_search, which does not align with the stated purpose of resolving merchants/landmarks into POI UID and coordinates. This can cause the agent to call the wrong API, return irrelevant region-level data, or fail to resolve destinations correctly, leading to incorrect routing or user-visible misinformation in map-based workflows.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This recipe instructs use of the user's precise current coordinates for nearby search but does not warn that those coordinates will be transmitted to an external map provider. Precise location data is highly sensitive, and omission of a privacy notice or consent guidance can lead to unintended disclosure, over-collection, or noncompliant handling of user location.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The recipe gives conflicting instructions for how to obtain a POI uid: it names administrative_region_search as Step 1, but then says the uid must be obtained through a search suggestion interface instead. This inconsistency can cause developers or agents to call the wrong API, mis-handle identifiers, or build brittle logic that fails or returns incorrect POI details.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The recipe explicitly requires the user's current location as a necessary input and instructs the agent to request it if missing, but it provides no privacy notice, purpose limitation, retention guidance, or user-consent language. Because precise location is sensitive personal data, collecting and using it without disclosure increases privacy risk and can lead to oversharing or unintended handling by downstream tools or logs.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

This markdown skill file presents all instructions, trigger examples, and operational guidance exclusively in Chinese. Under the policy rule for natural-language violations, forcing a specific language without user opt-in or documented justification is a reportable issue.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
74% confidence
Finding

The documented example field detail_url uses plain HTTP, which could lead downstream developers to fetch POI detail pages over an unencrypted connection. If copied into implementations, this can expose request metadata and response contents to interception or manipulation via man-in-the-middle attacks.

Content

Scanner excerpt · references/administrative_region_search.md (reported line 98)May include surrounding context.

md
| `results[].detail_info.classified_poi_tag` | string \| null |  | POI展示分类(细致分类)。 | 旅游景点;5A景区 |
| `results[].detail_info.comment_num` | string \| null |  | poi的评论数。 |  |
| `results[].detail_info.description` | string \| null |  | 描述。 |  |
| `results[].detail_info.detail_url` | string \| null |  | poi的详情页。 | http://api.map.baidu.com/place/detail?uid=2a7a2... |
| `results[].detail_info.image_num` | string \| null |  | poi图片数。 | 10 |
| `results[].detail_info.indoor_floor` | string \| null |  | 室内poi所在楼层。 |  |
| `results[].detail_info.label` | string \| null |  | poi权威标签,标签细分解释。 | 淮扬菜 |

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The file’s natural-language content is entirely in Chinese, and there is no indication that users may select another language or that the skill is intentionally restricted to a Chinese-speaking or region-specific audience. Under the stated policy, forcing a specific language without opt-in can be a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

This markdown file presents all instructional and descriptive content exclusively in Chinese, which can constitute a language policy violation when no user opt-in, alternative locale, or justification is provided. The policy specifically calls for flagging cases where a skill forces a specific language without user choice.

Content

No source excerpt is available for this finding.

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/circular_region_search.md (reported line 99)May include surrounding context.

md
|----------|------|------|------|------|
| `info` | object |  | 版权信息 | None |
| `info.copyright` | object |  |  | None |
| `info.copyright.imageUrl` | string |  |  | http://api.map.baidu.com/images/copyright_logo.png |
| `info.copyright.text` | string |  |  | @2023 Baidu - Data |
| `message` | string |  | 状态码对应的信息 | ok |
| `result` | object |  | 返回的结果 | None |

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/cycling_route_planning.md (reported line 41)May include surrounding context.

md
|----------|------|------|------|------|
| `info` | object |  | 版权信息 | None |
| `info.copyright` | object |  |  | None |
| `info.copyright.imageUrl` | string |  |  | http://api.map.baidu.com/images/copyright_logo.png |
| `info.copyright.text` | string |  |  | @2023 Baidu - Data |
| `message` | string |  | 状态码对应的信息 | ok |
| `result` | object |  | 返回的结果 | None |

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_detail_search.md (reported line 57)May include surrounding context.

md
|----------|------|------|------|------|
| `info` | object |  | 版权信息 | None |
| `info.copyright` | object |  |  | None |
| `info.copyright.imageUrl` | string |  |  | http://api.map.baidu.com/images/copyright_logo.png |
| `info.copyright.text` | string |  |  | @2023 Baidu - Data |
| `message` | string |  | 状态码对应的信息 | ok |
| `result` | object |  | 返回的结果 | None |

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_detail_search.md (reported line 101)May include surrounding context.

md
|----------|------|------|------|------|
| `info` | object |  | 版权信息 | None |
| `info.copyright` | object |  |  | None |
| `info.copyright.imageUrl` | string |  |  | http://api.map.baidu.com/images/copyright_logo.png |
| `info.copyright.text` | string |  |  | @2023 Baidu - Data |
| `message` | string |  | 状态码对应的信息 | ok |
| `result` | object |  | 返回的结果 | None |

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
86% confidence
Finding

该 Markdown 文件属于技能说明文档,适用缺少用户警示检查。文档列出了 AK、起终点坐标、车牌号、出发时间等会影响用户隐私的数据参数,并说明这些数据会通过远程地图 API 发送,但没有任何关于敏感位置/车辆信息会被传输给第三方服务的提示。

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The documentation instructs callers to send structured street addresses and an API key to a third-party geocoding endpoint but does not warn that addresses may contain sensitive personal or business location data. In a skill meant to guide implementation, this omission can lead developers to transmit user location data without consent notices, minimization, retention controls, or jurisdictional review.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The document instructs users to send precise latitude/longitude and optionally retrieve nearby POIs and roads from a third-party API, but it does not warn about the privacy implications of transmitting highly sensitive location data. In a map/geocoding skill, this omission is especially relevant because users may unknowingly submit exact personal or operational locations, increasing privacy and compliance risk.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The document encourages use of precise origin/destination coordinates, waypoints, plate numbers, speed, heading, and radius, all of which are sensitive location and vehicle-identifying data, but it provides no privacy, minimization, retention, or consent guidance. In a skill intended to help developers integrate the API, this omission can lead downstream implementations to collect and transmit highly sensitive trip data without adequate user notice or controls.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The documentation introduces baidu_user_id and baidu_session_id for personalized search but does not warn that these are user-linked identifiers sent to a third-party service. This can lead integrators to pass real account IDs, phone numbers, or stable session identifiers, creating avoidable privacy exposure, tracking risk, and possible compliance issues.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
88% confidence
Finding

The sample response includes a detail_url using plain HTTP, which can encourage downstream consumers to follow or embed insecure links. If used in applications, this may expose users to man-in-the-middle tampering, content injection, or mixed-content issues when opening POI detail pages.

Content

Scanner excerpt · references/multi_dimensional_search.md (reported line 76)May include surrounding context.

md
"ranking": "郑州市团建聚餐No.2",
        "children": [],
        "parent_id": "242425ad4ec48090132935cd",
        "detail_url": "http://api.map.baidu.com/place/detail?uid=fc6e4cc3de01b0ff095cb3a5&output=html&source=placeapi_v3",
        "shop_hours": "10:00-14:00,17:30-21:30",
        "comment_num": "5",
        "navi_location": {

External Transmission

Medium
Category
Data Exfiltration
Confidence
90% confidence
Finding

The schema documentation lists detail_url as an HTTP URL example, normalizing insecure transport in developer implementations. This increases the chance that integrators will trust or surface insecure links directly, enabling interception or modification of returned content.

Content

Scanner excerpt · references/multi_dimensional_search.md (reported line 118)May include surrounding context.

md
| `results[].detail_info.children[].uid` | string \| null |  | POI子点ID,可用于详情检索。 |  |
| `results[].detail_info.classified_poi_tag` | string \| null |  | POI展示分类(细致分类)。 | 美食;中餐馆;特色菜 |
| `results[].detail_info.comment_num` | string \| null |  | POI的评论数。 | 5 |
| `results[].detail_info.detail_url` | string \| null |  | POI的详情页URL。 | http://api.map.baidu.com/place/detail?uid=fc6e4... |
| `results[].detail_info.image_num` | string \| null |  | POI图片数。 |  |
| `results[].detail_info.indoor_floor` | string \| null |  | 室内POI所在楼层。 |  |
| `results[].detail_info.label` | string \| null |  | POI权威标签,如停车场类型、景区等级等。 | 特色菜 |

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The documentation explicitly instructs sending precise geolocation (location) together with free-form user context (demand) to a third-party remote API, but provides no privacy warning, consent guidance, minimization advice, or handling restrictions. Because demand can easily contain sensitive contextual data and coordinates can identify a person’s exact whereabouts, this creates a real privacy and data-governance risk in downstream agent implementations.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.