T09 · Insecure Skill Coding Practices
- Location
SKILL.md:274- Finding
Plaintext persistence of sensitive patient identity and health-booking data
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This health-booking skill is purpose-aligned overall, but it tells the agent to store full patient, identity, and bank-card details in hidden plaintext files and prints payment secrets in logs.
Review before installing. The skill can book health-check appointments and process payments, but it may leave highly sensitive identity and financial information in ordinary local markdown files and logs. Do not use it with real patient or bank-card data unless storage is removed or replaced with encrypted, consented, minimal retention and payment secrets are fully redacted from output and logs.
SKILL.md:274Plaintext persistence of sensitive patient identity and health-booking data
SKILL.md:718Plaintext persistence of complete bank-card and cardholder identity data
SKILL.md:433Skill instruction encourages disclosure of the complete authentication token
scripts/mcp_payment_tools.py:153MCP payment client logs payment credentials, one-time codes, session identifiers, and raw protocol messages
scripts/pay_sign_service.py:33Payment-sign service logs complete financial request data and raw credential responses
scripts/generate_qrcode.py:26Caller-controlled QR-code filename permits path traversal and arbitrary file overwrite
The skill directs the agent to store full bank-card details, cardholder identity numbers, and reserved phone numbers in a hidden desktop markdown file. This is extremely dangerous because it creates a plaintext local cache of financial credentials that can be stolen by other users, malware, backup systems, or accidental file sharing, enabling fraud and identity theft.
The payment flow tells the agent to store complete bank-card records, ID numbers, and phone numbers in a hidden local file, which is a severe security flaw. In context, this is more dangerous because the skill is a conversational assistant rather than a hardened payment application, so the surrounding controls, auditability, and compliance expectations are likely weaker.
The skill description emphasizes booking assistance but the workflow also performs external payment orchestration, status querying, and bank-card payment confirmation. Payment handling is a materially different and higher-risk capability than informational booking, so under-describing it can mislead users and reviewers about exposure to fraud and sensitive-data processing.
The skill description emphasizes booking assistance but the workflow also performs external payment orchestration, status querying, and bank-card payment confirmation. Payment handling is a materially different and higher-risk capability than informational booking, so under-describing it can mislead users and reviewers about exposure to fraud and sensitive-data processing.
The skill description emphasizes booking assistance but the workflow also performs external payment orchestration, status querying, and bank-card payment confirmation. Payment handling is a materially different and higher-risk capability than informational booking, so under-describing it can mislead users and reviewers about exposure to fraud and sensitive-data processing.
The skill instructs the agent to create a hidden desktop directory and persist sensitive identity and contact data locally. Storing medical-booking personal data in plaintext markdown outside a protected secrets store creates obvious risks of local compromise, accidental disclosure, malware harvesting, and unauthorized reuse across sessions.
The skill describes persisting sensitive personal data locally without any clear user-facing privacy warning, consent step, or retention notice. Hidden storage of health-booking identity data is especially problematic because users are unlikely to discover or manage what has been retained on their device.
The instructions explicitly direct the agent to persist highly sensitive personal data in a hidden local folder, which is a dangerous design pattern independent of whether the directory is hidden. Hidden placement reduces user awareness while doing nothing to protect confidentiality, making silent long-term accumulation of sensitive data more likely.
Appending patient identity data such as ID numbers, phone numbers, sex, and marital status to a reusable local markdown file introduces unnecessary retention of highly sensitive PII. Because the file is intended for later reuse, compromise of the host or shared workstation would expose multiple users' records over time.
The workflow instructs the agent to append identity records with ID numbers and phone numbers to a reusable markdown file, creating a plain-text dossier of users. This is dangerous because it centralizes sensitive PII in an easily readable format that can be copied, synced, or exfiltrated without specialized access.
The unauthenticated login branch repeats the same unsafe persistence pattern by saving newly collected patient data during login. Doing this before or as part of authentication broadens exposure because even partial or abandoned login attempts can leave sensitive identity data behind on disk.
The login branch also mandates saving newly collected identity details to a hidden desktop file, compounding the exposure. Because login workflows often involve hurried user interaction, this creates a significant risk of silently retaining sensitive PII without meaningful informed consent.
The skill stores bank-card and identity information locally without explicit warning or consent, which is unacceptable for financial data. Users would reasonably expect payment to be handled transiently by a payment processor, not copied into hidden desktop files for later reuse.
Binding and retaining payment agreement identifiers alongside saved bank records turns the skill into a local payment-instrument manager, increasing the value of the stored data to an attacker. Agreement tokens can facilitate future charges or payment workflow abuse even when raw card data is not re-entered.
Retaining payment agreement identifiers together with local bank records extends the impact of compromise from data exposure to possible payment authorization abuse. For a health-booking assistant, that capability is unnecessary at the local file level and creates disproportionate risk relative to the stated purpose.
The tool sends payment-related arguments to an external payment service and logs full request/response details, including headers and payloads. Even if the credential is described as encrypted, verbose logs can expose payment credentials, session identifiers, URLs, and other sensitive transaction metadata to operators, log processors, or compromised observability systems.
The bank-card confirmation flow transmits an SMS verification code to a remote service and the convenience wrapper logs the SMS code in plaintext. SMS OTPs are authentication secrets; exposing them in logs or relaying them without strong consent and handling controls can enable account or payment compromise.
The skill clearly performs network operations against health-booking and payment services, yet it declares no explicit tool scope or permissions. That omission weakens operator visibility and policy enforcement, making it easier for a host agent to grant broader-than-expected network access without informed review.
The trigger conditions are broad enough to activate on general health-related booking or consultation requests, which may pull users into a high-risk workflow involving identity collection and payment before they understand the scope. Overbroad activation increases the chance of unintentional collection of sensitive data in contexts where the user only wanted basic information.
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.
branch_id=branch_id
)
if date_result.success and date_result.result:
date_list = date_result.result.get("dateStampList") or []
return pkg, date_list[:max_dates]
return pkg, []
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.
branch_id=branch_id
)
if date_result.success and date_result.result:
date_list = date_result.result.get("dateStampList") or []
return pkg, date_list[:max_dates]
return pkg, []
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.
branch_id=branch_id
)
if date_result.success and date_result.result:
date_list = date_result.result.get("dateStampList") or []
return pkg, date_list[:max_dates]
return pkg, []
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.
branch_id=branch_id
)
if date_result.success and date_result.result:
date_list = date_result.result.get("dateStampList") or []
return pkg, date_list[:max_dates]
return pkg, []
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.
branch_id=branch_id
)
if date_result.success and date_result.result:
date_list = date_result.result.get("dateStampList") or []
return pkg, date_list[:max_dates]
return pkg, []
The login flow sends a phone number, CAPTCHA-related identifier, and SMS verification code to external endpoints, yet the module contains no explicit privacy disclosure, security warning, or anti-phishing guidance for the user. While common in authentication flows, this is still sensitive credential handling, and agent-mediated collection can make users less aware that their authentication secrets are being relayed to a third-party service.