Back to skill

Security audit

Pet Stool Morphology Recognition Analysis | 宠物排便形态识别(狗厕所/户外)

Security checks for vulnerabilities and agentic risk

Overview

ClawScan marks this skill suspicious because scanners report undisclosed account, identity, and analysis-history features, plus options that may upload media despite promising not to analyze.

Consider the Review verdict carefully before installing. The reports raise concerns about unexpected media uploads, account creation, identity and token handling, and access to stored analysis history. The scan is marked partial because a local reference was missing, so evidence is incomplete; it does not establish that the author acted maliciously.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
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
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
Findings (28)

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

The supplied chunk contains no image/video handling, stool-feature recognition, analysis API requests, or observation reporting. Database helpers could support the declared service, but this code specifically manages user profiles and tokens, a capability not disclosed in the description or connected to stool analysis in the supplied evidence. This assessment is limited to the provided chunk; it does not establish that other files lack the declared functionality or that stored information is transmitted.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

The analysis invocations and output options align with the declared purpose. However, the historical-report listing workflow adds an undeclared capability and activation path beyond analyzing supplied media. The underlying Python implementation is not provided, so actual report storage, retrieval mechanisms, and API behavior cannot be verified.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

The primary analysis workflow is consistent with the declared purpose, although its recognition details are implemented in code not supplied here. However, --list executes a separate identity-scoped retrieval workflow and exits before the image/video input requirement. Retrieving existing analysis records is an additional user-facing capability, rather than merely a supporting implementation detail of analyzing supplied media.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
88% confidence
Finding

The analysis workflow is broadly consistent with the declared purpose, although the imported implementation is unavailable, so stool-specific processing cannot be verified. However, --list invokes skill.get_output_analysis_list(open_id=...) and returns stored analysis history, which is a distinct data-retrieval capability absent from the description. Identity resolution and optional output-file writing are not independently treated as mismatches.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
87% confidence
Finding

The HTTP wrappers, pagination, and download-URL helper could reasonably support the declared remote-analysis workflow and are not independently evidence of a mismatch. However, the service also exposes an explicit user-lookup capability that the description does not disclose or connect to stool analysis. No automatic lookup or data exfiltration is shown; these operations occur only when the methods are called. The absence of stool-recognition logic in this shared helper alone would not establish a mismatch.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
87% confidence
Finding

Media submission, result polling, and report formatting are consistent with the declared analysis workflow. However, get_output_analysis_list() calls self.page() to retrieve existing report records independently of analyzing a supplied image or video. This is an additional report-history retrieval capability, not merely formatting the current analysis result. The supplied chunk delegates recognition to imported APIs, so it does not establish whether the server actually detects the specified stool features; there is no evidence here of a different recognition purpose or disease diagnosis.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
86% confidence
Finding

Ordinary HTTP requests, authentication, polling, and filesystem helpers can support the declared server-side analysis and are not independently mismatches. However, this code adds an automatic account-provisioning lifecycle and a payment-skill installation/recharge flow that the description does not disclose. The supplied file contains no stool-specific analysis implementation, but because it is a shared utility module, that absence alone is not evidence of a mismatch. The finding rests on the additional account and payment behaviors explicitly present in the code; their execution depends on the relevant methods being called and runtime conditions.

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-pet-stool-morphology-recognition-analysis"
description: "Triggers when a user provides an image/video URL or file of dog toilet area or outdoor dog-walking path for analysis; supports local uploads or network URLs to call server-side APIs for pet stool morphology recognition, analyzing stool color (brown, black, red, white), shape (formed, loose/soft, watery, granular hard), and the presence of blood or mucus, outputting standardized abnormal observation features to help early discovery of gastrointestinal diseases (without diagnosing diseases). Application scenarios: dog toilets, outdoor dog-walking path cameras, pet health monitoring

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 option does not prevent analysis.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

The CLI accepts --export-env-only and promises not to run analysis, but never checks the flag. When supplied with media input, it proceeds to analysis and can transmit private images or video to the remote service despite the caller explicitly requesting a non-analysis operation.

