Back to skill

Security audit

Image Quality Assessment Analysis Tool | 图像质量检测分析工具

Security checks for vulnerabilities and agentic risk

Overview

This image-quality skill mostly matches its stated purpose, but it silently creates/reuses account identity, stores tokens locally, and can expose cloud history in shared workspaces.

Review before installing, especially in shared or managed workspaces. Expect local files or provided URLs to be sent to LifeEmergence cloud APIs, and expect the skill to create/reuse a local identity and store account tokens. Avoid using it for sensitive surveillance media or multi-user deployments until identity isolation, explicit consent, and token storage behavior are tightened.

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/image_quality_detection_analysis.py:53
Finding

Shared fallback identity can expose cloud analysis records across users

Content
View full analysis

Vulnerability Details

File Location: scripts/image_quality_detection_analysis.py:53-58; skills/smyx_common/scripts/util.py:461-469, 617-625; skills/smyx_analysis/scripts/skill.py:143-156
Vulnerability Type: Shared fallback identity and insufficient per-user isolation
Risk Level: Medium

Complete Code Snippets

scripts/image_quality_detection_analysis.py:53-58:

python
# 初始化内部用户身份;不要求用户输入,也不在帮助信息中展示。
OpenIdUtil.resolve_current_open_id(args.open_id, use_current=bool(args.open_id))

# 检查必需参数
if args.list:
    open_id = ConstantEnum.CURRENT__OPEN_ID

skills/smyx_common/scripts/util.py:461-469:

python
if not resolved_open_id and use_current:
    resolved_open_id = ConstantEnum.CURRENT__OPEN_ID or ConstantEnum.CURRENT__USER_NAME
if not resolved_open_id:
    resolved_open_id = cls.get_api_key_file_open_id()
if not resolved_open_id:
    resolved_open_id = cls.get_or_create_default_open_id()

ConstantEnum.CURRENT__OPEN_ID = resolved_open_id
if not ConstantEnum.CURRENT__USER_NAME:
    ConstantEnum.CURRENT__USER_NAME = resolved_open_id

skills/smyx_common/scripts/util.py:617-625:

python
ConstantEnum.DEFAULT__SKILL_PLATFORM_NAME and data.setdefault('skillPlatform',
                                                              ConstantEnum.DEFAULT__SKILL_PLATFORM_NAME)
if current__user_name:
    data.setdefault('pnaUserName', current__user_name)

if bool(options.get("dataAsParams")) or bool(options.get("data_as_params")):
    params.update(data)

skills/smyx_analysis/scripts/skill.py:143-156:

python
open_id = argss.pop('open_id', None)
# if not open_id:  ## ARK_CLAW ##
#     return "⚠️ 错误:缺少 open_id 参数"

response = self.page(pageNum, pageSize, *args, **argss)

