Back to skill

Security audit

ai-medical-care-manager

Security checks for vulnerabilities and agentic risk

Overview

This outpatient assistant is mostly coherent, but it needs review because it can share sensitive healthcare-route location data with AMap without explicit opt-in and relies on polluted provider data for recommendations.

Before installing, require the assistant to ask before using IP geolocation or sending addresses/coordinates to AMap, avoid using a home address when a coarse origin is enough, verify any recommended doctor or department through official hospital channels, and keep the AMap key in environment configuration rather than a local plaintext file. Do not rely on this skill for diagnosis or emergency decisions.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (4)

other

Warning
Location
scripts/amap_ip_locate.js:31
Finding

Location Data Is Transmitted to a Third Party Without Explicit Consent

Content
View full analysis
Remediation
View remediation

other

Warning
Location
scripts/vendor/amap_index.js:271
Finding

Generated Amap URL Exposes Precise Route Details

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
scripts/vendor/amap_index.js:7
Finding

Amap API Key Can Be Persisted in a Plaintext Configuration File

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Note
Location
package.json:6
Finding

Dependency Installation Is Not Reproducibly Pinned

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (36)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared description presents a broad end-to-end outpatient medical assistant, with many healthcare workflow functions and AMap route planning as one component. The supplied code does not implement any of those medical workflow capabilities. It only calls AMap's geocoding endpoint to convert an address into coordinates and related address metadata. While geocoding could be a supporting piece of route planning, this script does not compute routes, provide navigation, or interact with hospitals, doctors, registration systems, reminders, or medical explanations. Therefore the actual behavior is materially narrower and different from the declared purpose, so this is a clear mismatch.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

声明描述的是一个完整的门诊就医助手,核心能力覆盖医疗分诊、推荐、挂号与就诊前后支持,并提到基于高德地图的路线规划。实际代码却只是一个独立的IP定位脚本,功能范围非常窄:通过环境变量中的高德Key调用Amap IP定位接口,根据返回矩形计算中心点后输出定位结果。它既不涉及医疗流程能力,也不进行医院/医生推荐,更不执行路线规划本身。虽然IP定位可能可作为路线规划的辅助实现细节,但当前代码片段的主要行为与声明的主要目的明显不一致,且额外体现了对用户IP和外部定位API的使用,这在描述中并未明确说明。因此应判定为描述与代码行为不匹配。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

声明描述的是一个覆盖门诊就医全流程的综合医疗服务技能,其中路线规划只是最后一环。实际代码却只实现了基于高德地图的路线查询与链接生成:读取命令行参数,调用 walking/driving/riding/transit 路线接口,格式化距离和时长,并输出结果 JSON。代码中没有任何医疗相关逻辑,例如症状分析、科室分诊、医院或医生推荐、挂号处理、就医提醒或诊后解释。因此描述与代码实际行为存在明显不匹配;虽然“到院路线规划”这一子能力与声明部分一致,但不足以支撑其宣称的主要用途。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

声明描述的是一个覆盖门诊就医全流程的综合技能,包含分诊、科室判断、医院/医生推荐、挂号引导、就医准备、提醒、诊后解释和地图路线规划等多项能力。而给定代码实际只做了一件事:从命令行接收预约时间,解析多种日期格式,计算3个预设提醒时点(T-12h、T-6h、T-2h),并输出JSON结果。虽然“提醒”属于声明中的一个子能力,但当前代码片段的主要功能明显比声明范围窄得多,且没有实现声明中的大多数核心能力。因此描述与实际行为存在明显不匹配。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

声明描述的是一个覆盖门诊全流程的综合技能,而实际提供的代码块功能非常单一,只实现了“就医准备卡”生成。代码没有进行症状分析分流,也没有任何医院或医生推荐逻辑;没有挂号、提醒、诊后解释或地图路线规划相关代码;也未使用外部服务或地图 API。虽然“生成就医准备卡”属于声明中的一部分,但就该代码块所体现的实际能力而言,与声明的整体功能范围存在明显落差,因此应判定为描述与行为不匹配。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

声明描述的是一个覆盖门诊就医全流程的C端助手,核心能力应包括症状分析、科室决策、医院/医生推荐、挂号后续服务和地图路线规划。而实际代码只做非常有限的结构化信息抽取:读取CSV中的医院/科室/医生候选项,在给定文本中做子串匹配,并用正则提取日期时间,最后输出解析结果、缺失项和简单置信度。这与声明的主要目的存在明显偏差,属于 materially different primary purpose。代码既没有医学分诊/推荐逻辑,也没有地图、提醒、挂号流程或诊后解释等能力。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

声明描述的是一个覆盖门诊就医全流程的C端技能,但提供的代码块只覆盖其中前半部分:症状文本关键词匹配、科室候选推断、急症关键词识别,以及基于CSV医院/医生资料的Top 3推荐。这与“先做症状分流和挂号科室判断,再推荐医院/医生 Top 3”是吻合的;但声明中后续承诺的挂号引导、就医准备、提醒、诊后解释、以及高德地图路线规划,在代码中完全没有体现,也没有任何网络/API调用或地图处理逻辑。因此描述显著高于代码实际能力,属于能力描述不准确的 mismatch。未发现额外的敏感或越权行为;问题主要是声明范围远大于实际实现。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

