Back to skill

Security audit

极鲸云Ozon评论搜索

Security checks for vulnerabilities and agentic risk

Overview

The skill appears to do the advertised Ozon review lookup, but it persistently stores GeekBI login tokens in multiple local places, including the workspace, without clearly disclosing that to users.

Review before installing. The review-search workflow is coherent, but installing and using it may create GeekBI auth files containing bearer tokens under user config, the skill directory, and the current workspace. Use it only in workspaces you control, avoid committing or sharing .geekbi files, and prefer a version that stores tokens in one clearly documented credential location.

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/geekbi_auth.py:55
Finding

Bearer tokens and device authorization state are unnecessarily replicated across multiple local directories

Content
View full analysis

Vulnerability Details

File Location: scripts/geekbi_auth.py:55-75, scripts/geekbi_auth.py:349-361, scripts/geekbi_auth.py:637-648
Vulnerability Type: Excessive replication of plaintext authentication state
Risk Level: Medium

Vulnerable Code

python
def _user_config_state_path():
    return _absolute_path(
        user_config_path("GeekBI", appauthor=False, ensure_exists=True)
        / "temu-research-skill"
        / AUTH_FILE_NAME
    )


def _skill_state_path():
    return _absolute_path(Path(__file__).parent.parent / AUTH_STATE_DIR / AUTH_FILE_NAME)


def _workspace_state_path():
    return _absolute_path(Path(os.getcwd()) / AUTH_STATE_DIR / AUTH_FILE_NAME)


def _resolve_stores():
    candidates = (
        ResolvedStore(_user_config_state_path(), "user-config-directory"),
        ResolvedStore(_skill_state_path(), "skill-directory"),
        ResolvedStore(_workspace_state_path(), "working-directory"),
    )
python
def _write_state_files(stores, payload):
    normalized = _normalize_state(payload)
    errors = []
    written = 0
    for store in stores:
        try:
            _write_state_file(store, normalized)
            written += 1
        except OSError as error:
            errors.append(f"{store.kind}: {_storage_probe_reason(error)}")
    if written == 0:
        reason = ";".join(errors) or "登录状态目录不可用"
        raise OSError(reason)
python
def save_token(latest):
    latest_server = latest["servers"].get(server_key)
    if not isinstance(latest_server, dict):
        return False, False
    latest_pending = latest_server.get("pending")
    if not isinstance(latest_pending, dict):
        return False, False
    if latest_pending.get("deviceCode") != pending.get("deviceCode"):
        return False, False
    _remove_access_token(latest_server)
    latest_server["accessToken"] = access_token
    latest_serve
...[truncated 3282 chars]
Remediation
View remediation

Remediation Suggestions

  1. Use one canonical credential store. Store authentication state only in the operating-system user configuration directory. Remove the Skill-directory and working-directory stores from _resolve_stores().

  2. Prefer an operating-system credential manager. Store bearer tokens through facilities such as Windows Credential Manager, macOS Keychain, or Secret Service on Linux. Keep only non-sensitive metadata in the JSON state file.

  3. Migrate legacy copies safely. During an upgrade:

    • Read existing stores according to a documented migration order.
    • Move valid state into the canonical protected store.
    • Delete legacy Skill and workspace copies after successful migration.
    • Warn the user when a legacy file cannot be removed.
  4. Maintain strict file permissions. If file-based storage remains necessary, create the parent directory with owner-only access and the state file with mode 0600. On platforms where equivalent restrictions cannot be guaranteed, fail closed or use the platform credential manager.

  5. Minimize stored secrets. Do not persist device codes or authorization URLs longer than required. Remove expired and completed authorization state promptly.

  6. Add automated security tests. Verify that authentication never creates .geekbi/agent-auth.json in the current workspace or Skill directory and that migration deletes historical copies.

  7. Correct the configuration namespace. Review the stale-looking "temu-research-skill" user configuration path and replace it with a project-specific Ozon Skill namespace to prevent unintended state sharing with another Skill.

Vulnerability Patterns
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (9)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill claims to query and analyze Ozon product reviews by goodsId, but the detected behavior instead includes site-list lookup and site-matching logic without actually using goodsId or returning review data. This is dangerous because users and downstream systems may trust outputs as evidence-based review analysis when the underlying workflow does not perform the advertised operation, creating integrity and decision-making risks.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill claims to query and analyze Ozon product reviews by goodsId, but the detected behavior instead includes site-list lookup and site-matching logic without actually using goodsId or returning review data. This is dangerous because users and downstream systems may trust outputs as evidence-based review analysis when the underlying workflow does not perform the advertised operation, creating integrity and decision-making risks.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
80% confidence
Finding

The skill declares no explicit tool scope even though it appears to rely on file access, network access, and shell-capable components. Missing least-privilege restrictions can let the skill exercise broader capabilities than users expect, increasing the blast radius if the skill is modified, compromised, or invoked in an unintended context.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This Python file contains the module docstring entirely in Chinese, and throughout the file user-facing CLI descriptions, errors, and action messages are also presented only in Chinese. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale constraint is clearly documented and justified, which is not present here.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The manifest describes a skill for querying and analyzing real Ozon reviews given an explicit goodsId, but this file implements a full local authentication-state subsystem: resolving multiple storage locations, locking files, mirroring state, clearing auth state, and handling login challenges. While some authentication is an implementation detail for remote access, persistent multi-store credential/state management is a substantial behavior not reflected in the user-facing description's strict query-only framing.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The manifest describes a skill for querying and analyzing real Ozon product reviews using a specific goodsId, but this file instead retrieves and resolves a list of supported Ozon sites and accepts a country/site identifier rather than a product ID. While site discovery may be a supporting utility, this behavior is not described in the manifest and materially broadens the exposed functionality beyond review retrieval/analysis.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

The natural-language description and title are fully presented in Chinese, which can amount to forcing a specific language on users without an explicit choice. The policy allows locale constraints when clearly documented and justified, but this README does not state that the skill is region- or language-specific.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
97% confidence
Finding

The module is presented as GeekBI agent auth for this Ozon review search skill, but the configured user state path uses the directory name "temu-research-skill". This actively suggests the auth state belongs to a different skill/context, contradicting the apparent intent and creating confusion about which skill owns the persisted login state.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

This Python file contains natural-language strings solely in Chinese, including the module docstring and CLI descriptions, without any indication that language choice is configurable or that the skill is region-specific. Under the policy criteria, forcing a specific language without user opt-in can be a locale-policy issue.

Content

No source excerpt is available for this finding.