if response:
    for item in response:
        if item.get("commonAiResponse") or item.get("healthAiResponse"):
            item["reportImageUrl"] = _get_analysis_export_url(
...[truncated 2474 chars]
Remediation
View remediation

Remediation Suggestions

  1. Require a verified, per-caller identity for cloud uploads and history queries. Reject these operations when no authenticated caller identity is available.
  2. Remove the workspace-wide fallback identity from multi-user execution paths. If fallback identities are needed for local demonstrations, restrict them to an explicit single-user mode that is disabled by default.
  3. Do not treat a caller-controlled username or pnaUserName value as authorization. Bind report ownership to the server-authenticated principal and tenant.
  4. Reinstate and enforce the missing-identity check before uploads and report-list requests rather than leaving it commented out.
  5. Ensure the cloud API verifies that requested reports belong to the authenticated caller and tenant, independently of client-supplied request fields.
  6. Store per-user identity state in isolated storage keyed by a verified platform user identifier, with restrictive filesystem permissions.
  7. Add integration tests in which two distinct callers use the same Skill installation and verify that neither can list, retrieve, or generate links for the other caller’s reports.
  8. Existing deployments should identify records created under shared fallback identities and migrate, segregate, or revoke access to those records as appropriate.
Vulnerability Patterns
  • 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
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (60)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The reported combination of requests-based API execution, token/header handling, automatic account creation/login, local workspace discovery, and general utilities goes far beyond a simple camera-image defect checker. In context, this makes the skill more dangerous because users are likely to provide sensitive local media while assuming a narrow, low-risk analysis path.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The reported combination of requests-based API execution, token/header handling, automatic account creation/login, local workspace discovery, and general utilities goes far beyond a simple camera-image defect checker. In context, this makes the skill more dangerous because users are likely to provide sensitive local media while assuming a narrow, low-risk analysis path.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The reported combination of requests-based API execution, token/header handling, automatic account creation/login, local workspace discovery, and general utilities goes far beyond a simple camera-image defect checker. In context, this makes the skill more dangerous because users are likely to provide sensitive local media while assuming a narrow, low-risk analysis path.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The reported combination of requests-based API execution, token/header handling, automatic account creation/login, local workspace discovery, and general utilities goes far beyond a simple camera-image defect checker. In context, this makes the skill more dangerous because users are likely to provide sensitive local media while assuming a narrow, low-risk analysis path.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The reported combination of requests-based API execution, token/header handling, automatic account creation/login, local workspace discovery, and general utilities goes far beyond a simple camera-image defect checker. In context, this makes the skill more dangerous because users are likely to provide sensitive local media while assuming a narrow, low-risk analysis path.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The reported combination of requests-based API execution, token/header handling, automatic account creation/login, local workspace discovery, and general utilities goes far beyond a simple camera-image defect checker. In context, this makes the skill more dangerous because users are likely to provide sensitive local media while assuming a narrow, low-risk analysis path.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The reported combination of requests-based API execution, token/header handling, automatic account creation/login, local workspace discovery, and general utilities goes far beyond a simple camera-image defect checker. In context, this makes the skill more dangerous because users are likely to provide sensitive local media while assuming a narrow, low-risk analysis path.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The reported combination of requests-based API execution, token/header handling, automatic account creation/login, local workspace discovery, and general utilities goes far beyond a simple camera-image defect checker. In context, this makes the skill more dangerous because users are likely to provide sensitive local media while assuming a narrow, low-risk analysis path.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The reported combination of requests-based API execution, token/header handling, automatic account creation/login, local workspace discovery, and general utilities goes far beyond a simple camera-image defect checker. In context, this makes the skill more dangerous because users are likely to provide sensitive local media while assuming a narrow, low-risk analysis path.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The reported combination of requests-based API execution, token/header handling, automatic account creation/login, local workspace discovery, and general utilities goes far beyond a simple camera-image defect checker. In context, this makes the skill more dangerous because users are likely to provide sensitive local media while assuming a narrow, low-risk analysis path.

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: "image-quality-detection-analysis"
description: "Detects quality issues in camera footage such as black/white screens, color cast, stripes, noise, and blurriness. Suitable for security surveillance and camera self-check scenarios. | 图像质量检测分析工具,检测摄像头画面出现的全黑、全白、偏色、条纹、雪花、模糊等质量问题,适用于安防监控、摄像头自检等场景"
version: "1.0.16"
license: "MIT-0"
---

# 🖼️ Image Quality Assessment Analysis Tool | 图像质量检测分析工具
> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查�

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

The entrypoint behavior does not match the declared skill purpose: instead of narrowly performing image-quality detection, it exposes a broader analysis flow and related account-linked functionality. Capability mismatch is dangerous because users, reviewers, and policy controls may approve the skill under a narrower trust model while it performs additional operations that could process or expose unrelated data.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
94% confidence
Finding

This file exposes a generic HTTP service wrapper with broad CRUD-style methods and arbitrary URL forwarding, which materially exceeds the stated scope of an image-quality detection skill. In a skill expected to analyze footage, providing reusable remote request primitives increases the chance of hidden data exfiltration, unauthorized API access, or unintended interaction with unrelated backend services, especially because the methods accept caller-controlled URLs and payloads with no visible restriction or allowlist.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill includes state-changing remote capabilities such as add, edit, delete, POST, PUT, and DELETE even though its declared purpose is read-like image quality analysis. In this context, those methods create unjustified power to modify remote systems, which could be abused by the skill or by downstream code to alter data, trigger administrative actions, or conceal malicious behavior behind an unrelated surveillance-analysis feature.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The file implements a shared user/account DAO and default-user selection logic that is unrelated to the advertised image-quality detection purpose. This mismatch is dangerous because it introduces hidden identity and persistence capabilities into a vision-analysis skill, increasing the chance of unauthorized account handling, covert data retention, and privilege confusion across skills.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The User model stores authentication-related data including token and open_token, which is unrelated to image-quality analysis and materially increases sensitivity of the skill. If this database is accessed by other parts of the skill ecosystem or compromised locally, these secrets could enable account takeover, session abuse, or cross-skill impersonation.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The code reads agent workspace state, creates persistent data directories, loads an internal identity value from a local file, and can generate or persist default user identities. For a camera-quality analysis skill, this is unjustified persistence and identity handling that can track users or silently bind the skill to a reusable account without clear need or notice.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

This utility file implements broad identity management, workspace state discovery, credential loading, silent account provisioning, token persistence, and authenticated remote API access that are unrelated to an image-quality detection skill. In the context of a camera footage analysis tool, this substantially expands the skill's privilege and data-handling scope, creating unnecessary opportunities for covert account creation, credential use, and external data transmission.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The request wrapper automatically attaches tokens, resolves a current username/open-id, performs silent login/registration via /sys/phoneLogin, stores returned tokens, and retries authorization failures. In an image-analysis skill, this behavior is dangerous because it enables undisclosed authenticated communication and account lifecycle actions far beyond the advertised functionality.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
89% confidence
Finding

The skill declares no explicit tool or permission scope even though its documented behavior includes shell execution, local file read/write, environment access, and network/API calls. That omission removes an important security boundary and can let an agent invoke powerful capabilities without transparent least-privilege constraints, increasing the blast radius of prompt abuse or accidental misuse.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The default trigger condition is broad enough that the skill may auto-invoke whenever a user mentions image quality or provides media, even if they did not intend to send files to this particular workflow. Overbroad triggering increases the chance of unintended file handling, remote transmission, or invocation of hidden history/account features.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

Auto-triggering historical report queries on broad everyday phrases can cause unexpected retrieval of account-linked cloud data. In this skill's context, that is more dangerous because the history feature appears identity-associated and cloud-backed, so accidental invocation may expose prior reports or metadata the user did not intend to surface.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill states that uploaded attachments are automatically saved locally, but the warning is not prominent as a user-facing privacy disclosure. Automatic local persistence of uploaded media can surprise users, create residual sensitive data on disk, and enlarge the compromise window if the host is shared or later breached.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill lacks a clear warning that user-provided URLs and files may be sent to cloud APIs or fetched remotely by an external service. This is dangerous because it can expose sensitive surveillance imagery, enable SSRF-like fetch behavior against attacker-chosen URLs by the remote service, and undermine user expectations about local-only processing.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill enforces hidden internal identity handling, default-user reuse, and possible auto-creation of a local user without user choice. In context, that is especially risky because the skill also supports cloud history queries and report linkage, so silent identity binding can mix data across sessions, users, or devices and obscure accountability.

Content

No source excerpt is available for this finding.

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