T09 · Insecure Skill Coding Practices
- Location
api/authorization.md:62- Finding
Persistent Local Boolean Is Used as Proof of IPC Authorization
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This appears to be a legitimate AMap iOS SDK integration skill, but it needs review because its templates handle location, navigation, IPC, and logs without enough safety and privacy guardrails.
Install only for projects that intentionally integrate AMap MALLMKit. Treat the generated code as sample material: add explicit user consent for location use and route-changing commands, avoid untrusted custom Agent URLs, redact or disable raw logs in production, and revalidate IPC authorization instead of relying on NSUserDefaults.
api/authorization.md:62Persistent Local Boolean Is Used as Proof of IPC Authorization
api/integrate-agent.md:112Sensitive Agent and IPC Data Is Logged Without Redaction or Release Controls
The skill explicitly advertises authorization, IPC link establishment, and data send/receive with the AMap app but provides no warning that app-to-app communication and transmitted data may have privacy, security, or behavioral effects. In this context, omission of those warnings can mislead users into enabling sensitive flows without understanding what is shared, what permissions are involved, or what commands may be executed across the IPC channel.
The alias trigger phrases are broad enough to catch generic support or integration requests such as '接入agent sdk' or 'IPC通信', which can cause the skill to activate outside the user's precise intent. In a skill that covers SDK integration, authorization, and app-to-app IPC, unintended activation can steer users into sensitive implementation guidance they did not explicitly request, increasing the risk of misrouting and unsafe action suggestions.
The documentation instructs developers to send free-form natural-language user queries to an agent service but does not warn that user-entered content may leave the device or be processed by backend AI services. This creates a privacy and data-handling risk because developers may unknowingly transmit sensitive location intents, destinations, or personal information without consent, disclosure, or minimization.
The file documents overriding the agent service URL with an arbitrary custom endpoint, but provides no warning that all natural-language queries may then be routed to third-party infrastructure. In this skill's map/agent context, those queries can reveal highly sensitive location plans and movement intent, so silent redirection materially increases privacy, compliance, and data-exfiltration risk.
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
LSApplicationQueriesSchemes(详见 quick-start.md)#import <MALLMKit/AMapAuthorizationManager.h>
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
LSApplicationQueriesSchemes(详见 quick-start.md)#import <MALLMKit/AMapAuthorizationManager.h>
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
LSApplicationQueriesSchemes(详见 quick-start.md)#import <MALLMKit/AMapAuthorizationManager.h>
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
LSApplicationQueriesSchemes(详见 quick-start.md)#import <MALLMKit/AMapAuthorizationManager.h>
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
LSApplicationQueriesSchemes(详见 quick-start.md)#import <MALLMKit/AMapAuthorizationManager.h>
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
LSApplicationQueriesSchemes(详见 quick-start.md)#import <MALLMKit/AMapAuthorizationManager.h>
The documentation explicitly describes sending JSON commands and location-bearing POI/navigation data over IPC to the AMap app, but it does not warn integrators that user location, destination, and route-control actions are being transmitted to another application. In an agent/LLM context, this omission is risky because downstream developers may invoke these capabilities without surfacing consent, notice, or appropriate privacy controls to end users.
The documented commands can directly alter live navigation behavior by adding waypoints, changing destinations, and modifying broadcast settings, yet the documentation does not warn about user impact or recommend confirmation before issuing such actions. In an agent-driven integration, this can lead to silent or unexpected route manipulation, confusing or unsafe user experiences, and abuse if an LLM or calling component triggers commands without explicit user approval.
The query callback logs agent summaries and session IDs, which may expose user intent, route/search content, and correlatable identifiers to local logs or external logging pipelines. In a map assistant context this is especially sensitive because queries may reveal destinations, habits, and travel context, yet the sample provides no warning or redaction guidance.
The sample hard-codes a specific vehicle identifier ("京DFZ588") into the navigation environment even though a map/route-planning integration example does not require real vehicle identity data. This creates unnecessary exposure of potentially sensitive personal or organizational information and encourages downstream developers to embed real identifiers in source code, logs, or test builds.
The example begins location updates as part of initialization without any user-facing disclosure in the skill text about continuous location collection, purpose, retention, or consent expectations beyond OS permission prompts. Because this is a navigation SDK integration skill, the behavior is contextually relevant, but the omission still risks developers shipping privacy-sensitive tracking flows without adequate notice or minimization.
The sample destroys global singleton managers in viewDidDisappear while the note says they usually should not be destroyed on page teardown. In an app using these shared managers across screens, this inconsistency can cause availability and state integrity problems, including broken navigation sessions, unexpected reinitialization, or race conditions if other components still depend on the singletons.
The entire skill documentation is written only in Chinese and does not indicate that the skill is region-specific or that users may choose another language. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation.
The documentation example forwards raw SDK log content directly to NSLog without any sanitization, filtering, or warning that logs may contain sensitive data such as user queries, location details, tokens, identifiers, or IPC/debug context. In a map/agent SDK, logs are especially likely to include privacy-sensitive telemetry, so encouraging unconditional logging can lead to exposure in device logs, crash reports, shared debug output, or downstream log collection systems.
The documentation encourages registering real-time navigation data listeners and describes callbacks carrying raw PB data, typed result objects, and navigation/location updates, but it does not warn that these callbacks may include sensitive location, route, and travel-behavior information. In an agent/SDK context with IPC to a map app, developers may log, persist, or forward this data without applying minimization, consent, or retention controls, increasing privacy and data-exposure risk.
This markdown file presents all user-facing instructions and examples exclusively in Chinese, and there is no indication that users can select another language or that the skill is intentionally limited to a Chinese-only audience. Under the language/locale policy, forcing a specific language without user opt-in can be a natural-language policy violation.
The document title and description are entirely in Chinese, and there is no indication that language selection is optional or that the skill is intentionally region-specific. This can violate language/locale policy when a skill imposes a specific language without user opt-in.
This markdown file presents all troubleshooting guidance exclusively in Chinese, and there is no natural-language indication that users may choose another language or that the skill is intentionally limited to a Chinese-speaking audience. Under the policy rule for language/locale constraints, forcing a specific language without opt-in can be a policy violation.
The guidance says the SDK supports broad natural-language expressions and will automatically infer user intent, which can increase the chance of accidental or ambiguous invocation of sensitive map actions such as route changes or navigation exit. In a driving/navigation context, over-broad trigger handling is more dangerous than in a low-stakes assistant because unintended execution can distract the user or alter navigation state at the wrong time.
The natural-language content in this file is entirely in Chinese, and there is no indication that the skill is region-specific or that users can opt into this locale. Under the stated policy, forcing a specific language without user choice can be a natural-language policy violation.
This markdown file contains user-facing instructional content only in Chinese, and there is no indication that language selection is optional or that the locale restriction is justified. Under the policy rules, forcing a specific language without user opt-in is a natural-language policy concern.