Back to skill

Security audit

Pet Behavior Recognition Skill | 宠物行为识别技能

Security checks for vulnerabilities and agentic risk

Overview

ClawScan marks this pet behavior analysis skill suspicious because scanners report credential and account handling, unexpected data sharing, and behavior that exceeds or fails to deliver its stated purpose.

Consider avoiding installation until the credential handling, remote registration, and data-sharing behavior are clarified and the missing reference is reviewed. In particular, do not provide sensitive credentials or private video unless you understand where they will be sent and why.

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

Default identity initialization can replace the upstream sender identity and expose another sender's reports

Content
View full analysis

Impact

The second sender can receive reports belonging to the shared default account, including reports previously created for another sender. New analyses can also be associated with the wrong account. This does not require a server-side authorization bypass: the client supplies the wrong account's valid credentials.

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 (25)

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The supplied chunk implements general user-account persistence rather than pet-behavior identification. When instantiated, the DAO creates or opens a workspace database and initializes or alters its schema; its methods manage user records containing names, email, demographics, and tokens. Although database access can support a skill, no connection between this account-management functionality and the declared pet-behavior purpose is shown. The chunk contains no pet-behavior recognition logic. No network transmission or automatic collection of token values is demonstrated.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

Generic serialization, polling, and HTTP utilities can legitimately support a pet-analysis skill and are not sufficient alone to establish a mismatch. However, this chunk also implements an undeclared account and credential workflow involving local identity-file access, persistent database changes, remote silent registration/login, and payment-related messaging. Those capabilities materially exceed the stated recognition-only description. The supplied code does not establish malicious intent or prove that these methods run automatically; it does establish that the capabilities exist, while the pet-recognition implementation is not shown.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The visible implementation does not fulfill the declared purpose. It supplies generic scaffolding and a broken chat method, with no behavior categories, pet inputs, or recognition logic. The commented-out command does not execute, so this chunk does not demonstrate subprocess execution or external data transmission. Imported base classes and services may contain additional functionality, but their behavior cannot be established from the supplied code.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
84% confidence
Finding

Video input handling and result export are reasonable supporting details for pet-behavior analysis. However, --list invokes get_output_analysis_list(open_id=...), providing a separate user-history retrieval capability absent from the declared description. User-identity resolution supports that operation and is not independently evidence of misuse. The delegated analysis implementation is unavailable, so this chunk alone cannot establish which pet behaviors are recognized or whether video content is transmitted externally.

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: "pet-behavior-detection-analysis"
description: "Identifies common abnormal pet behaviors such as scratching, biting, destructive chewing, jumping, digging, chasing, and separation anxiety, helping owners understand their pet's habits. | 宠物行为识别技能,识别抓挠、啃咬、拆家、跳跃、刨地、追逐、独处焦虑等常见宠物异常行为,帮助主人了解宠物行为习惯"
version: "1.0.28"
license: "MIT-0"
---

# 🐾 Pet Behavior Recognition Skill | 宠物行为识别技能
> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询

---

## 🧭 技能概�

The HTTP helper forwards shared service credentials to arbitrary caller-supplied destinations.

High
Category
Excessive Agency
Confidence
99% confidence
Finding

The helper accepts arbitrary absolute HTTP or HTTPS URLs and automatically attaches X-Access-Token, X-Api-Key, and Authorization credentials without checking the destination. A caller-controlled URL can therefore disclose shared service credentials to an attacker, and HTTP destinations additionally expose them in transit.

Content

No source excerpt is available for this finding.

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 --export-env-only option promises not to run analysis, but the code ignores it and executes the normal analysis workflow.

Medium
Category
Excessive Agency
Confidence
100% confidence
Finding

The parser advertises --export-env-only as preventing analysis, but the parsed flag is never checked. When supplied with an input, execution continues into identity initialization and analysis, potentially uploading private household video despite an explicit no-analysis option.

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 input files are passed to the analysis API without disclosure that their contents will be uploaded.

Medium
Category
Output Handling
Confidence
88% confidence
Finding

The code reads the entire local file, packages its contents as an upload, and passes it to the analysis API. No confirmation, user-facing notice, or comment explains that local file contents are transmitted; the existing comment only describes reading the file.

Content

No source excerpt is available for this finding.

The --export-env-only option promises not to run analysis, but the code ignores it and proceeds with video analysis.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

The --export-env-only flag promises that analysis will not execute, but no branch checks its value. With a video input present, this can trigger remote processing and disclosure of video contents when the caller explicitly selected a non-analysis mode.

Content

No source excerpt is available for this finding.

The service exposes arbitrary remote modification and deletion capabilities unrelated to pet-behavior analysis.

Medium
Category
Excessive Agency
Confidence
88% confidence
Finding

The http_put and http_delete methods forward caller-supplied URLs and arguments directly to HTTP request utilities. Although network requests could support remote pet-behavior inference, general-purpose remote modification and deletion are not justified by the manifest's behavior-identification purpose.

Content

No source excerpt is available for this finding.

The skill includes persistent user-account and credential management unrelated to its stated pet-behavior analysis purpose.

Medium
Category
Excessive Agency
Confidence
92% confidence
Finding

The user model persists token and open_token values as ordinary strings in a workspace-shared SQLite database, without credential encryption or explicit restrictive permissions in this source. Account support is not inherently malicious or necessarily unrelated to a hosted pet-analysis service, but storing reusable credentials alongside profile data expands exposure to other processes or skills with database access.

Content

No source excerpt is available for this finding.

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

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

The docstring at L25–L34 explicitly promises to call openclaw agent through subprocess and return an analysis result or session ID. However, the subprocess call is commented out, and the replacement empty dictionary at L68 causes result.stderr at L70 to raise AttributeError; the exception handler suppresses that error and the method returns None. This contradicts the documented analysis operation rather than merely omitting an implementation detail.

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 generically named open method uses write mode, which immediately truncates an existing file. There is no confirmation, action log, docstring, or comment explaining this behavior; exception tracing does not disclose successful truncation.

Content

No source excerpt is available for this finding.

Pet-behavior requests can silently register a remote account and persist its credentials.

Medium
Category
Excessive Agency
Confidence
97% confidence
Finding

A general HTTP request can implicitly call /sys/phoneLogin with silent and register enabled, then save the resulting account credentials through UserDao. This introduces remote account creation and persistent credential handling without an explicit enrollment decision in the shown path, an unexpected privacy and security side effect for pet-behavior analysis.

Content

No source excerpt is available for this finding.

HTTP requests can silently trigger remote user registration and identity transmission.

Medium
Category
Output Handling
Confidence
96% confidence
Finding

The request helper can register an account and transmit the selected identity as both openId and mobile as an implicit prerequisite to an ordinary request. The shown path has no explicit consent gate, so pet-analysis use can cause undisclosed identity transmission and a durable remote account.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
95% confidence
Finding

The outbound registration payload contains the selected username in openId and mobile, and the surrounding code preferentially selects ApiEnum.API_SECRET_KEY as that username when configured. Consequently, an API secret can be transmitted as ordinary account-profile data to the health service, potentially exposing it through registration records or application logs; external communication alone would not establish this vulnerability.

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 configuration file when the requested path is missing, without a warning, log, docstring, or explanatory comment. BaseEnum.init_subclass invokes this loader during class definition (L053 and L058), so importing the module can unexpectedly modify the filesystem rather than merely 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 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:

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