声明将技能描述为完整的门诊就医助手,核心能力应围绕医疗分诊、科室推荐、医院/医生推荐及就医流程服务展开,仅附带高德路线规划。实际代码却几乎完全聚焦于高德地图服务调用:搜索 POI、规划多种交通路线、生成地图链接,以及旅游兴趣点行程规划。代码中没有任何医疗知识处理、症状分析、医院/医生排序、挂号流程、提醒或诊后解释逻辑。其主要用途与声明明显不同;虽然“基于高德地图的到院路线规划”这一小部分与声明部分一致,但不足以覆盖声明的主体功能,因此属于明显描述与行为不匹配。

Content

No source excerpt is available for this finding.

Hidden Instructions

High
Category
Prompt Injection
Confidence
60% confidence
Finding

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

Content

Scanner excerpt · assets/hospital_extracted_final.csv (reported line 1)May include surrounding context.

text
"hospital_name","hospital_intro","department_name","department_intro","doctor_name","doctor_department","doctor_intro","doctor_schedule"
"中日友好医院","","呼吸与危重症医学科","","王辰","呼吸与危重症医学科","",""
"中日友好医院","","中医妇科","","许润三","中医妇科","",""
"中日友好医院","","呼吸与危重症医学科","","曹彬","呼吸与危重症医学科","",""

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The file contains a tourism itinerary planner that is unrelated to the stated medical-care-manager purpose. In a healthcare skill, hidden or mismatched functionality increases supply-chain and trust risk because it may trigger unexpected data flows, confuse downstream agents, or mask unauthorized use of location and query data under a different business purpose.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The README states that route planning will first attempt coarse IP-based geolocation but does not disclose the privacy implications, consent expectations, retention limits, or fallback behavior in a user-facing way. In a medical-care workflow, even coarse location combined with hospital-selection context can reveal sensitive health-related inferences, making undocumented location collection more risky than in a generic mapping feature.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding

The skill declares executable scripts, environment-variable use, and file reads, but it does not declare an explicit tool scope or permissions boundary. In practice this can cause the hosting agent to grant broader-than-expected capabilities or make reviewers unaware that the skill needs local file access and secrets, increasing the chance of unintended data exposure or unsafe execution.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest description is entirely in Chinese and presents the skill as serving Chinese consumer outpatient workflows, with no indication that users may choose another language. This creates a language/locale policy concern because the skill appears to impose a specific language experience by default rather than offering opt-in or alternatives.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The main skill instructions, user prompts, and output guidance are all specified in Chinese, and there is no instruction to adapt to the user's preferred language. Because the policy applies to natural-language content in any file type, this is a language-forcing behavior unless the locale restriction is explicitly justified.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
99% confidence
Finding

Role labels like '专家出诊', '知名专家', '副主任医师', '住院', and similar service labels are being stored as doctor names, which breaks identity integrity for provider recommendation. In a medical recommendation context, this can lead users to believe they are being referred to specific clinicians when the system is actually surfacing generic labels or placeholders.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

These rows contain non-provider or non-clinical entities represented as doctor/department records, which directly conflicts with the skill's claim of recommending real doctors and hospitals. In a healthcare workflow, such entity confusion can produce unsafe recommendations, failed bookings, and loss of user trust at moments where users may rely on the output for time-sensitive care decisions.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The dataset is clearly polluted with whole-site navigation, recruitment, informational chrome, and other scraped page text that is not structured clinical provider data. In a medical triage and doctor-recommendation skill, this can cause the system to rank or present irrelevant entities as hospitals, departments, or doctors, creating unsafe medical guidance and misdirected care.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The playbook instructs the skill to attempt real user IP coarse-location before asking the user for a manual location, but it does not mention obtaining explicit consent or warning the user about the privacy implications. In a medical-care workflow, location data is especially sensitive because it can be linked with health-related activity such as hospital visits, increasing privacy and profiling risks.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

This markdown file presents all user-facing response templates exclusively in Chinese and does not indicate that the user can choose another language. That can violate a language/locale policy when the skill effectively forces a specific language without documented opt-in or justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This markdown file presents all user-facing guidance exclusively in Chinese, and there is no indication that the skill is limited to Chinese-speaking users or that users can opt into another language. That creates a natural-language policy concern because it effectively forces a specific language without explicit justification or choice.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script sends a user's IP address to AMap's external geolocation API, which is a third-party disclosure of personal data and location-related metadata. While the code comments and error text acknowledge that IP-based location should only be used when the user IP is truly available, there is no technical enforcement of user notice, consent, or minimization in this file, which is more sensitive in a medical-care workflow because it can reveal where a patient is seeking care.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The script sends precise origin and destination coordinates to external routing functions, which likely invoke a third-party map service, but this file provides no user-facing notice, consent flow, or minimization for highly sensitive location data. In a medical care workflow, route queries can reveal where a patient lives and which clinic or hospital they are visiting, making the privacy risk more sensitive than a generic navigation use case.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script’s user-facing content, including department mappings, question prompts, notes, and defaults, is entirely in Chinese. Because it does not provide any mechanism for language selection or document a justified locale restriction, it can violate the policy against forcing a specific language without user opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This code emits a fixed Chinese instruction in the user-facing output note: '如字段缺失,请让用户手动补充医院、科室、医生或就诊时间。' The file does not indicate that the skill is explicitly China/Chinese-specific or provide any user opt-in for language selection, so it creates a natural-language locale policy concern.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The AMAP API key is written in plaintext to a local config.json file, with no protections, permission checks, or user warning. Stored credentials can be exposed through source checkout, backups, logs, container layers, or overly broad filesystem access, enabling unauthorized API use and possible billing abuse.

Content

No source excerpt is available for this finding.