Back to skill

Security audit

Dementia Confusion / Disorientation Recognition and Orientation Soothing | 失智老人困惑/迷惘识别与定向安抚

Security checks for vulnerabilities and agentic risk

Overview

This skill handles sensitive dementia-care media through cloud analysis, but it silently manages identity, account login, and token persistence in ways users should review before installing.

Install only if you are comfortable sending dementia-care audio/video or URLs to the listed external cloud services and allowing the skill to create/reuse a local identity, register/login silently, cache tokens locally, and retrieve cloud history. For real care deployments, require explicit consent, clear retention/deletion rules, tenant/identity controls, and human review of any soothing or escalation workflow.

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/smyx_dementia_confusion_orientation_analysis.py:55
Finding

Unverified Caller-Controlled Identity Enables Cloud Account Impersonation and Report Access

Content
View full analysis

Vulnerability Details

File Location: scripts/smyx_dementia_confusion_orientation_analysis.py:55, 64-69; skills/smyx_common/scripts/util.py:453-466, 550-565, 578-612
Vulnerability Type: Improper authentication and identity binding
Risk Level: High

Vulnerable Code

scripts/smyx_dementia_confusion_orientation_analysis.py:55, 64-69

python
parser.add_argument("--open-id", required=False, help=argparse.SUPPRESS)

args = parser.parse_args()

try:
    # Initialize the internal user identity.
    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:453-466

