Back to skill

Security audit

Livestock Fever Detection | 畜禽体温异常检测

Security checks for vulnerabilities and agentic risk

Overview

The skill does perform livestock image/video analysis through a cloud API, but it also has under-scoped identity and token handling that could let a caller operate under another account identity.

Review this skill carefully before installing. It sends media and report queries to lifeemergence.com services, creates or reuses a local identity, and can persist account tokens in a workspace SQLite database. Do not use it in a shared workspace or with sensitive farm imagery unless the publisher removes or tightly protects the hidden identity override, documents token retention, and confirms server-side authorization for history/report access.

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_livestock_fever_detection_analysis.py:43
Finding

Caller-Controlled Identity Enables Unauthorized Account Impersonation

Content
View full analysis

Vulnerability Details

File Location: scripts/smyx_livestock_fever_detection_analysis.py:43,57; skills/smyx_common/scripts/util.py:464-477,548-562,576-612
Vulnerability Type: Improper authentication and caller-controlled identity selection
Risk Level: High

Complete Code Snippets

scripts/smyx_livestock_fever_detection_analysis.py:43,57

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

# ...

OpenIdUtil.resolve_current_open_id(args.open_id, use_current=bool(args.open_id))

skills/smyx_common/scripts/util.py:464-477

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 ConstantEnum.CURRENT__USER_NAME:
        ConstantEnum.CURRENT__USER_NAME = resolved_open_id
    return resolved_open_id

skills/smyx_common/scripts/util.py:548-562

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 _response.status_code == 200:
            _response_json = _response.json()
            if _response_json and _response_json.get("success"):
                return _response_json and _response_json.get("result")

skills/smyx_common/scripts/util.py:576-612

