Back to skill

Security audit

Tcm Dietary Api

Security checks for vulnerabilities and agentic risk

Overview

This is a disclosed remote health-advice API client, but its privacy documentation overstates client-side removal of personal identifiers before sending data off-device.

Review this skill before installing if you may enter personal or medical details. It sends health-related queries to api.tcmplate.com, and you should not rely on the advertised client-side personal-information stripping for text inside symptoms or search keywords; remove names, phone numbers, addresses, IDs, and other identifiers yourself 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 (1)

T09 · Insecure Skill Coding Practices

Warning
Location
core/__init__.py:29
Finding

Documented PII Filtering Does Not Sanitize Values Sent to the Remote API

Content
View full analysis

Vulnerability Details

File Location: core/__init__.py:29-40; affected data flows include core/diagnose.py:44-48 and core/search.py:40-43. The unsupported privacy guarantee appears in SKILL.md:24, SKILL.zh.md:24, and CHANGELOG.md:27.

Vulnerability Type: Inadequate sanitization of sensitive user data and misleading privacy control

Risk Level: Medium

Vulnerable Code

core/__init__.py:29-40:

python
# 字段白名单 — 只发送必要数据, 不在代码层面泄露用户信息
_ALLOWED_FIELDS = {
    "symptoms", "language", "gender",
    "category", "keywords",
    "constitution", "dietary_preference",
    "dish_name", "meal_type", "dishes",
}


def _sanitize_payload(data: dict) -> dict:
    """白名单过滤: 仅允许 API 需要的字段通过, 拦截意外传入的个人信息."""
    if not isinstance(data, dict):
        return data
    return {k: v for k, v in data.items() if k in _ALLOWED_FIELDS}

core/diagnose.py:44-48:

python
    return _api_request("POST", "/api/diagnose", {
        "symptoms": symptoms,
        "language": language,
        "gender": gender,
    })

core/search.py:40-43:

python
    return _api_request("POST", "/api/search", {
        "category": category,
        "keywords": keywords,
    }).get("results", [])

The conflicting statement in SKILL.md:24 says:

markdown
| Data sent | **Only symptom descriptions, constitution types, disease terms, and ingredient names.** A field whitelist at the code level automatically filters out accidentally included personal information (names, ID numbers, addresses, phone numbers, etc.) — these are stripped client-side and never reach the server |

Technical Analysis

_sanitize_payload() only checks the names of top-level dictionary fields. It does not inspect, validate, or redact the values contained in permitted fields such as symptoms and keywords.

Consequently, a value such as:

python
diagnose(["J
...[truncated 2309 chars]
Remediation
View remediation

Remediation Suggestions

  1. Correct the documentation immediately. Remove the assertion that personal identifiers are automatically stripped and state that values inside allowed fields are transmitted verbatim unless a genuine value-level control is implemented.

  2. Implement value-level sanitization if the guarantee is retained. Recursively inspect strings inside lists, dictionaries, and other supported structures. Detect and redact at least explicitly claimed identifier classes, including telephone numbers, identification numbers, email addresses, and postal addresses.

  3. Do not overstate automated name detection. Reliable identification of personal names in free-form multilingual medical text is difficult. If complete removal cannot be guaranteed, disclose the limitation and require users to review data before transmission.

  4. Add strict input validation. Require expected types, reject nested objects where they are unnecessary, impose string and list length limits, and reject malformed input rather than forwarding it.

  5. Add explicit consent at the integration boundary. Before the first remote diagnosis or health-related search, clearly identify the destination, categories of data being transmitted, and the fact that free-form values may contain sensitive information.

  6. Create regression tests. Tests should demonstrate how representative identifiers embedded in symptoms, keywords, disease names, and constitution strings are either redacted or rejected before JSON serialization.

  7. Keep privacy claims aligned across all files. Update SKILL.md, SKILL.zh.md, CHANGELOG.md, function documentation, and release metadata so that they accurately describe the implemented control.

Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • YARA SignaturesMalware Match, Webshell Match, Cryptominer Match
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (23)

YARA rule 'agent_skill_mcp_tool_poisoning_metadata': MCP/tool metadata poisoning indicators in tool schemas or skill manifests [agent_skills]

High
Category
YARA Match
Confidence
80% confidence
Finding

YARA rule matched a hack tool or exploit indicator (offensive tools, reconnaissance, privilege escalation, or exploit frameworks).

Content

Scanner excerpt · SKILL.md (reported line 3)May include surrounding context.

md
---
name: tcm-dietary
description: TCM dietary therapy & syndrome differentiation. Pattern diagnosis, ingredient properties, food therapy plans, and tea recipes via HTTPS API. Free tier: 10 calls/day, no registration. All queries are transmitted to api.tcmplate.com for processing — this is a remote API client, not a local knowledge base. Reference only, not medical advice.
version: 1.0.1
author: 饭去病 (Fan Qu Bing)
license: MIT-0
tags: [tcm, chinese-medicine, dietary-therapy, syndrome-differentiation, wellness, tea, herbs, constitution]
---

# tcm-dietary

**Remote API client, not a local knowledge base.** Al

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

This markdown file contains user-facing natural-language content entirely in Chinese for the substantive sections of the changelog. Under the policy, forcing a specific language without opt-in or a documented regional 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
92% confidence
Finding

The README explicitly instructs users to send symptom data and authenticate to a remote VPS-backed API, but it does not disclose privacy, retention, jurisdiction, or handling expectations for sensitive health-related information. This creates a real security and privacy risk because users or integrating agents may transmit personal medical data to a third-party service without informed consent or appropriate safeguards.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
84% confidence
Finding

The subscription URL and API base URL indicate reliance on an external hosted service, which means data and credentials leave the local environment. In the context of a health-oriented skill, this increases sensitivity because users may reasonably submit medical symptoms without realizing they are sending them to a remote VPS under third-party control.

Content

Scanner excerpt · README.md (reported line 11)May include surrounding context.

md
- **认证**: `Authorization: Bearer <api_key>`
- **免费额度**: 10 次/日(按 IP)
- **付费订阅**: $5/月 PayPal(不限次数)
- **订阅页面**: https://api.tcmplate.com/subscribe

## 核心能力

External Transmission

Medium
Category
Data Exfiltration
Confidence
89% confidence
Finding

The curl example demonstrates transmitting user symptom data and an API key to an external service. External transmission is expected for an API client, but it is still security-relevant because it exposes potentially sensitive health information to a third-party endpoint and normalizes copying secrets into command lines and shell history.

Content

Scanner excerpt · README.md (reported line 41)May include surrounding context.

text

```bash
# curl 调用
curl -X POST https://api.tcmplate.com/api/diagnose \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \

External Transmission

Medium
Category
Data Exfiltration
Confidence
90% confidence
Finding

This example directly posts symptom data to the external diagnose endpoint using bearer-token authentication. Although this is standard API behavior, it is a true security/privacy concern in documentation because it encourages sending sensitive health content to a remote service without any adjacent warning about confidentiality, logging, or data lifecycle.

Content

Scanner excerpt · README.md (reported line 42)May include surrounding context.

bash
# curl 调用
curl -X POST https://api.tcmplate.com/api/diagnose \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"symptoms":["失眠","心悸","健忘"]}'

External Transmission

Medium
Category
Data Exfiltration
Confidence
83% confidence
Finding

The referenced external endpoint is part of the same disclosed cloud service and confirms that the skill depends on outbound network access. By itself this URL mention is not exploit code, but in context it indicates remote transmission of potentially sensitive health-related data to a third party.

Content

Scanner excerpt · SKILL.md (reported line 46)May include surrounding context.

bash
# Syndrome diagnosis — symptoms sent via HTTPS to api.tcmplate.com
# ⚠️ Do not include names, ID numbers, or addresses in symptoms
curl -X POST https://api.tcmplate.com/api/diagnose \
  -H "Content-Type: application/json" \
  -d '{"symptoms":["dry mouth","insomnia","irritability"]}'

External Transmission

Medium
Category
Data Exfiltration
Confidence
83% confidence
Finding

The referenced external endpoint is part of the same disclosed cloud service and confirms that the skill depends on outbound network access. By itself this URL mention is not exploit code, but in context it indicates remote transmission of potentially sensitive health-related data to a third party.

Content

Scanner excerpt · SKILL.md (reported line 46)May include surrounding context.

bash
# Syndrome diagnosis — symptoms sent via HTTPS to api.tcmplate.com
# ⚠️ Do not include names, ID numbers, or addresses in symptoms
curl -X POST https://api.tcmplate.com/api/diagnose \
  -H "Content-Type: application/json" \
  -d '{"symptoms":["dry mouth","insomnia","irritability"]}'

External Transmission

Medium
Category
Data Exfiltration
Confidence
90% confidence
Finding

The search example shows that user-entered keywords are transmitted to the remote API, which can expose sensitive medical interests, conditions, or treatment inquiries. In a health-oriented skill, even seemingly simple search terms may constitute sensitive personal data and therefore increase privacy risk.

Content

Scanner excerpt · SKILL.md (reported line 51)May include surrounding context.

-d '{"symptoms":["dry mouth","insomnia","irritability"]}'

Knowledge search — keywords sent via HTTPS to api.tcmplate.com

curl -X POST https://api.tcmplate.com/api/search
-H "Content-Type: application/json"
-d '{"category":"ingredients","keywords":["ginger"]}'

text

External Transmission

Medium
Category
Data Exfiltration
Confidence
90% confidence
Finding

This URL identifies the external API endpoint used to receive user health-related input, confirming that the skill is not local and that data leaves the user's environment. Even over HTTPS, transmitting symptom data to a remote medical-adjacent service creates confidentiality and compliance risk if users include sensitive or regulated information.

Content

Scanner excerpt · SKILL.zh.md (reported line 46)May include surrounding context.

bash
# 辨证诊断 — 症状通过 HTTPS 发送到 api.tcmplate.com
# ⚠️ 切勿在 symptoms 中包含姓名、身份证号、地址
curl -X POST https://api.tcmplate.com/api/diagnose \
  -H "Content-Type: application/json" \
  -d '{"symptoms":["口干","失眠","心烦"]}'

External Transmission

Medium
Category
Data Exfiltration
Confidence
90% confidence
Finding

This URL identifies the external API endpoint used to receive user health-related input, confirming that the skill is not local and that data leaves the user's environment. Even over HTTPS, transmitting symptom data to a remote medical-adjacent service creates confidentiality and compliance risk if users include sensitive or regulated information.

Content

Scanner excerpt · SKILL.zh.md (reported line 46)May include surrounding context.

bash
# 辨证诊断 — 症状通过 HTTPS 发送到 api.tcmplate.com
# ⚠️ 切勿在 symptoms 中包含姓名、身份证号、地址
curl -X POST https://api.tcmplate.com/api/diagnose \
  -H "Content-Type: application/json" \
  -d '{"symptoms":["口干","失眠","心烦"]}'

External Transmission

Medium
Category
Data Exfiltration
Confidence
88% confidence
Finding

The search endpoint also sends user-entered keywords to a third-party server, and those keywords may contain disease names, symptoms, or other sensitive health context. In a medical or wellness skill, such external transmission is more dangerous than ordinary web lookup because it can reveal a person's conditions or concerns even without direct identifiers.

Content

Scanner excerpt · SKILL.zh.md (reported line 51)May include surrounding context.

-d '{"symptoms":["口干","失眠","心烦"]}'

知识检索 — 关键词通过 HTTPS 发送到 api.tcmplate.com

curl -X POST https://api.tcmplate.com/api/search
-H "Content-Type: application/json"
-d '{"category":"ingredients","keywords":["生姜"]}'

text

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The file’s natural-language documentation is entirely in Chinese and presents the skill as if that locale is mandatory, with no opt-in or alternative language guidance. Under the policy, forcing a specific language without user choice is a natural-language locale violation unless the restriction is explicitly justified.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 98)May include surrounding context.

md
core.set_api_key("tcm_xxxx")  # 付费 $5/月, 不限次数

API Base: https://api.tcmplate.com
Subscribe: https://api.tcmplate.com/subscribe
Privacy: https://tcmplate.com/privacy
"""

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 117)May include surrounding context.

md
core.set_api_key("tcm_xxxx")  # 付费 $5/月, 不限次数

API Base: https://api.tcmplate.com
Subscribe: https://api.tcmplate.com/subscribe
Privacy: https://tcmplate.com/privacy
"""

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 118)May include surrounding context.

md
core.set_api_key("tcm_xxxx")  # 付费 $5/月, 不限次数

API Base: https://api.tcmplate.com
Subscribe: https://api.tcmplate.com/subscribe
Privacy: https://tcmplate.com/privacy
"""

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.zh.md (reported line 94)May include surrounding context.

md
core.set_api_key("tcm_xxxx")  # 付费 $5/月, 不限次数

API Base: https://api.tcmplate.com
Subscribe: https://api.tcmplate.com/subscribe
Privacy: https://tcmplate.com/privacy
"""

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · core/__init__.py (reported line 15)May include surrounding context.

python
core.set_api_key("tcm_xxxx")  # 付费 $5/月, 不限次数

API Base: https://api.tcmplate.com
Subscribe: https://api.tcmplate.com/subscribe
Privacy: https://tcmplate.com/privacy
"""

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The function signature sets language: str = "zh" as the default, which causes the skill to use Chinese unless the caller explicitly overrides it. This is a natural-language policy concern because it imposes a specific language by default rather than prompting for or preserving user preference.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The top-level docstring presents the skill description and usage entirely in Chinese, which can constitute a language policy violation when no user opt-in or language choice is provided. The file gives no indication that Chinese is optional or that the skill is region-specific.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The file's human-facing docstrings and usage guidance are entirely in Chinese, which imposes a specific language on users without offering an alternative or documenting a justified locale restriction. This matches the policy category for language or locale constraints presented without user opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
80% confidence
Finding

A language-only presentation can violate language/locale policy when it implicitly forces a specific language without user opt-in. This README does not offer an alternate language, user choice, or justification that the skill is intentionally limited to a Chinese-language audience.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The module docstring and function docstrings are written in Chinese, including the user-facing privacy warnings. This can violate a language/locale policy when the skill does not offer user opt-in or indicate that it is intentionally restricted to a Chinese-speaking or region-specific audience.

Content

No source excerpt is available for this finding.