python
@classmethod
def resolve_current_open_id(cls, open_id=None, use_current=True):
    """Resolve and initialize the current 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 ConstantEnum.CURRENT__USER_NAME:
        ConstantEnum.CURRENT__USER_NAME = resolved_open_id
    return resolved_open_id

skills/smyx_common/scripts/util.py:550-565, 578-612

python
def _get_or_create_user(username):
    _url = ApiEnum.BASE_URL_HEALTH + "/sys/phoneLogin"
    open_id = username
    _data = {
        "silent": 1,
        "register": 1,
        "openId": open_id,
        "mobile": username,
        "source": ConstantEnum.DEFAULT__SKILL_HUB_NAME
    }
    try:
        _response = requests.post(_url, json=_data)
        if _respons
...[truncated 4521 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove the caller-controlled --open-id option from the public entry point. Suppressing it from help output is not a security boundary.
  2. Derive identity only from an authenticated upstream runtime context whose integrity the Skill can verify.
  3. Require a cryptographically signed identity assertion, short-lived authorization code, or equivalent proof bound to the current user and Skill invocation.
  4. Do not use a username, mobile number, or open ID as both the account identifier and proof of authentication.
  5. Disable identifier-only silent login and automatic registration on the server. Registration and login should require an independently verified factor.
  6. Enforce resource ownership and tenant isolation on every analysis, result, and report-list endpoint, regardless of client-supplied identity fields.
  7. Bind issued tokens to the authenticated principal, intended client, tenant, and permitted scopes.
  8. Reject attempts to switch identities while cached credentials exist unless full re-authentication succeeds.
  9. Avoid storing bearer tokens in a broadly shared workspace database. Use an operating-system credential store or a protected per-principal token store with restrictive permissions and expiry handling.
  10. Add negative authorization tests verifying that one identity cannot list, retrieve, submit, or poll resources belonging to another identity.
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 (53)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill appears to perform remote API communication, authentication/token handling, local file and directory operations, and identity resolution while claiming only camera/microphone confusion detection. In a dementia-care setting, that hidden data flow is especially dangerous because the inputs are likely to contain highly sensitive health-adjacent audio/video, identity-linked reports, and caregiver interactions involving vulnerable adults.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill appears to perform remote API communication, authentication/token handling, local file and directory operations, and identity resolution while claiming only camera/microphone confusion detection. In a dementia-care setting, that hidden data flow is especially dangerous because the inputs are likely to contain highly sensitive health-adjacent audio/video, identity-linked reports, and caregiver interactions involving vulnerable adults.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill appears to perform remote API communication, authentication/token handling, local file and directory operations, and identity resolution while claiming only camera/microphone confusion detection. In a dementia-care setting, that hidden data flow is especially dangerous because the inputs are likely to contain highly sensitive health-adjacent audio/video, identity-linked reports, and caregiver interactions involving vulnerable adults.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill appears to perform remote API communication, authentication/token handling, local file and directory operations, and identity resolution while claiming only camera/microphone confusion detection. In a dementia-care setting, that hidden data flow is especially dangerous because the inputs are likely to contain highly sensitive health-adjacent audio/video, identity-linked reports, and caregiver interactions involving vulnerable adults.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill appears to perform remote API communication, authentication/token handling, local file and directory operations, and identity resolution while claiming only camera/microphone confusion detection. In a dementia-care setting, that hidden data flow is especially dangerous because the inputs are likely to contain highly sensitive health-adjacent audio/video, identity-linked reports, and caregiver interactions involving vulnerable adults.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill appears to perform remote API communication, authentication/token handling, local file and directory operations, and identity resolution while claiming only camera/microphone confusion detection. In a dementia-care setting, that hidden data flow is especially dangerous because the inputs are likely to contain highly sensitive health-adjacent audio/video, identity-linked reports, and caregiver interactions involving vulnerable adults.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill appears to perform remote API communication, authentication/token handling, local file and directory operations, and identity resolution while claiming only camera/microphone confusion detection. In a dementia-care setting, that hidden data flow is especially dangerous because the inputs are likely to contain highly sensitive health-adjacent audio/video, identity-linked reports, and caregiver interactions involving vulnerable adults.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill appears to perform remote API communication, authentication/token handling, local file and directory operations, and identity resolution while claiming only camera/microphone confusion detection. In a dementia-care setting, that hidden data flow is especially dangerous because the inputs are likely to contain highly sensitive health-adjacent audio/video, identity-linked reports, and caregiver interactions involving vulnerable adults.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill appears to perform remote API communication, authentication/token handling, local file and directory operations, and identity resolution while claiming only camera/microphone confusion detection. In a dementia-care setting, that hidden data flow is especially dangerous because the inputs are likely to contain highly sensitive health-adjacent audio/video, identity-linked reports, and caregiver interactions involving vulnerable adults.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill appears to perform remote API communication, authentication/token handling, local file and directory operations, and identity resolution while claiming only camera/microphone confusion detection. In a dementia-care setting, that hidden data flow is especially dangerous because the inputs are likely to contain highly sensitive health-adjacent audio/video, identity-linked reports, and caregiver interactions involving vulnerable adults.

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: "smyx-dementia-confusion-orientation-analysis"
description: "Through fixed cameras (and optional microphones) in dementia care facilities or homes, the system analyzes behaviors of people with dementia to identify confusion/disorientation states: sudden activity stops (interrupting ongoing actions such as eating or walking for ≥ 5 seconds), gaze drifting (eyes wandering without focus), looking around (frequent head turning), and repeated disorientation questions ('Where is this?'. | 通过失智照护机构或家庭固定摄像头(及可选麦克风),分析失智老人的行为,识别困惑/迷惘状态:突然停止活动(中

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The request helper performs token discovery, automatic account lookup/registration, token caching, and authenticated external API calls far beyond the manifest's described behavior-analysis scope. Because this is a dementia-care monitoring skill handling highly sensitive contexts, hidden account and token management materially increases the attack surface and enables undisclosed external linkage of care data to remote services.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The helper silently calls a phoneLogin endpoint with register=1 and user-derived identifiers, creating or logging into an external account without explicit user action. In the context of a dementia-care skill, that is especially dangerous because it can create undisclosed remote identities tied to a vulnerable population and facilitate unauthorized data association or service enrollment.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill declares no explicit tool scope or permission boundaries despite documented behaviors that require shell execution, network access, local file storage, and identity handling. This is dangerous because it leaves the agent with broad implicit authority, increasing the chance of unintended command execution, file access, or exfiltration of sensitive care data.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The default trigger is broad enough to auto-invoke on many dementia-related audio/video requests, potentially causing sensitive files to be processed or uploaded without a clearly scoped user intent. In this context, overbroad auto-invocation increases the risk of accidental disclosure of patient footage and behavioral data.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

Broad automatic keywords for history-report retrieval can cause unintended access to longitudinal records that may contain sensitive behavioral and identity-linked information. In a dementia-care setting, accidental retrieval of historical reports is particularly harmful because it can reveal health-adjacent patterns, caregiver relationships, and facility details.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The workflow says uploaded attachments are automatically saved locally, but this is not prominently disclosed as a user warning in a skill handling sensitive elderly-care audio/video. Silent local persistence increases the risk of unauthorized retention, secondary access, and noncompliance with the skill's own privacy claims.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The API document is entirely Chinese and does not indicate any locale negotiation, multilingual support, or operator language choice. In a dementia-care safety workflow, language exclusivity can cause caregivers or integrators to misunderstand alerts, consent requirements, red-line constraints, or soothing-action behavior, increasing the chance of unsafe operation and improper handling of sensitive monitoring data.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The file header comment is written entirely in Chinese ("失智老人困惑/迷惘识别与定向安抚工具配置文件"), which indicates a fixed language choice in user- or operator-facing natural language. There is no surrounding indication that the skill offers language selection or that the locale restriction is documented as intentional and justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Line L17 hard-codes the output heading in Chinese ("失智老人困惑/迷惘识别与定向安抚结构化结果") with no indication that language selection is configurable or user-driven. This creates a natural-language locale policy concern because the skill appears to enforce a specific language without opt-in or justification.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The function exposed as dementia confusion/orientation analysis still uses generic pet-oriented parameters and shared defaults, which indicates capability/intent mismatches between what users are told and what the code is likely doing. In a healthcare setting, this can cause operators to rely on inaccurate or mis-scoped analysis for vulnerable people, creating safety, privacy, and compliance risks even if no classic code-execution bug exists.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The code initializes an internal user identity through OpenIdUtil without clear disclosure in the user-facing interface. Hidden identity binding in a tool handling dementia-related monitoring data can enable silent attribution, access to historical records, or data processing under an identity the user did not knowingly select, raising privacy and authorization concerns.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The script claims it will detect confusion signals and trigger orientation soothing, but the visible behavior only performs analysis/list retrieval and prints output. In a dementia-care context, overstating intervention capabilities is dangerous because caregivers may assume automated soothing or escalation occurs when it does not, delaying human response.

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

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 33)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