python
i
...[truncated 4538 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove caller-controlled identity selection

    • Remove the --open-id CLI argument from the ordinary entry point.
    • Do not treat hiding an argument with argparse.SUPPRESS as an access-control mechanism.
  2. Bind identity to authenticated platform context

    • Obtain the identity only from a trusted, authenticated upstream context.
    • Cryptographically bind that identity to the current request or session.
    • Reject conflicting identity values supplied through CLI arguments, environment variables, or mutable workspace files.
  3. Harden server-side authentication

    • Do not issue bearer tokens solely from a caller-supplied openId or mobile value.
    • Require signed platform assertions, a one-time challenge, or another verifiable proof of identity ownership.
    • Separate account registration from authentication and prohibit silent registration from authenticating an existing account.
  4. Constrain operational overrides

    • If identity overrides are required for administration, place them behind a separate privileged interface.
    • Require explicit administrator authentication, use an allowlist of permitted identities, and record an audit event for every override.
  5. Protect and scope tokens

    • Scope issued tokens to the minimum required scene and operations.
    • Avoid storing tokens for different identities in a broadly shared workspace database.
    • Apply restrictive file permissions, token expiration, rotation, and revocation.
    • Clear cached tokens when the authenticated platform identity changes.
  6. Enforce backend ownership checks

    • Historical-report and analysis-result endpoints must independently verify that each requested record belongs to the authenticated principal.
    • Do not rely only on client-supplied fields such as pnaUserName, openId, or tenant metadata.
Vulnerability Patterns
  • 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
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (52)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

This finding aggregates multiple undeclared high-risk behaviors: external API communication, authentication handling, user identity creation/retrieval, local file and directory operations, local database interaction, and workspace management, with no evidence of actual image/thermal analysis. In the context of a health-themed skill, that mismatch is especially dangerous because it can conceal data exfiltration, persistence, and account-scoped access behind a misleading benign purpose.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

This finding aggregates multiple undeclared high-risk behaviors: external API communication, authentication handling, user identity creation/retrieval, local file and directory operations, local database interaction, and workspace management, with no evidence of actual image/thermal analysis. In the context of a health-themed skill, that mismatch is especially dangerous because it can conceal data exfiltration, persistence, and account-scoped access behind a misleading benign purpose.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

This finding aggregates multiple undeclared high-risk behaviors: external API communication, authentication handling, user identity creation/retrieval, local file and directory operations, local database interaction, and workspace management, with no evidence of actual image/thermal analysis. In the context of a health-themed skill, that mismatch is especially dangerous because it can conceal data exfiltration, persistence, and account-scoped access behind a misleading benign purpose.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

This finding aggregates multiple undeclared high-risk behaviors: external API communication, authentication handling, user identity creation/retrieval, local file and directory operations, local database interaction, and workspace management, with no evidence of actual image/thermal analysis. In the context of a health-themed skill, that mismatch is especially dangerous because it can conceal data exfiltration, persistence, and account-scoped access behind a misleading benign purpose.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

This finding aggregates multiple undeclared high-risk behaviors: external API communication, authentication handling, user identity creation/retrieval, local file and directory operations, local database interaction, and workspace management, with no evidence of actual image/thermal analysis. In the context of a health-themed skill, that mismatch is especially dangerous because it can conceal data exfiltration, persistence, and account-scoped access behind a misleading benign purpose.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

This finding aggregates multiple undeclared high-risk behaviors: external API communication, authentication handling, user identity creation/retrieval, local file and directory operations, local database interaction, and workspace management, with no evidence of actual image/thermal analysis. In the context of a health-themed skill, that mismatch is especially dangerous because it can conceal data exfiltration, persistence, and account-scoped access behind a misleading benign purpose.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

This finding aggregates multiple undeclared high-risk behaviors: external API communication, authentication handling, user identity creation/retrieval, local file and directory operations, local database interaction, and workspace management, with no evidence of actual image/thermal analysis. In the context of a health-themed skill, that mismatch is especially dangerous because it can conceal data exfiltration, persistence, and account-scoped access behind a misleading benign purpose.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

This finding aggregates multiple undeclared high-risk behaviors: external API communication, authentication handling, user identity creation/retrieval, local file and directory operations, local database interaction, and workspace management, with no evidence of actual image/thermal analysis. In the context of a health-themed skill, that mismatch is especially dangerous because it can conceal data exfiltration, persistence, and account-scoped access behind a misleading benign purpose.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

This finding aggregates multiple undeclared high-risk behaviors: external API communication, authentication handling, user identity creation/retrieval, local file and directory operations, local database interaction, and workspace management, with no evidence of actual image/thermal analysis. In the context of a health-themed skill, that mismatch is especially dangerous because it can conceal data exfiltration, persistence, and account-scoped access behind a misleading benign purpose.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

This finding aggregates multiple undeclared high-risk behaviors: external API communication, authentication handling, user identity creation/retrieval, local file and directory operations, local database interaction, and workspace management, with no evidence of actual image/thermal analysis. In the context of a health-themed skill, that mismatch is especially dangerous because it can conceal data exfiltration, persistence, and account-scoped access behind a misleading benign purpose.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

This finding aggregates multiple undeclared high-risk behaviors: external API communication, authentication handling, user identity creation/retrieval, local file and directory operations, local database interaction, and workspace management, with no evidence of actual image/thermal analysis. In the context of a health-themed skill, that mismatch is especially dangerous because it can conceal data exfiltration, persistence, and account-scoped access behind a misleading benign purpose.

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-livestock-fever-detection-analysis"
description: "Detects abnormal body temperature rise or drop in livestock and poultry from thermal or visible-light imagery, and outputs fever/hypothermia early warnings based on visual thermal features. | 通过热成像或视觉特征识别畜禽体温异常,预警发热。"
version: "1.0.16"
license: "MIT-0"
---

# 🌡️ Livestock Fever & Hypothermia Detection | 畜禽体温异常检测

> 通过热成像或视觉特征识别畜禽体温异常,预警发热。
>
> **群体体温预警中枢** · 热成像/可见光智能分析 · 个体体温异常识别 · 早期发热预警 · 历史

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest describes detection from thermal or visible-light imagery, which implies image analysis. The code explicitly requires a local video path or network video URL and sends it as "videoUrl", indicating the implemented behavior analyzes videos rather than just imagery as described.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The implementation materially diverges from the stated purpose of livestock/poultry fever detection and instead performs generic video analysis through an opaque backend call. This kind of capability mismatch is dangerous because it can conceal broader data processing or unauthorized functionality behind a benign-looking skill description, undermining user consent and review controls.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The file defines generic user/account persistence, including account lookup and default-user selection, which is materially unrelated to a livestock fever detection skill. In this context, hidden identity-management functionality increases the attack surface and suggests collection or retention of user data beyond the declared purpose, making the mismatch more dangerous than it would be in an account-management skill.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The User model stores personal/account attributes and bearer-style secrets such as token and open_token without any justification tied to livestock fever analysis. In this skill context, collecting and retaining authentication tokens is especially dangerous because compromise of the local database could expose credentials unrelated to the stated function.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The code automatically derives an identity from workspace files, global state, or a local database, and if none exists it generates and stores a default user identity for future reuse. This allows the skill to act under an implicit or recycled identity without user approval, which can lead to impersonation, unauthorized actions, and hard-to-audit attribution across agent workspaces.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

This utility code performs unrelated account provisioning, token acquisition, and persistence of authenticated user data inside a skill whose stated purpose is livestock fever detection. That creates covert identity/bootstrap behavior and unexpected external service access, expanding the trust boundary well beyond image analysis and enabling unauthorized account use or hidden backend interactions.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding

The skill declares powerful capabilities such as shell execution, network access, and local file read/write, but does not scope or disclose them via explicit permissions metadata. This weakens least-privilege controls and makes it harder for the host agent or reviewer to understand what the skill can actually do, increasing the chance of unsafe execution or unintended data access.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The history-report trigger phrases are broad enough that normal conversation may unintentionally invoke account-scoped report retrieval. Because the skill also associates results with internal identity, accidental triggering could expose private historical records or cause unexpected remote queries without clear user intent.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill states that uploaded attachments are automatically saved locally, but does not clearly warn the user about this storage behavior at the point of use. For potentially sensitive agricultural or operational imagery, silent local persistence increases privacy, retention, and unauthorized-access risk.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The returned analysis header is hard-coded in Chinese ("畜禽体温异常检测结构化结果") with no indication that the skill is region-specific or that users can choose their preferred language. This is a natural-language policy concern because it imposes a specific language/locale on all users without opt-in.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The script exposes a history-report retrieval path via --list and show_analyze_list(open_id, ...), which is outside the declared purpose of analyzing input imagery for fever detection. If backend authorization is weak or CURRENT__OPEN_ID can be influenced, this creates an unnecessary data-access surface that could expose prior analysis records or metadata to unauthorized users.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The argument parser description and help text are presented only in Chinese, and the runtime status/error messages are likewise Chinese-only. This imposes a specific language on all users without opt-in or any documented justification for a locale restriction, which matches the language-policy violation criteria.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The manifest and CLI description repeatedly frame the tool as detecting abnormal temperature in livestock and poultry. However, the documented and enforced category choices are 'cat', 'dog', and 'other', which actively contradict the stated target species and indicate the implementation is oriented toward pets rather than livestock.

Content

No source excerpt is available for this finding.

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