Content

No source excerpt is available for this finding.

The skill exposes stored analysis-history retrieval beyond the declared input-analysis workflow.

Medium
Category
Excessive Agency
Confidence
90% confidence
Finding

The manifest describes analyzing a user-provided image or video, but the --list branch retrieves an existing user's analysis history through get_output_analysis_list (L034–L036). This branch requires no media input and exposes historical health-analysis data, a separate data-access capability not described in the manifest.

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 passed to an analysis API without disclosure of the upload.

Medium
Category
Output Handling
Confidence
90% confidence
Finding

The code reads the entire local video into a multipart file payload and passes it to the analysis API. No confirmation, user-facing message, docstring, or comment in this file explains that the user's video will be transmitted; the comment only describes reading the file.

Content

No source excerpt is available for this finding.

The --export-env-only option promises not to perform analysis, but the code still invokes analysis.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

The export-only flag is parsed but never consulted before identity resolution and analysis. A caller supplying media alongside this flag can unexpectedly upload private video and initiate remote processing even though the option explicitly promises not to analyze.

Content

No source excerpt is available for this finding.

The service includes a username-based user lookup capability unrelated to pet stool analysis.

Medium
Category
Excessive Agency
Confidence
90% confidence
Finding

At L098–L101, get_user_by_username forwards an arbitrary username to a user-lookup utility. Looking up user accounts is outside the manifest's stated media-upload and stool-analysis workflow, which declares no user-directory or account-management functionality. This establishes an unrelated capability, though the file does not show it being invoked.

Content

No source excerpt is available for this finding.

The skill includes persistent human-profile management unrelated to pet stool morphology analysis.

Medium
Category
Excessive Agency
Confidence
88% confidence
Finding

The User model stores human personal information, including real names, email addresses, birthdays, sex, and age. UserDao (L470-L473) exposes the inherited persistent CRUD operations for these records, extending beyond the manifest's media-submission and stool-observation purpose; API authentication may justify token storage, but does not explain these demographic fields.

Content

No source excerpt is available for this finding.

FileUtil.open silently truncates existing files without disclosing its destructive behavior.

Medium
Category
Output Handling
Confidence
97% confidence
Finding

The generic open helper opens files in write mode, immediately erasing existing contents even before the caller writes anything. No confirmation, action log, comment, or docstring explains this destructive behavior; the exception handler only reports failures.

Content

No source excerpt is available for this finding.

Analysis requests can silently register a remote user account and persist account credentials.

Medium
Category
Excessive Agency
Confidence
95% confidence
Finding

An ordinary analysis request can initiate silent remote registration and then persist returned account tokens and user information in SQLite without an explicit enrollment step. Server-side image analysis does not by itself imply consent to account creation or ongoing credential storage, which creates additional privacy and credential-exposure risks.

Content

No source excerpt is available for this finding.

HTTP requests can silently trigger remote user registration and transmit an identity value.

Medium
Category
Output Handling
Confidence
96% confidence
Finding

The generic request wrapper can send an identity value to a registration endpoint with both 'silent' and 'register' enabled, making account creation an undisclosed side effect of analysis. The identity can originate from platform sender information or a local identity file, extending disclosure beyond the media analysis described by the skill.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
95% confidence
Finding

External networking is expected for this skill, but this POST sends an identity as both 'openId' and 'mobile' for silent registration rather than submitting analysis media. The caller prioritizes API_SECRET_KEY as that identity when configured, potentially disclosing a credential in an account-profile payload and associated backend records.

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

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

Low
Category
Output Handling
Confidence
94% confidence
Finding

YamlUtil.load creates parent directories and writes a YAML file when the requested configuration is absent, without a warning, log, or explanatory comment/docstring. BaseEnum.init_subclass invokes this loader as classes are defined (L053 and L058), so importing the module can modify the filesystem even when the caller only expects to read configuration.

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 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: