Back to skill

Security audit

Pet Restricted Area Alert Skill | 宠物禁区预警技能

Security checks for vulnerabilities and agentic risk

Overview

ClawScan marks this skill suspicious with medium confidence because scanners report a mismatch between its pet-monitoring description and several broader account, credential, and video-analysis capabilities, along with security and privacy concerns.

Consider the suspicious verdict before installing. The reported credential forwarding, remote account and token handling, and possible upload of household video merit particular scrutiny; verify the service destination and what data it receives. Scanner coverage is incomplete: Skillspector reports partial analysis, including timeouts in its meta-analysis, and dependency inspection was not requested. The findings do not establish malicious intent.

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_restricted_area_warning_analysis.py
Finding

Ignoring upstream sender identity can expose a shared account's report history

Content
View full analysis

Impact

In this shared-agent deployment, another sender can receive reports previously created under the shared fallback account. New analysis requests are also attributed to that same account.

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

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The supplied chunk does not implement the declared monitoring and alerting behavior. It primarily contains generic class scaffolding and an inactive, broken AI-chat helper. The commented-out subprocess code does not execute and is not evidence of active command execution. Imported base classes and services could contain additional behavior, but their implementations are not supplied, so they cannot substantiate the declared purpose.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The supplied chunk's substantive functionality is user-account persistence rather than pet monitoring or alerting. Generic database access could support a monitoring skill, but the concrete user-profile and token-management capabilities shown here go beyond incidental storage of monitoring settings or events and are not represented in the description. No intrusion detection, behavior analysis, camera processing, or real-time alert logic appears in this chunk. This assessment is limited to the supplied code; it does not establish token theft, external transmission, or the absence of monitoring functionality elsewhere.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

Generic formatting, polling, and filesystem helpers could reasonably support pet monitoring and are not independently mismatches. However, the supplied code also implements an undeclared account-registration, credential-management, and billing workflow. Its HTTP wrapper attaches authentication headers without restricting absolute URLs to the configured service. No pet-event detection or alert-delivery implementation appears in this chunk. This assessment is limited to the supplied file; it does not establish malicious intent or prove that these capabilities are invoked elsewhere.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
92% confidence
Finding

The supplied code implements a video-analysis submission and reporting client, not the declared real-time pet-warning workflow. It validates and reads local files or forwards video URLs, polls an API, and displays reports and report history. Those operations could support pet analysis, but the visible code does not establish the advertised behaviors or provide alerts. Imported API implementations are not supplied, so pet-specific detection performed remotely cannot be ruled out; nevertheless, the declared monitoring and real-time alerting capabilities are not represented in this chunk.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
87% confidence
Finding

The supplied code handles video-analysis requests and history listing, but contains no visible detection logic for the specified pet behaviors, continuous monitoring loop, or alert-delivery mechanism. The imported skill component could implement pet-specific analysis, so its internal behavior cannot be determined from this chunk. Nevertheless, the visible workflow materially differs from the declared real-time monitoring purpose and exposes an additional history-retrieval capability. Optional output-file writing and identity resolution are supporting implementation details, not independent grounds for the mismatch.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
80% confidence
Finding

Generic AI-analysis endpoints could support pet monitoring and are not inherently a mismatch. However, the explicit health-service report export resource is inconsistent with the declared purpose. This conclusion is limited to configuration: the chunk does not itself make network requests, export reports, or establish what the broader skill does.

Content

No source excerpt is available for this finding.

The HTTP helper can send 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 destination can therefore receive service credentials, and HTTP destinations additionally expose them in transit; a pet-monitoring workflow does not justify this unrestricted credential forwarding.

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 analysis workflow lacks a privacy warning about sending private home-monitoring footage to an external API.

Medium
Category
Output Handling
Confidence
90% confidence
Finding

The workflow instructs the agent to analyze local files or video URLs through a script documented as calling an API, and the skill supports cloud-hosted reports. Although API use is mentioned, the skill never clearly warns that sensitive household imagery or access-bearing video URLs will be shared with the service.

Content

No source excerpt is available for this finding.

The documented environment-only mode still executes video analysis.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

The help text at L169–L170 promises that --export-env-only only outputs environment-setting commands and does not execute analysis. However, main never checks this flag and proceeds to analyze_video at L190–L198 when an input is supplied, ultimately invoking skill.get_output_analysis at L64 on the supplied pet-monitoring video. This defeats the explicitly documented no-analysis mode.

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 file contents are submitted to an analysis API without disclosure of the upload.

Medium
Category
Output Handling
Confidence
88% confidence
Finding

The code reads the entire local input file and passes its contents to the analysis API through the files argument. No prompt, log, docstring, or comment in this file explains that local content will be transmitted; the existing comment only describes reading the file.

Content

No source excerpt is available for this finding.

The documented environment-only mode still executes video analysis.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

The help text at L068–L069 explicitly promises to output environment-variable export commands without performing analysis. However, args.export_env_only is never checked: when an input path or URL is supplied, execution reaches L089–L095 and invokes analyze_video, which passes that video reference to skill.get_output_analysis at L037. This triggers video processing despite the user's explicit selection of a non-analysis mode.

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 always uses mode 'w', which immediately erases an existing file's contents. No docstring, explanatory comment, confirmation, or user-facing log discloses this destructive behavior; exception tracing does not disclose successful truncation.

Content

No source excerpt is available for this finding.

The HTTP helper can silently register a remote account and persist returned authentication tokens.

Medium
Category
Output Handling
Confidence
90% confidence
Finding

An ordinary HTTP request can implicitly invoke phoneLogin with silent and register enabled, transmit the selected identity, and persist returned authentication tokens in SQLite. This hides account provisioning and credential storage behind a generic request operation without an explicit enrollment gate, creating unexpected privacy and account-management consequences for a home-monitoring skill.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
94% confidence
Finding

The login POST sends its username argument as both openId and mobile, while the caller gives API_SECRET_KEY precedence when selecting that argument. When either token is missing, a configured API secret can consequently be transmitted as identity data to the health-service login endpoint, exposing it to identity-processing and logging systems beyond its intended authentication field.

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
90% confidence
Finding

YamlUtil.load creates parent directories and writes a YAML file when the requested path is missing, without a log, prompt, docstring, or explanatory comment disclosing this behavior. BaseEnum.init_subclass invokes this loader during class definition (L044–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:

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