Back to skill

Security audit

TCM Constitution Identification & Analysis Tool | 中医体质识别分析工具

Security checks for vulnerabilities and agentic risk

Overview

This skill performs the advertised face-based TCM analysis, but it also handles sensitive identity, account, token, and cloud report history flows in ways that are too automatic and under-scoped for health-related facial data.

Review this skill before installing if you will use real facial images or personal health information. It contacts external lifeemergence.com services, may create or reuse an account automatically, stores identity/token data locally, and can fetch cloud-stored historical reports automatically from trigger phrases. Install only if you trust that service with facial media, derived health assessments, and account-linked report history.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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)

T05 · Unauthorized Access and Privilege Escalation

Error
Location
scripts/tcm_constitution_recognition_analysis.py:43
Finding

Unverified caller-supplied identity enables access to another user's health reports

Content
View full analysis

Vulnerability Details

File Location: scripts/tcm_constitution_recognition_analysis.py:43-60; skills/smyx_common/scripts/util.py:452-470, 550-565, 576-604
Vulnerability Type: Improper authentication and user-identity impersonation
Risk Level: High

Vulnerable Code

scripts/tcm_constitution_recognition_analysis.py:43-60:

python
parser.add_argument("--open-id", required=False, help=argparse.SUPPRESS)
parser.add_argument("--list", action='store_true', help="显示中医体质识别分析列表清单")
parser.add_argument("--api-url", help="服务端API地址")
parser.add_argument("--api-key", help=argparse.SUPPRESS)
parser.add_argument("--output", help="结果输出文件路径")
parser.add_argument("--detail", choices=["basic", "standard", "json"],
                    default=ConstantEnum.DEFAULT__OUTPUT_LEVEL,
                    help="输出详细程度")
parser.add_argument("--export-env-only", action='store_true',
                    help="仅输出 export 命令设置环境变量,不执行分析")

args = parser.parse_args()

try:
    # 初始化内部用户身份;不要求用户输入,也不在帮助信息中展示。
    OpenIdUtil.resolve_current_open_id(args.open_id, use_current=bool(args.open_id))

    # 检查必需参数
    if args.list:
        open_id = ConstantEnum.CURRENT__OPEN_ID
        result = show_analyze_list(open_id)
        print(result)
        exit(0)

skills/smyx_common/scripts/util.py:452-470:

python
@classmethod
def resolve_current_open_id(cls, open_id=None, use_current=True):
    """解析并初始化当前 open-id,返回最终使用值。"""
    resolved_open_id = (open_id or "").strip() if isinstance(open_id, str) else open_id
    if not resolved_open_id and use_current:
        resolved_open_id = ConstantEnum.CURRENT__OPEN_ID or ConstantEnum.CURRENT__USER_NAME
    if not resolved_open_id:
        resolved_open_id = cls.get_api_key_file_open_id()
    if not resolved_open_id:
        resolved_open_id = cls.get_or_create_default_open_id()

    ConstantEnum.CURRENT__OPEN_ID = resolved_open_id
    if not Const
