Back to skill

Security audit

Body Size/Weight Estimation | 畜禽体长/体重估测

Security checks for vulnerabilities and agentic risk

Overview

ClawScan marked this skill suspicious because it reports account and credential handling, broad side effects, and behavior that appears unrelated to its stated livestock-estimation purpose.

Consider avoiding installation until the account registration, identity and token handling, and shared-account behavior are clarified. The findings also report incomplete analysis because one referenced local path could not be resolved; that leaves some evidence incomplete, despite all listed components being scanned.

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
scripts/smyx_body_size_weight_estimation_analysis.py
Finding

Default initialization discards the upstream sender identity and reuses a workspace-wide account

Content
View full analysis

Impact

A second user can receive the first user's default-account report history and report links; subsequent analyses are also associated with the shared account. This is a client-side account mix-up, not a claim that the remote service fails to validate 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
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (23)

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The supplied chunk contains no video processing, animal measurement, weight estimation, or fattening-progress tracking. Database persistence could support the declared task, but this implementation specifically manages user identities, personal information, and tokens, with no demonstrated connection to livestock analysis. These account-management capabilities are not represented in the description. The chunk does not show network transmission, token use, or malicious behavior; the mismatch concerns its implemented purpose and stored data.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
91% confidence
Finding

The visible implementation does not substantiate the declared livestock-analysis purpose. No external command actually executes, so the commented-out agent invocation is not an active capability. Imported base classes and API services could provide additional functionality, but their implementations are not supplied; this assessment is limited to the shown code.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
88% confidence
Finding

Ordinary formatting, polling, and HTTP helpers could support the declared skill, and missing vision logic in a utility module alone would not establish a mismatch. However, this code also implements undeclared persistent account provisioning and credential handling. The request path can send the configured API secret as the registration identity and attaches credentials even to explicitly supplied external URLs. These identity and credential-transfer behaviors are materially broader than the description indicates. They occur when the relevant methods are invoked, not merely when the module is imported.

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-body-size-weight-estimation-analysis"
description: "Estimates livestock body length and body weight from side-view videos or frames, tracking fattening progress in a contactless manner. | 通过视频视觉估测体长、体重,追踪育肥进度。"
version: "1.0.23"
license: "MIT-0"
---

# 📏 Livestock Body Size & Weight Estimation | 畜禽体长/体重估测

> 通过视频视觉估测体长、体重,追踪育肥进度。
>
> **无接触育肥监测中枢** · 畜禽侧视图像/视频智能分析 · 体长/体高/胸围识别 · 参照物尺寸换算 · 体重与育肥阶段估测 · 历史报告云端查询

---

## �

Skill declares no tool scope ('permissions' or 'allowed-tools') but code capabilities were detected: env, file_read, file_write, network, shell.

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

The documented export-only mode still executes analysis.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

The parser advertises an export-only mode that will not analyze input, but the flag is never checked before identity initialization or analysis. A caller relying on that promise can unintentionally submit media for remote processing and trigger account-related side effects.

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 = result_json_common_ai_response

        result_json_health_ai_response = result_json.get("healthAiResponse") if isinstance(result_json,
                                                                                           dict) else result_json
        if result_json_health_ai_response:
            result_json = result_json_health_ai_response

Local video contents are submitted to an analysis API without disclosure that the file will be uploaded.

Medium
Category
Output Handling
Confidence
88% confidence
Finding

The code reads the complete local file, packages its contents as a file payload, and passes it to the analysis service. No prompt, log, or explanatory comment in the supplied file discloses this transmission; the comment about reading the file does not explain that it will leave the local system.

Content

No source excerpt is available for this finding.

The --export-env-only option promises not to analyze video, but does not prevent analysis.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

The export-only flag promises not to analyze video, but its parsed value is never used to stop execution. Supplying media with this flag still reaches the analysis workflow, potentially causing unintended remote processing and identity-related side effects.

Content

No source excerpt is available for this finding.

Implements user-profile and credential storage unrelated to livestock size and weight estimation.

Medium
Category
Excessive Agency
Confidence
92% confidence
Finding

The User model stores human identity information, including real names, email addresses, birthdays, and authentication tokens, and UserDao exposes CRUD operations for those records (L448-L473). DAO initialization also automatically creates and migrates the sys_user table (L184-L214). Although persisting livestock measurements is expected for progress tracking, managing human profiles and credentials is not justified by the stated estimation purpose.

Content

No source excerpt is available for this finding.

FileUtil.open silently truncates existing files without disclosing its write-only behavior.

Medium
Category
Output Handling
Confidence
96% confidence
Finding

The generically named open helper uses mode 'w', which immediately erases an existing file's contents. There is no docstring, comment, confirmation, or operation-specific log explaining this destructive behavior; the exception handler only reports failures.

Content

No source excerpt is available for this finding.

The request helper silently registers remote user accounts and persists their authentication state, beyond the declared livestock-estimation purpose.

Medium
Category
Excessive Agency
Confidence
93% confidence
Finding

An ordinary HTTP request can initiate a separate login/registration request with register=1 and silent=1, then persist returned authentication state without an explicit enrollment step. Remote authentication may support livestock estimation, but hidden account creation and identity transmission are consequential side effects not disclosed by the declared purpose.

Content

No source excerpt is available for this finding.

HTTP requests can silently trigger remote account registration and persist returned authentication tokens.

Medium
Category
Output Handling
Confidence
94% confidence
Finding

The generic request helper silently performs remote enrollment and writes returned tokens and user information into the local database. This is the same underlying issue as SDI-1: requesting estimation functionality can cause undisclosed account and credential-persistence changes.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
92% confidence
Finding

The registration POST transmits the selected identity as both openId and mobile without a separate authorization step. That identity can originate from API_SECRET_KEY, so a configured secret may also be copied into account-profile fields and server-side logs; the configured endpoint is not proven malicious, but this is unnecessary secret propagation.

Content

Scanner excerpt · skills/smyx_common/scripts/util.py (reported line 561)May include surrounding context.

python
"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"):

The automatic trigger “历史报告” (“historical reports”) is not specific to livestock body-size or weight estimation.

Low
Category
Trigger Abuse
Confidence
93% confidence
Finding

Line 252 explicitly makes the generic phrase “历史报告” an automatic trigger, although it could refer to reports from any domain. Unlike the domain-specific triggers on line 64, this phrase has no explicit requirement for an active livestock-estimation context and could cause unintended cloud report queries.

Content

No source excerpt is available for this finding.

Configuration loading silently creates directories and files, including during module import.

Low
Category
Output Handling
Confidence
96% confidence
Finding

YamlUtil.load creates parent directories and writes a configuration file when the requested path is missing, without a prompt, log, docstring, or explanatory comment disclosing this side effect. BaseEnum invokes this loader during subclass creation (L052–L059), so importing the module can modify the filesystem without an explicit save operation.

Content

No source excerpt is available for this finding.

Dynamic attribute access via getattr()

Low
Category
Dangerous Code Execution
Confidence
50% confidence
Finding

Dynamic getattr() with a non-literal attribute name can access arbitrary object attributes, potentially bypassing access controls.

Content

Scanner excerpt · skills/smyx_common/scripts/dao.py (reported line 243)May include surrounding context.

python
username = getattr(model, "username", None)
            if username:
                column_names = self.__model__.__table__.columns.keys()
                update_data = {key: getattr(model, key) for key in column_names if key != "username"}
                return self.update_by_username(username, **update_data)

            return None

Dynamic attribute access via getattr()

Low
Category
Dangerous Code Execution
Confidence
50% confidence
Finding

Dynamic getattr() with a non-literal attribute name can access arbitrary object attributes, potentially bypassing access controls.

Content

Scanner excerpt · skills/smyx_common/scripts/dao.py (reported line 353)May include surrounding context.

python
column_names = self.__model__.__table__.columns.keys()

            for key in column_names:
                value = getattr(model, key)
                setattr(instance, key, value)

            session.commit()

Dynamic attribute access via getattr()

Low
Category
Dangerous Code Execution
Confidence
50% confidence
Finding

Dynamic getattr() with a non-literal attribute name can access arbitrary object attributes, potentially bypassing access controls.

Content

Scanner excerpt · skills/smyx_common/scripts/dao.py (reported line 326)May include surrounding context.

python
if filters:
                for key, value in filters.items():
                    query = query.filter(getattr(self.__model__, key) == value)

            if offset:
                query = query.offset(offset)

Dynamic attribute access via getattr()

Low
Category
Dangerous Code Execution
Confidence
50% confidence
Finding

Dynamic getattr() with a non-literal attribute name can access arbitrary object attributes, potentially bypassing access controls.

Content

Scanner excerpt · skills/smyx_common/scripts/dao.py (reported line 441)May include surrounding context.

python
if filters:
                for key, value in filters.items():
                    query = query.filter(getattr(self.__model__, key) == value)

            return query.scalar()
        finally:

ai_chat documents an OpenClaw agent invocation, but its execution path never invokes an agent or returns analysis.

Low
Category
Excessive Agency
Confidence
99% confidence
Finding

The docstring at L26 claims that this method invokes openclaw agent through subprocess, but the command and subprocess call are commented out (L48–L66). Instead, L68 creates an empty dictionary and L70 accesses its nonexistent stderr attribute; the resulting exception is caught at L81–L82, so the method returns None rather than the documented analysis result or session ID.

Content

No source excerpt is available for this finding.

Dynamic attribute access via getattr()

Low
Category
Dangerous Code Execution
Confidence
50% confidence
Finding

Dynamic getattr() with a non-literal attribute name can access arbitrary object attributes, potentially bypassing access controls.

Content

Scanner excerpt · skills/smyx_common/scripts/util.py (reported line 30)May include surrounding context.

python
elif isinstance(cur, dict):
                        cur = cur.get(part, default)
                    else:
                        cur = getattr(cur, part)
                return cur
            except Exception:
                return default