Back to skill

Security audit

unisound-chief-complaint-disease-op

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent medical-record quality-control tool, but it sends sensitive record text and a bearer key to a user-configurable LLM endpoint without endpoint validation or an explicit consent gate.

Install only in an environment approved to process de-identified medical records with the configured model provider. Keep --base fixed to the trusted HiVoice HTTPS endpoint, avoid passing real patient identifiers, protect the app key, and have a qualified clinician review outputs before use.

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 (2)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/emr_qc_impl.py:53
Finding

Unrestricted API Endpoint Can Receive the App Key and Medical Record Data

Content
View full analysis
str: payload = {"model": model, "messages": messages, "temperature": 0} resp = _http_post(url, payload, headers, timeout=timeout) ``` The destination is directly configurable through the command-line entry points: ```python parser.add_argument( "--base", default=DEFAULT_LLM_BASE, help=f"Model base URL (default: {DEFAULT_LLM_BASE}).", ) ``` ### Technical Analysis The user-controlled `--base` value is used to construct the destination of an authenticated HTTP request without validating the scheme or hostname. The request includes both: - The HiVoice application key in the `Authorization: Bearer` header. - LLM messages containing patient-derived chief-complaint and present-illness data. The implementation does not require HTTPS and does not restrict the destination to the documented HiVoice host. Consequently, an attacker who can influence invocation arguments can redirect the request to an attacker-controlled HTTP or HTTPS server. Using an HTTP URL additionally exposes the bearer credential and medical data to network interception. This issue crosses a significant trust boundary because a credential intended for one service can be transmitted to an unrelated destination. ### Attack Path 1. The attacker gains the ability to influence the Skill invocation, deployment configuration, wrapper script, or ...[truncated 1443 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/emr_qc_impl.py:125
Finding

Medical Record Content Is Vulnerable to LLM Prompt Injection

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (6)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding

The skill documentation describes capabilities that read local files, write output files, and send medical record content to an external network API, but it does not declare any explicit tool scope such as permissions or allowed-tools. This creates a policy and containment gap: a caller or platform cannot clearly restrict what the skill is allowed to access or where sensitive data may be sent, which is especially risky given the medical-data context and the external LLM call.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This code file contains user-facing natural-language strings entirely in Chinese, including the module docstring, CLI description, and argument help text. Under the policy, forcing a specific language without user opt-in or a documented justification is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The code sends chief complaint and history of present illness from outpatient medical records to an external LLM endpoint over the network, but this file contains no consent gate, disclosure, minimization, or configuration that restricts use to an approved internal deployment. Because the data is medical in nature, transmitting it to a third-party service can create serious privacy, compliance, and data-governance risk if users are unaware or the endpoint is not contractually and technically approved for PHI handling.

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 raw outpatient medical record text to an LLM service via run_qc using a configurable base URL, but it provides no explicit consent prompt, warning, masking, or transport/privacy notice to the operator. Because medical records commonly contain highly sensitive personal and health data, silent transmission to a model endpoint creates a real confidentiality and compliance risk, especially if the endpoint is remote, misconfigured, or logs requests.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The module docstring, prompts, parsing logic, and printed outputs are all fixed in Chinese, and record parsing depends on Chinese field labels such as '主诉' and '现病史'. This enforces a specific language/locale behavior with no opt-in or alternative, which matches the language-policy concern described by the rule.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The module docstring is written entirely in Chinese, and the CLI argument descriptions are also presented only in Chinese. This imposes a single language/locale without any user opt-in or alternative, which matches the language policy violation criteria.

Content

No source excerpt is available for this finding.