T09 · Insecure Skill Coding Practices
- Location
references/xiaohongshu-cdp.md:34- Finding
Shell Command Injection Through Unencoded Search Parameters
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This travel-planning skill is coherent, but it asks agents to control a logged-in local Chrome session and save travel history by default, so it needs review before installation.
Review this skill before installing. It is not clearly malicious, but only use it if you are comfortable with local browser automation, Xiaohongshu account/session use, third-party map lookups for your locations, and persistent local logging of travel preferences and history. Prefer a separate browser profile and opt out of memory logging if supported.
references/xiaohongshu-cdp.md:34Shell Command Injection Through Unencoded Search Parameters
SKILL.md:127Automatic Shared Persistence of User Travel History
SKILL.md:147Execution of an Unbundled External Skill Dependency
references/xiaohongshu-cdp.md:32Excessive Access to an Authenticated Browser Through Remote Debugging
references/amap-poi-search.md:5Plaintext API Key Storage and Exposure in Process Command Lines
Referenced artifact was not completely inspected
与本 `SKILL.md` **同目录** 的 `standups.md` 为追加式记忆,用于越用越贴用户/团队习惯。
The skill instructs reuse of a local CDP proxy on localhost:3456 to control the user's Chrome, which grants broad automation capability over a real browser session unrelated to the narrow travel-planning task. Even if only intended for search, this capability can expose cookies, authenticated pages, browsing contents, and other session data if misused or if selectors are changed.
Requiring the user's logged-in Xiaohongshu session introduces unjustified dependence on personal account context for a recommendation skill. This encourages the agent to operate inside an authenticated browser profile, increasing risk of accessing account-linked data and normalizing automation over private sessions without a strong need.
The description says to use the skill when the user '只报位置、想玩一下、出差间隙、会后放空、赶交通、酒店周边或要导航链接'. Several of these phrases are very general conversational intents, such as '想玩一下' or '要导航链接', and the file does not provide exclusion conditions to prevent accidental invocation in unrelated contexts.
The skill explicitly promotes cross-session memory of user preferences and travel history. Persistent retention and reuse of conversation-derived data can create privacy and profiling risks, especially when users may not expect long-term storage or reuse across sessions.
The style constraint explicitly requires using '你' and forbids using '您'. This is a natural-language policy issue because it forces a specific language/register choice without offering user opt-in or accommodation for user preference.
The instructions require appending conversation-derived preferences after most completed interactions, making persistence the default rather than an exception. This increases the likelihood of collecting more personal behavioral data than necessary and normalizes retention without strong consent gating.
The skill instructs the agent to execute a local Node.js script to check dependencies and conditionally enable CDP automation. Even though framed as a feature check, it expands the skill from travel advice into local tool execution, which increases attack surface and can be abused if the referenced script or environment is compromised.
The skill mandates CDP-based scraping of Xiaohongshu content and treats it as required output. This introduces browser automation and data extraction behavior beyond core trip-planning, creating unnecessary exposure to automation misuse, fragile scraping flows, and potential policy or data-handling issues.
The trigger section states that phrases like '会后放空' and '差旅途中微度假' are applicable, and the preceding section labels itself as '触发与风格'. These are natural, high-level expressions that do not clearly distinguish this skill from ordinary conversation or other local-recommendation skills.
The entire skill guidance is written as mandatory Chinese-facing instructions, including required output phrases such as '输出中必须包含「坐标来源」' and user-facing text to present in Chinese. There is no indication that the skill is region-specific for policy reasons or that users may opt into another language, which creates a locale policy issue under the natural-language policy rule.
The skill instructs sending user-provided hotel, neighborhood, or landmark names directly to AMap's POI API without disclosing that this reveals the user's approximate location or itinerary context to a third party. In this skill's travel/nearby-recommendation context, location is central and often sensitive, so silent transmission creates a real privacy risk even if the API use is functionally appropriate.
The trigger section lists generic terms like '飞机', '航班', '高铁', and '火车', which commonly appear in everyday travel discussions and are not specific enough to distinguish when this skill should activate. The file also does not provide exclusion conditions or negative examples to clarify when the skill should not be invoked.
The file presents all operational instructions and user-facing phrasing exclusively in Chinese, with no indication that the user can choose another language or locale. Under SQP-3, forcing a specific language without user opt-in is a natural-language policy concern.
The skill explicitly encourages alcohol- and massage-related recommendations as normal option categories, including late-night contexts, without requiring an upfront suitability, safety, age, or consent check. In a travel-assistant context this can steer vulnerable, tired, or intoxicated users toward risky activities, especially at night or in unfamiliar areas, and may surface adult services ambiguously under '按摩/足疗'.
The file title and instructions require the output to follow this Chinese-language template and to strictly preserve its structure, with no indication that users may choose another language or locale. This is a natural-language policy concern because it forces a specific language without opt-in or a documented region-specific justification.
The template explicitly instructs the system to append a standup entry for each interaction, which can cause persistence of user-related travel context, locations, preferences, and itinerary details beyond what is necessary for the immediate response. In a travel skill, those details may reveal sensitive behavioral patterns or whereabouts, increasing privacy risk if logged without minimization, consent, retention limits, and access controls.
The file is entirely written as mandatory Chinese instructions and examples, with no indication that the user may choose another language or that the skill is restricted to a Chinese-speaking context. This creates a natural-language locale policy issue because it implicitly enforces one language without opt-in.
The document makes CDP-based Xiaohongshu scraping a mandatory step before output, expanding the skill from generating recommendations and search keywords into browser automation against the user's local environment. That changes the trust boundary and can cause the agent to access browser state and third-party content in ways the skill description does not clearly disclose or justify.
The skill says CDP browsing and extraction should run automatically once a place is chosen, but it does not require a clear user-facing warning that the agent will access and manipulate the user's local Chrome session. Automatic execution against a logged-in browser materially increases privacy risk because the user may not realize their session context is being used.
This request opens a Xiaohongshu search URL through a local automation proxy, causing externally sourced content to be loaded into the user's browser session under agent control. In context, the danger is less about ordinary web access and more about the combination of third-party navigation, local browser automation, and potential authenticated state leakage.
"{地点名} {城市}" —— 补城市限定(如 "大兜路 杭州 夜晚")curl -s "http://localhost:3456/new?url=https://www.xiaohongshu.com/search_result?keyword=KEYWORD&source=web_search_result_note"
记录返回的 targetId。
The /eval step extracts DOM content from the automated browser session and even suggests dumping chunks of innerHTML when selectors fail. That materially increases the risk of collecting unintended page data, including authenticated content, account-specific information, or embedded tokens, far beyond the minimum needed for travel recommendations.
/eval 查看实际 DOM 结构:
curl -s -X POST "http://localhost:3456/eval?target=TARGET_ID" \
-d 'document.querySelector(".feeds-container")?.innerHTML?.substring(0, 2000) || document.body.innerHTML.substring(0, 2000)'
The file’s natural-language instructions and template are written entirely in Chinese, including the required field labels, with no indication that other languages are allowed. Under the policy, forcing a specific language without user opt-in is a natural-language policy concern unless the locale restriction is explicitly justified.
No suspicious patterns detected.