T09 · Insecure Skill Coding Practices
- Location
scripts/api-client.js:28- Finding
Shared Plaintext Location Session State Enables Cross-User Session Confusion
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill matches a location-based city mystery game, but it needs review because it handles precise location/photos and uses overbroad local session and file-upload behavior.
Review before installing, especially in shared or multi-user agent deployments. Only use it if users explicitly consent to sending location and photo data to the online services, avoid passing arbitrary local JSON files to story-create, and prefer a version with per-user session storage, restrictive file permissions, schema-validated uploads, and a clear privacy notice.
scripts/api-client.js:28Shared Plaintext Location Session State Enables Cross-User Session Confusion
scripts/api-client.js:167Photo Verification Is Treated as Successful When the Argument Is Omitted
scripts/api-client.js:215Caller-Selected JSON Files Can Be Read and Uploaded to a Third-Party Service
The declared description emphasizes an AI剧本杀/城市解谜 experience where the AI acts as host and generates immersive story content tied to real locations. However, the provided code contains only low-level map-service helpers for AMap: POI search, geocoding, route planning, map link/data generation, weather lookup, config loading, and CLI arg parsing. While these functions could support a CityWalk experience, the core advertised behavior—story generation, narrative hosting, clue orchestration, or gameplay management—is absent from this chunk. Additionally, the code exposes a weather query feature that is not mentioned in the declared purpose. This is therefore a description-behavior mismatch, with the code behaving more like a generic AMap integration library than the described AI剧本杀 skill.
The code is related to the CityWalk scenario, so it is not wholly unrelated. However, the declared description emphasizes an AI-hosted immersive剧本杀 skill built on AMap that generates narrative scripts and links real places, while the actual code is primarily a general-purpose backend API client/CLI for operational functions. It includes several undeclared capabilities: creating and querying location sessions, uploading question banks, verifying answers, creating check-in links, and full story state/progress management. These are materially broader and more system-operational than the declared AI-host role. Also, declared permissions are empty, but the code clearly accesses external network services and persists a local session file. Therefore the description does not accurately represent the actual behavior.
The declared purpose describes an interactive city exploration/storytelling skill centered on scripted mystery gameplay and real map locations. The supplied code instead implements a weather-checking utility for a city, with no evidence of narrative generation,剧本杀 hosting, location-based puzzle logic, or Gaode map exploration behavior. Weather support could theoretically be a minor auxiliary feature for outings, but this code chunk’s primary purpose is plainly weather retrieval and advice, which is materially different from the declared skill description.
这段代码的核心功能是根据关键词、城市、类型、坐标和半径搜索 POI,并打印地点信息,属于地图地点检索工具。虽然地点搜索可作为城市解谜场景选择的支持能力,但声明中的主要用途强调 AI 剧本杀主持、沉浸式剧本生成与真实地点串联,而这些关键能力在该代码中完全没有体现。另一个不一致点是,代码显式作为可执行脚本通过命令行参数触发运行,而声明的 triggers 为空。综合来看,这不是单纯的实现细节,而是主要功能与触发方式均明显弱化为底层搜索工具,因此应判定为描述与行为不匹配。
Referenced artifact was not completely inspected
node scripts/api-client.js <命令> [参数]
Referenced artifact was not completely inspected
node scripts/api-client.js <命令> [参数]
Referenced artifact was not completely inspected
node scripts/api-client.js <命令> [参数]
Referenced artifact was not completely inspected
node scripts/api-client.js <命令> [参数]
Referenced artifact was not completely inspected
node scripts/api-client.js <命令> [参数]
Referenced artifact was not completely inspected
node scripts/api-client.js <命令> [参数]
Referenced artifact was not completely inspected
| scripts/search-locations.js | POI 搜索 | `--keywords=<词> --city=<城市>` |
Referenced artifact was not completely inspected
| scripts/plan-route.js | 路径规划 | `--type=walking --origin=<坐标> --destination=<坐标>` |
Referenced artifact was not completely inspected
| scripts/generate-map.js | 生成地图链接 | `--data=<json文件>` |
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.
</defs>
<rect width="800" height="520" fill="url(#bg)"/>
<!-- Title -->
<text x="400" y="40" text-anchor="middle" fill="#ffd700" font-size="24" font-weight="bold">🏗️ 技术架构 · AI CityWalk 剧本杀</text>
<!-- User Layer -->
Uploading question batches modifies backend content and appears administrative rather than necessary for guiding users through a city mystery experience. The manifest frames the skill as a narrative exploration host, not a back-office content management tool.
Reading a local JSON file and creating a backend story turns the skill into a content publishing interface. That capability is not an obvious requirement of serving as an AI game host that generates and runs immersive CityWalk mysteries for users.
The README explicitly describes collecting precise GPS location and on-site photos as mandatory verification steps, but provides no notice about consent, retention, sharing, security, or data minimization. In a location-based game, this can expose sensitive movement patterns and identifiable imagery, increasing privacy and safety risk if the data is mishandled or over-collected.
The skill documents executable command usage and implicitly depends on environment-backed capabilities, but it does not declare an explicit tool scope such as allowed tools or permissions. That creates a least-privilege gap: an agent platform may grant broader execution or environment access than intended, increasing the blast radius if prompt injection, command misuse, or backend misuse occurs.
The skill explicitly instructs users to click links that capture GPS location and send it to a service, but it does not provide a clear privacy notice about what location data is collected, how long it is stored, who can access it, or whether it is optional. Because this skill is designed for real-world movement and repeated check-ins, the context increases risk: precise location data can reveal home/work patterns, routine, and real-time whereabouts.
The skill requires users to upload on-site photos for AI verification but gives no warning about image handling, biometric or incidental personal data, storage, reuse, or transmission to remote services. In this context, photos taken in public or semi-private places may capture faces, children, license plates, addresses, or EXIF metadata, making the lack of disclosure and minimization materially risky.
This SVG embeds the workflow and user-facing content almost entirely in Chinese, including the title, steps, and footer, with no indication that users may choose another language. Under the policy for natural-language violations, forcing a specific language without opt-in is reportable across all file types.
This code sends user-provided search parameters, including keywords, city, coordinates, and radius, to the external AMap Web Service API via axios. Although the module comments describe API usage, there is no user-facing warning, confirmation, or disclosure that user/location data will be transmitted to a third-party service.
The geocode function sends the provided address and optional city to the AMap geocoding endpoint, which may expose sensitive location information to a third party. The file contains no user-facing warning, confirmation, or explicit disclosure about this data transmission.
The planRoute function transmits precise routing information, including origin, destination, and optional waypoints, to the AMap directions API. This is privacy-relevant location data, and the code does not include any user-facing warning or notice about the external transmission.
This code file contains natural-language documentation and CLI output entirely in Chinese, including the primary usage instructions and command descriptions. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale restriction is explicitly justified, which is not present here.