...[truncated 5047 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove or strictly disable the caller-controlled --open-id option in production entry points.
  2. Accept user identity only from a trusted upstream authentication context carrying a cryptographically signed assertion.
  3. Verify the assertion's signature, issuer, audience, expiration, nonce, and intended Skill before assigning CURRENT__OPEN_ID.
  4. Never authenticate or issue tokens solely from an openId or mobile value supplied by the client. Require a proper login credential, one-time challenge, or trusted service-to-service credential.
  5. Bind report-list and analysis operations to the subject encoded in the authenticated token. The server must ignore or reject client-provided identities that differ from that subject.
  6. Disable silent registration during report access and separate account creation from authentication.
  7. Partition or encrypt locally cached tokens and ensure cached credentials cannot be selected solely by a caller-provided username.
  8. Add server-side authorization tests confirming that one authenticated user cannot list, retrieve, or create reports under another user's Open ID.
  9. Log rejected identity mismatches without recording complete identifiers or authentication tokens.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • YARA SignaturesMalware Match, Webshell Match, Cryptominer Match
Findings (58)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Authenticated external requests, automatic account lookup/creation, token management, local open-id/API-key file reads, and local user-record access are highly security-relevant behaviors absent from the stated purpose. In a facial-health-analysis context, undisclosed identity and token handling can expose personal data, create unauthorized accounts, or allow cross-user access to historical reports.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

Authenticated external requests, automatic account lookup/creation, token management, local open-id/API-key file reads, and local user-record access are highly security-relevant behaviors absent from the stated purpose. In a facial-health-analysis context, undisclosed identity and token handling can expose personal data, create unauthorized accounts, or allow cross-user access to historical reports.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

Authenticated external requests, automatic account lookup/creation, token management, local open-id/API-key file reads, and local user-record access are highly security-relevant behaviors absent from the stated purpose. In a facial-health-analysis context, undisclosed identity and token handling can expose personal data, create unauthorized accounts, or allow cross-user access to historical reports.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Authenticated external requests, automatic account lookup/creation, token management, local open-id/API-key file reads, and local user-record access are highly security-relevant behaviors absent from the stated purpose. In a facial-health-analysis context, undisclosed identity and token handling can expose personal data, create unauthorized accounts, or allow cross-user access to historical reports.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Authenticated external requests, automatic account lookup/creation, token management, local open-id/API-key file reads, and local user-record access are highly security-relevant behaviors absent from the stated purpose. In a facial-health-analysis context, undisclosed identity and token handling can expose personal data, create unauthorized accounts, or allow cross-user access to historical reports.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Authenticated external requests, automatic account lookup/creation, token management, local open-id/API-key file reads, and local user-record access are highly security-relevant behaviors absent from the stated purpose. In a facial-health-analysis context, undisclosed identity and token handling can expose personal data, create unauthorized accounts, or allow cross-user access to historical reports.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Authenticated external requests, automatic account lookup/creation, token management, local open-id/API-key file reads, and local user-record access are highly security-relevant behaviors absent from the stated purpose. In a facial-health-analysis context, undisclosed identity and token handling can expose personal data, create unauthorized accounts, or allow cross-user access to historical reports.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Authenticated external requests, automatic account lookup/creation, token management, local open-id/API-key file reads, and local user-record access are highly security-relevant behaviors absent from the stated purpose. In a facial-health-analysis context, undisclosed identity and token handling can expose personal data, create unauthorized accounts, or allow cross-user access to historical reports.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Authenticated external requests, automatic account lookup/creation, token management, local open-id/API-key file reads, and local user-record access are highly security-relevant behaviors absent from the stated purpose. In a facial-health-analysis context, undisclosed identity and token handling can expose personal data, create unauthorized accounts, or allow cross-user access to historical reports.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Authenticated external requests, automatic account lookup/creation, token management, local open-id/API-key file reads, and local user-record access are highly security-relevant behaviors absent from the stated purpose. In a facial-health-analysis context, undisclosed identity and token handling can expose personal data, create unauthorized accounts, or allow cross-user access to historical reports.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Authenticated external requests, automatic account lookup/creation, token management, local open-id/API-key file reads, and local user-record access are highly security-relevant behaviors absent from the stated purpose. In a facial-health-analysis context, undisclosed identity and token handling can expose personal data, create unauthorized accounts, or allow cross-user access to historical reports.

Content

No source excerpt is available for this finding.

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-constitution-recognition-analysis"
description: "Determines nine TCM constitution types including Yin deficiency, Yang deficiency, Qi deficiency, phlegm-dampness, and blood stasis through facial features and physical signs, and provides personalized health preservation and conditioning suggestions. | 中医体质识别分析技能,通过面部特征与体征判别阴虚、阳虚、气虚、痰湿、血瘀等九种中医体质类型,给出个性化养生调理建议"
version: "1.0.19"
license: "MIT-0"
---

# 🧘 TCM Constitution Identification & Analysis Tool | 中医体质识别分析工具

> **AI 中医面诊体质识别

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The description invites upload of facial images and videos for external AI processing but does not prominently warn about privacy risks, remote transmission, retention, or third-party handling. Facial media and inferred health information are highly sensitive, so omission of this warning undermines informed consent and can lead to serious privacy harm.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The implementation accepts both local files and arbitrary video URLs, which materially expands the skill's actual data-handling behavior beyond the manifest's narrow constitution-analysis description. This creates a scope mismatch that can mislead users and reviewers about what inputs are accepted and what data may be transmitted to backend analysis services.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The implementation behaves as a generic video analysis/history retrieval CLI, while the manifest claims it performs TCM constitution recognition from facial and physical signs. This kind of capability mismatch is dangerous because users, reviewers, or higher-level orchestration may grant the skill access or trust based on the declared medical purpose, while the code actually routes arbitrary local paths or URLs into a different analysis backend and exposes history retrieval functionality.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The utility layer performs remote account provisioning, token acquisition/storage, and payment-upsell handling that are unrelated to a TCM constitution analysis skill. This creates hidden side effects: invoking the skill can register users, transmit identifiers, persist tokens locally, and steer users toward a billing flow without clear consent or scope justification.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
84% confidence
Finding

The skill declares no explicit tool scope despite instructing use of shell, file, network, environment, and local storage capabilities. In an agent setting, missing scope boundaries can let the skill exercise more privileges than users or reviewers expect, increasing the blast radius of prompt misuse or implementation flaws.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

Broad history-query trigger phrases can cause the agent to retrieve cloud-hosted historical health reports when the user did not clearly request that action. Because those reports are identity-linked and health-related, accidental triggering can disclose sensitive past analyses or expand data processing unexpectedly.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill documents cloud retrieval of historical reports only operationally, not as a privacy-sensitive behavior requiring warning and consent. Users may not realize prior health-analysis reports are stored remotely and fetched automatically, which creates unexpected exposure and compliance risk.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

Automatic history-query behavior tied to ambiguous phrases is unsafe in a skill dealing with sensitive facial and health information. It increases the chance of unintentional remote data access and may surface reports tied to an internal identity without informed user intent.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This Python file contains a user-facing string literal, "📊 中医体质识别分析结构化结果", with no indication that the language is configurable or chosen by the user. Per the policy, forcing a specific language without opt-in is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill claims to perform constitution analysis on provided media, but it also exposes a separate record-listing capability tied to internal user identity. This creates an undocumented data-access surface that could reveal prior sensitive health-related analysis results, and the hidden nature of the option increases the risk of unauthorized or surprising access.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The argparse description and help text are presented only in Chinese, and the script later prints user-facing status and error messages only in Chinese as well. For a general-purpose tool, this is a language/locale policy issue because the file imposes a specific language without opt-in or justification.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The code initializes an internal OpenID-based identity context even though the advertised function is simple media-based constitution recognition. Binding execution to hidden identity state can enable access to user-linked history or backend resources without clear user awareness, especially when combined with the list feature and health-related outputs.

Content

No source excerpt is available for this finding.

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
70% confidence
Finding

Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Content

Scanner excerpt · skills/smyx_analysis/scripts/skill.py (reported line 28)May include surrounding context.

python
result_json = JsonUtil.parse(result_json_pure_text, result_json_pure_text)

        result_json_common_ai_response = result_json.get("commonAiResponse") if isinstance(result_json,
                                                                                           dict) else result_json
        if result_json_common_ai_response:
            result_json = result_json_common_ai_response

Static analysis

Detected: suspicious.install_untrusted_source

Install source points to URL shortener or raw IP.

Warn
Code
suspicious.install_untrusted_source
Location
skills/smyx_common/scripts/config-dev.yaml:2