Back to skill

Security audit

Pet Vomiting / Regurgitation Detection | 宠物呕吐/反流行为识别

Security checks for vulnerabilities and agentic risk

Overview

This appears to be a real pet-video analysis skill, but it ships with unsafe cloud/auth handling that should be reviewed before installation.

Install only if you are comfortable with indoor pet videos and report history being sent to this publisher's backend, and review the configuration first. The published default points to private HTTP development servers and stores reusable tokens locally in plaintext, so it should be fixed to use HTTPS production endpoints, a protected credential store, tighter triggers, and clearer consent before normal use.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (5)

T09 · Insecure Skill Coding Practices

Error
Location
skills/smyx_common/scripts/config-dev.yaml:1
Finding
Sensitive media, identity data, and authentication tokens are transmitted over unencrypted HTTP<![CDATA[ ## Vulnerability Details **File Location**: `skills/smyx_common/scripts/config.yaml:1-15`, `skills/smyx_common/scripts/config-dev.yaml:1-7`, `skills/smyx_common/scripts/util.py:550-646`, `skills/smyx_analysis/scripts/skill.py:105-133` **Vulnerability Type**: Cleartext transmission of sensitive information **Risk Level**: High ### Relevant Code The default configuration explicitly selects the development environment: ```yaml ApiEnum: api-key: null api-secret-key: null base-url-health: https://lifeemergence.com/jeecg-boot-xzgz base-url-open-api: https://open.lifeemergence.com/smyx-open-api base-url-open-h5: http://livemonitor.lifeemergence.com database-url: null ConstantEnum: app--id: x1a3s4nwy1s2r4se current--tentant-code: XIAN_ZHAO_GAN_ZHI default--skill-platform-name: ARK_CLAW feishu-app--id: cli_a93d769369badcb1 feishu-app--secret: null is-debug: false env: dev ``` The selected development configuration overrides the HTTPS endpoints with private-network HTTP endpoints: ```yaml ApiEnum: base-url-open-api: "http://192.168.1.234:9601/smyx-open-api" base-url-open-h5: "http://192.168.1.234:4100" base-url-health: "http://192.168.1.234:7070/jeecg-boot-xzgz" ConstantEnum: is-debug: true ``` Identity information is sent to the HTTP health endpoint to create or retrieve an account: ```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") ``` The returned tokens are attached to subsequent requests: ```pyth ...[truncated 3672 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Change the distributed default from `env: dev` to a production configuration. 2. Require HTTPS for every authentication, analysis, polling, report, and export endpoint. 3. Reject non-HTTPS endpoint configuration at startup, except under an explicit test-only flag that cannot be enabled in normal installations. 4. Do not use private development IP addresses in released Skill packages. 5. Keep TLS certificate verification enabled and fail closed on certificate errors. 6. Rotate all tokens that may have been transmitted using this configuration. 7. Add automated tests asserting that every resolved service URL uses `https://`. 8. Consider certificate or public-key pinning where the deployment model permits it. 9. Minimize token scope and lifetime, and use separate narrowly scoped credentials for analysis and report listing. 10. Inform users before uploading private camera media to a remote processor and document retention, deletion, and access-control policies. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
skills/smyx_common/scripts/util.py:570
Finding
The generic request dispatcher attaches credentials to arbitrary absolute URLs<![CDATA[ ## Vulnerability Details **File Location**: `skills/smyx_common/scripts/util.py:570-646` **Vulnerability Type**: Credential disclosure through unrestricted destination handling **Risk Level**: Medium ### Relevant Code The dispatcher accepts either a relative endpoint or any absolute HTTP/HTTPS URL: ```python headers = headers or {} if not url.startswith("https://") and not url.startswith("http://"): url = cls.BASE_URL + url headers['App-Id'] = ConstantEnum.APP__ID ``` It then loads or creates account credentials and attaches them without verifying the destination host: ```python current__user_name = ( ApiEnum.API_SECRET_KEY or ConstantEnum.CURRENT__USER_NAME or ConstantEnum.CURRENT__OPEN_ID ) if (not ApiEnum.TOKEN or not ApiEnum.OPEN_TOKEN) and current__user_name: found_user = user_dao.get_by_username(current__user_name) if found_user: ApiEnum.TOKEN = found_user.token ApiEnum.OPEN_TOKEN = found_user.open_token current__user_name = found_user.username headers.setdefault("X-Access-Token", ApiEnum.TOKEN) headers.setdefault("X-Api-Key", ApiEnum.API_SECRET_KEY) headers.setdefault("Authorization", ApiEnum.OPEN_TOKEN) ``` The credential-bearing request is sent to the supplied URL: ```python response = requests.request( method, url, *args, json=data, params=params, headers=headers, timeout=int(timeout), **argss ) ``` The common API wrapper exposes this dispatcher directly: ```python def http_post(self, url=None, *args, **argss): return RequestUtil.http_post( url, *args, **argss ) def http_get(self, url=None, *args, **argss): return RequestUtil.http_get( url, *args, **argss ) ``` ### Technical Analysis `RequestUtil.http_request` treats absolute URLs as trusted but unconditionally adds service credentials and identity metadata. There is no allowlist for scheme, host, port, or path, and plain HTTP is accepted. The audited ...[truncated 1913 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Resolve and validate the final URL before adding authentication headers. 2. Maintain an exact allowlist of approved HTTPS origins, including expected hostnames and ports. 3. Reject HTTP URLs and unexpected redirects. 4. Separate the generic unauthenticated HTTP client from the backend-authenticated API client. 5. Add credentials only when the normalized destination origin exactly matches the configured backend origin. 6. Strip sensitive headers on every cross-origin redirect, or disable redirects for authenticated requests. 7. Do not expose raw `http_get` and `http_post` wrappers where callers only need fixed application endpoints. 8. Add unit tests proving that attacker-controlled hosts never receive `Authorization`, `X-Access-Token`, `X-Api-Key`, or identity fields. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
skills/smyx_common/scripts/dao.py:447
Finding
Authentication tokens and personal account fields are persisted in a plaintext SQLite database<![CDATA[ ## Vulnerability Details **File Location**: `skills/smyx_common/scripts/dao.py:166-180`, `skills/smyx_common/scripts/dao.py:447-462`, `skills/smyx_common/scripts/util.py:580-606` **Vulnerability Type**: Plaintext local credential storage **Risk Level**: Medium ### Relevant Code The database is created in the workspace data directory without explicit restrictive permissions: ```python if not db_path: db_path = "smyx-common-claw.db" db_path = self.get_db_path(db_path) self.engine = create_engine(f"sqlite:///{db_path}", echo=False) ``` The user model stores tokens and account-related fields directly: ```python class User(Base, BaseModelMixin): __tablename__ = "sys_user" id = Column(String(32), primary_key=True, index=True) source_id = Column(String(32), comment="source id") username = Column(String(100), unique=True, index=True, nullable=False) realname = Column(String(200), unique=True, index=True) email = Column(String(45), unique=True, index=True) birthday = Column(DateTime, unique=True, index=True) sex = Column(Integer) age = Column(Integer) token = Column(String(500)) open_token = Column(String(1000)) source = Column(String(50)) ``` Tokens returned by the remote login operation are inserted into the model and saved: ```python ApiEnum.TOKEN = new_current_user.get("token") ApiEnum.OPEN_TOKEN = new_current_user.get("openToken") current_user_info = new_current_user.get("userInfo") if current_user_info: current_user_info["token"] = new_current_user.get("token") current_user_info["openToken"] = new_current_user.get("openToken") user_model = User.load(current_user_info) user = user_dao.save( user_model ) ``` ### Technical Analysis The Skill persists bearer-style authentication material in an ordinary SQLite database. No application-layer encryption, operating-system credential store, explicit file mode, or permission validation is applied. SQLite does not encrypt ...[truncated 1602 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Avoid persisting access and authorization tokens unless operationally indispensable. 2. Prefer short-lived tokens retained only in process memory. 3. If persistence is required, use the operating system’s credential store or encrypt tokens with a key not stored beside the database. 4. Create the database with owner-only permissions, such as mode `0600`, and the containing directory with mode `0700`. 5. Verify existing permissions at startup and refuse to use an overly permissive credential database. 6. Store the minimum user fields needed for identity reuse; avoid persisting unrelated profile attributes. 7. Implement expiration, automatic deletion, logout, and token-rotation handling. 8. Exclude the database from backups, logs, archives, and diagnostic bundles unless explicitly protected. 9. Rotate credentials from existing plaintext databases after deploying the fix. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
skills/smyx_common/scripts/util.py:30
Finding
HTTP debug tracing can disclose complete authentication headers and private request data<![CDATA[ ## Vulnerability Details **File Location**: `skills/smyx_common/scripts/util.py:30-50`, `skills/smyx_common/scripts/config.py:139-141`, `skills/smyx_common/scripts/config-dev.yaml:5-7` **Vulnerability Type**: Sensitive information exposure through debug logging **Risk Level**: Medium ### Relevant Code When debug mode is active, low-level HTTP tracing is enabled globally: ```python if ConstantEnum.is_debug(): import http.client http.client.HTTPConnection.debuglevel = 1 import logging logging.basicConfig() logging.getLogger().setLevel(logging.DEBUG) requests_log = logging.getLogger("urllib3") requests_log.setLevel(logging.DEBUG) requests_log.propagate = True ``` The debug predicate enables debugging unconditionally on Windows: ```python @staticmethod def is_debug(): return platform.system() == 'Windows' or platform.system() != 'Linux' and ConstantEnum.IS_DEBUG ``` The development configuration also requests debug mode: ```yaml ConstantEnum: is-debug: true ``` ### Technical Analysis Setting `http.client.HTTPConnection.debuglevel = 1` causes Python’s low-level HTTP stack to print request and response details. Unlike the application’s later `safe_headers` construction, low-level tracing is not redacted. It can expose bearer tokens, access tokens, API keys, request paths, multipart metadata, identity fields, and service responses. The `is_debug` expression is also logically unsafe: Windows enables debug output regardless of the configured `IS_DEBUG` value. On Linux, due to operator precedence and the `platform.system() != 'Linux'` condition, the configured debug flag does not activate this branch. The most direct exposure therefore occurs on Windows and potentially other non-Linux platforms when debugging is enabled. Because the root logger and `urllib3` logger are configured globally, sensitive output may be captured by terminal history, CI logs, agent logs, support tools, or centralized logging systems. ...[truncated 929 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove `HTTPConnection.debuglevel = 1` from production code. 2. Correct `is_debug()` so debugging is controlled solely by an explicit, secure configuration value rather than the operating system. 3. Keep debug logging disabled by default in every distributed environment. 4. Implement structured logging with mandatory redaction of authorization headers, cookies, identity fields, URLs containing secrets, and sensitive response fields. 5. Never log request or response bodies for media upload, login, or report endpoints. 6. Avoid modifying the global root logger from a reusable library. 7. Add automated tests that scan logs and assert that known test tokens never appear. 8. Rotate credentials if existing debug logs may have captured them. ]]>

T08 · Insecure Dependencies

Note
Location
skills/smyx_analysis/requirements.txt:1
Finding
Dependency manifest uses an incorrect YAML package name<![CDATA[ ## Vulnerability Details **File Location**: `skills/smyx_analysis/requirements.txt:1-3` **Vulnerability Type**: Dependency confusion or typosquatting exposure **Risk Level**: Low ### Relevant Code ```text pydash==8.0.6 SQLAlchemy==2.0.46 yaml==6.0.3 ``` The source code imports the `yaml` module: ```python import yaml ``` The common module correctly identifies the expected distribution as: ```text PyYAML==6.0.3 ``` ### Technical Analysis The Python module is imported as `yaml`, but the established package distribution that provides it is `PyYAML`. Naming `yaml==6.0.3` in the analysis module’s requirements is inconsistent with the common module and may fail installation or cause package managers using private or additional indexes to resolve an unintended package. No evidence in the audited files proves that a malicious `yaml` distribution is currently installed. The confirmed flaw is the unsafe and incorrect dependency declaration, which creates dependency-confusion and availability risk depending on the configured package indexes. ### Attack Path 1. An installer processes `skills/smyx_analysis/requirements.txt`. 2. It searches configured public or private indexes for a distribution named `yaml` at version `6.0.3`. 3. Installation may fail because the expected dependency is actually `PyYAML`, causing loss of Skill availability. 4. In an environment with a private or attacker-influenced index, an unintended distribution matching that name and version could be selected. 5. Package installation executes distribution build or installation logic with the installer’s privileges. ### Impact Assessment The immediate likely impact is installation failure or inconsistent dependency resolution. In a dependency-confusion scenario, impact could include arbitrary code execution under the account installing the Skill. That elevated scenario depends on the package-index configuration and availability of a matching hostile distribution; it was not demonstra ...[truncated 38 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Replace `yaml==6.0.3` with `PyYAML==6.0.3`. 2. Maintain one authoritative dependency lock file instead of divergent manifests. 3. Use hashes with `pip --require-hashes` or an equivalent locked-build mechanism. 4. Install only from explicitly trusted package indexes. 5. Add CI installation tests in a clean environment to detect invalid package names. 6. Generate and review a software bill of materials for released Skill packages. ]]>
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
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • YARA SignaturesMalware Match, Webshell Match, Cryptominer Match
Findings (58)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
External HTTP communication, auth/token handling, identity generation, persistence, and workspace discovery are sensitive platform-client behaviors that substantially exceed the declared scope of pet video interpretation. In context, this makes the skill more dangerous because users are likely to upload intimate indoor video from their homes and may not realize how broadly the system handles identity and storage.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding
External HTTP communication, auth/token handling, identity generation, persistence, and workspace discovery are sensitive platform-client behaviors that substantially exceed the declared scope of pet video interpretation. In context, this makes the skill more dangerous because users are likely to upload intimate indoor video from their homes and may not realize how broadly the system handles identity and storage.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding
External HTTP communication, auth/token handling, identity generation, persistence, and workspace discovery are sensitive platform-client behaviors that substantially exceed the declared scope of pet video interpretation. In context, this makes the skill more dangerous because users are likely to upload intimate indoor video from their homes and may not realize how broadly the system handles identity and storage.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding
External HTTP communication, auth/token handling, identity generation, persistence, and workspace discovery are sensitive platform-client behaviors that substantially exceed the declared scope of pet video interpretation. In context, this makes the skill more dangerous because users are likely to upload intimate indoor video from their homes and may not realize how broadly the system handles identity and storage.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding
External HTTP communication, auth/token handling, identity generation, persistence, and workspace discovery are sensitive platform-client behaviors that substantially exceed the declared scope of pet video interpretation. In context, this makes the skill more dangerous because users are likely to upload intimate indoor video from their homes and may not realize how broadly the system handles identity and storage.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding
External HTTP communication, auth/token handling, identity generation, persistence, and workspace discovery are sensitive platform-client behaviors that substantially exceed the declared scope of pet video interpretation. In context, this makes the skill more dangerous because users are likely to upload intimate indoor video from their homes and may not realize how broadly the system handles identity and storage.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding
External HTTP communication, auth/token handling, identity generation, persistence, and workspace discovery are sensitive platform-client behaviors that substantially exceed the declared scope of pet video interpretation. In context, this makes the skill more dangerous because users are likely to upload intimate indoor video from their homes and may not realize how broadly the system handles identity and storage.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding
External HTTP communication, auth/token handling, identity generation, persistence, and workspace discovery are sensitive platform-client behaviors that substantially exceed the declared scope of pet video interpretation. In context, this makes the skill more dangerous because users are likely to upload intimate indoor video from their homes and may not realize how broadly the system handles identity and storage.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding
External HTTP communication, auth/token handling, identity generation, persistence, and workspace discovery are sensitive platform-client behaviors that substantially exceed the declared scope of pet video interpretation. In context, this makes the skill more dangerous because users are likely to upload intimate indoor video from their homes and may not realize how broadly the system handles identity and storage.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding
External HTTP communication, auth/token handling, identity generation, persistence, and workspace discovery are sensitive platform-client behaviors that substantially exceed the declared scope of pet video interpretation. In context, this makes the skill more dangerous because users are likely to upload intimate indoor video from their homes and may not realize how broadly the system handles identity and storage.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding
External HTTP communication, auth/token handling, identity generation, persistence, and workspace discovery are sensitive platform-client behaviors that substantially exceed the declared scope of pet video interpretation. In context, this makes the skill more dangerous because users are likely to upload intimate indoor video from their homes and may not realize how broadly the system handles identity and storage.

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
Content
---
name: "smyx-vomiting-regurgitation-detection-analysis"
description: "AI-powered pet vomiting and regurgitation detection from indoor fixed-camera video. Identifies rhythmic abdominal contractions, head-forward extension, and mouth opening actions, plus detects vomitus on the floor (food, hairball, bile). Records event time, frequency, and vomitus characteristics for early digestive issue discovery. Scenarios: daily home health monitoring, multi-pet households, senior pet care, animal hospital inpatient observation. | 通过室内固定摄像头分析宠物活动区域的连续视频,利用动作识别技术检测宠物的呕吐或反流行为(
Confidence
80% confidence
Finding
YARA rule matched a hack tool or exploit indicator (offensive tools, reconnaissance, privilege escalation, or exploit frameworks).

Description-Behavior Mismatch

High
Confidence
97% confidence
Finding
The file defines a generic user-account DAO and persistence model, including identity fields and token-bearing fields, which materially exceeds the stated pet vomiting/regurgitation video-analysis purpose. In a narrowly scoped health-monitoring skill, this kind of unrelated identity persistence increases the attack surface and creates unnecessary collection of potentially sensitive data without clear functional justification.

Context-Inappropriate Capability

High
Confidence
98% confidence
Finding
Storing token and open_token values in a local SQLite database is highly sensitive behavior and appears unrelated to the described pet video monitoring capability. If those tokens are compromised, they may enable account takeover, API abuse, or unauthorized access far beyond the skill's stated function.

Description-Behavior Mismatch

High
Confidence
97% confidence
Finding
This utility layer performs broad identity bootstrap, token handling, local user lookup, and arbitrary remote platform interaction that is unrelated to the advertised pet vomiting/regurgitation video analysis function. In skill context, this scope mismatch is dangerous because installing a narrowly described vision-health skill would implicitly grant code that can authenticate to external services and operate with workspace-derived identities, increasing the chance of covert data use and user surprise.

Context-Inappropriate Capability

High
Confidence
98% confidence
Finding
The code silently logs in or auto-registers a user against an external health service using a derived username/openId, then stores returned tokens locally for future use. This creates an undisclosed external account linkage and can cause unintended account creation, identity misuse, and token issuance without the user knowingly authorizing such actions.

Lp3

Medium
Category
MCP Least Privilege
Confidence
89% confidence
Finding
The skill advertises and instructs use of shell, network, file, and environment-backed capabilities, but does not declare an explicit tool scope such as permissions or allowed-tools. This weakens least-privilege controls and makes it easier for the skill to access sensitive local files, make outbound requests, or invoke commands beyond what a reviewer or runtime policy expects.

Missing User Warnings

Medium
Confidence
98% confidence
Finding
The skill handles local video files and remote URLs but does not clearly warn that home/indoor pet footage may be uploaded to a cloud API for analysis. This creates a meaningful privacy and consent problem because such footage can reveal people, household layouts, routines, and other sensitive details beyond the pet behavior itself.

Vague Triggers

Medium
Confidence
93% confidence
Finding
The default trigger is broad enough to activate on generic pet-video analysis requests, increasing the chance of accidental invocation and unintended upload of user media to the backing service. Overbroad activation is especially risky here because the skill appears to have undisclosed remote-analysis and history functions.

Vague Triggers

Medium
Confidence
90% confidence
Finding
Ambiguous keywords like general digestive-abnormality terms can trigger the skill when a user did not intend vomiting/regurgitation analysis or remote report access. This can cause misrouting of sensitive media or queries to an overprivileged skill.

Natural-Language Policy Violations

Medium
Confidence
94% confidence
Finding
The method returns a fixed Chinese-language heading string, which suggests the skill output is forced into a specific language regardless of user preference. Under the policy, language constraints should either offer user choice or be clearly documented and justified.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
The script's argument descriptions and runtime messages are presented only in Chinese, which imposes a specific language on all users without any opt-in or locale selection. Under the policy, language constraints should either offer user choice or be clearly documented as justified and region-specific.

Context-Inappropriate Capability

Medium
Confidence
95% confidence
Finding
The script initializes a user identity and exposes a hidden history-listing path that is unrelated to the advertised single-video analysis function. Because `--open-id` and `--api-key` are suppressed from help while `--list` can retrieve prior analysis records via `ConstantEnum.CURRENT__OPEN_ID`, the tool creates an undisclosed access path to potentially sensitive historical data.

Missing User Warnings

Medium
Confidence
97% confidence
Finding
`OpenIdUtil.resolve_current_open_id(args.open_id, use_current=bool(args.open_id))` performs hidden identity initialization without a clear user-facing notice or consent flow. In a health-monitoring context, silently resolving identity can link behavioral/video-derived results to a user account and enable privacy-invasive data access or correlation.

Whitespace Padding

Medium
Category
Prompt Injection
Content
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
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.

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