Back to skill

Security audit

Amap Citywalk Mystery

Security checks for vulnerabilities and agentic risk

Overview

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.

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

Error
Location
scripts/api-client.js:28
Finding

Shared Plaintext Location Session State Enables Cross-User Session Confusion

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/api-client.js:167
Finding

Photo Verification Is Treated as Successful When the Argument Is Omitted

Content
View full analysis
{ const result = await request('POST', '/api/questions/verify', { questionId, userAnswer: answer, photoVerified: photoVerified !== 'false' }); console.log(JSON.stringify(result, null, 2)); }, ``` ### Technical Analysis The expression `photoVerified !== 'false'` evaluates to `true` for every value except the exact string `"false"`. The documented command is: ```text verify ``` Consequently, normal use omits the third argument. In that case, `photoVerified` is `undefined`, and the expression evaluates as follows: ```js undefined !== 'false' // true ``` The client therefore tells the remote verification service that photo verification succeeded even though no photo result was supplied. This is a fail-open security control. It also relies on a client-supplied Boolean for a trust decision that should be established by a trusted verification component or enforced by the server. ### Attack Path 1. A user reaches a question that is intended to require GPS, photo, and answer verification. 2. The Agent invokes the documented two-argument command: ```bash node scripts/api-client.js verify QUESTION_ID ANSWER ``` 3. No `photoVerified` argument is supplied. 4. The client evaluates `undefined !== 'false'` as `true`. 5. The request sent to the remote service contains: ```json { "photoVerified": true } ``` 6. If the server trusts this field, it processes the answer as though the required photo verification had already succeeded. 7. The user may receive credit or progress without providing validated photographic evidence. ### Impact Assessment The vulnerability undermines the integrity of the Skill's claimed three-part vali ...[truncated 440 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/api-client.js:215
Finding

Caller-Selected JSON Files Can Be Read and Uploaded to a Third-Party Service

Content
View full analysis
{ if (!jsonFile) { console.error('请提供剧本 JSON 文件路径'); return; } const storyData = JSON.parse(fs.readFileSync(jsonFile, 'utf8')); const result = await request('POST', '/api/story/create', storyData); ``` ### Technical Analysis The `story-create` command accepts an arbitrary filesystem path, reads the referenced file, parses it as JSON, and transmits the complete parsed object to: ```text https://www.701study.com/app/citywalk-service/api/story/create ``` There is no canonical-path check, workspace restriction, allowlist of permitted directories, file-size limit, symbolic-link protection, schema validation, or filtering of unknown and sensitive fields. This is not an arbitrary raw-file disclosure primitive because the target file must contain valid JSON. However, many application configuration files, credentials, service-account documents, exported user records, and Agent state files are JSON. If an attacker can influence the path passed by the Agent, any such readable file can be disclosed to the external service. The method also uploads every field present in the file rather than constructing a minimal story object from explicitly allowed properties. ### Attack Path 1. An attacker influences the Agent or workflow to invoke `story-create` with a path outside the intended project workspace. 2. The selected path points to a valid JSON file readable by the Agent process, such as an application configuration, service-account file, exported user data, or another project's state. 3. `fs.readFileSync(jsonFile, 'utf8')` reads the file without validating its location. 4. `JSON.parse()` converts the complete contents into an object. 5. `request('POST', '/api/story/create', storyData)` send ...[truncated 867 chars]
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (38)

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

这段代码的核心功能是根据关键词、城市、类型、坐标和半径搜索 POI,并打印地点信息,属于地图地点检索工具。虽然地点搜索可作为城市解谜场景选择的支持能力,但声明中的主要用途强调 AI 剧本杀主持、沉浸式剧本生成与真实地点串联,而这些关键能力在该代码中完全没有体现。另一个不一致点是,代码显式作为可执行脚本通过命令行参数触发运行,而声明的 triggers 为空。综合来看,这不是单纯的实现细节,而是主要功能与触发方式均明显弱化为底层搜索工具,因此应判定为描述与行为不匹配。

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
node scripts/api-client.js <命令> [参数]

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
node scripts/api-client.js <命令> [参数]

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
node scripts/api-client.js <命令> [参数]

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
node scripts/api-client.js <命令> [参数]

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
node scripts/api-client.js <命令> [参数]

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
node scripts/api-client.js <命令> [参数]

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
| scripts/search-locations.js | POI 搜索 | `--keywords=<词> --city=<城市>` |

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
| scripts/plan-route.js | 路径规划 | `--type=walking --origin=<坐标> --destination=<坐标>` |

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
| scripts/generate-map.js | 生成地图链接 | `--data=<json文件>` |

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · assets/architecture.svg (reported line 10)May include surrounding context.

text
</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 -->

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
91% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
90% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
79% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

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.

Content

No source excerpt is available for this finding.