Back to skill

Security audit

极鲸云Coupang数据分析与市场调研

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent Coupang research tool, but it stores login tokens in too many local places, including a mismatched Temu-named folder.

Review this before installing if you will authenticate to GeekBI. The product research behavior appears aligned with the stated purpose, but login state may be copied into project and skill folders as well as a mismatched Temu-named config folder, which can expose tokens if those folders are shared, archived, or accessed by another local skill.

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:60
Finding

Bearer Token Replicated Across Unnecessary and Conflicting Storage Locations

Content
View full analysis

Vulnerability Details

File Location: scripts/geekbi_auth.py:60-79, 379-392, 637-648
Vulnerability Type: Excessive credential replication and cross-Skill authentication namespace collision
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_server["accessTokenExpiresA
...[truncated 3336 chars]
Remediation
View remediation

Remediation Suggestions

  1. Replace the unrelated temu-research-skill directory with a dedicated namespace such as geekbi-coupang-research-skill.
  2. Keep one authoritative authentication store in the operating system's user configuration or credential-storage facility. Do not mirror bearer tokens into the Skill installation directory or current working directory.
  3. Prefer an operating-system credential manager or keyring for the access token. Store only non-sensitive metadata in JSON when practical.
  4. Implement a migration routine that reads legacy state once, writes it to the corrected secure location, and removes obsolete copies from the Temu namespace, Skill directory, and workspace.
  5. Avoid silently suppressing failures when deleting legacy credential files. Report failed cleanup so users can remove residual token copies.
  6. Continue enforcing owner-only permissions on POSIX systems and add equivalent access-control validation for Windows.
  7. Bind state records to an allowlisted HTTPS origin and reject non-HTTPS authentication base URLs before loading or transmitting a token.
  8. Add automated tests asserting that authentication state is written only to the intended Coupang-specific location, that no workspace copy is created, and that file permissions are restrictive.
  9. Invalidate or rotate tokens that may already have been replicated, particularly where project or workspace directories have been shared or archived.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (19)

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

If the underlying skill actually performs authentication, stores local credential state, and exposes management commands unrelated to the declared research purpose, that is a meaningful security concern because users and reviewers may not expect credential handling or persistent local state. Undeclared auth/token workflows can expand attack surface, increase secret-exposure risk, and bypass informed consent about what the skill really does.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

If the underlying skill actually performs authentication, stores local credential state, and exposes management commands unrelated to the declared research purpose, that is a meaningful security concern because users and reviewers may not expect credential handling or persistent local state. Undeclared auth/token workflows can expand attack surface, increase secret-exposure risk, and bypass informed consent about what the skill really does.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

If the underlying skill actually performs authentication, stores local credential state, and exposes management commands unrelated to the declared research purpose, that is a meaningful security concern because users and reviewers may not expect credential handling or persistent local state. Undeclared auth/token workflows can expand attack surface, increase secret-exposure risk, and bypass informed consent about what the skill really does.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

If the underlying skill actually performs authentication, stores local credential state, and exposes management commands unrelated to the declared research purpose, that is a meaningful security concern because users and reviewers may not expect credential handling or persistent local state. Undeclared auth/token workflows can expand attack surface, increase secret-exposure risk, and bypass informed consent about what the skill really does.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

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.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

该描述将触发条件表述为“用户提出 Coupang 综合选品、韩国市场机会、类目赛道、火箭配送或规格竞争,且需要多类数据形成经营判断时使用”,属于较长的自然语言概括,而不是明确、可枚举的触发短语。虽然领域有限定,但仍缺少不应触发的负例或更清晰的边界,容易与一般性的市场分析请求重叠。

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

标题与全文均以中文固定描述该技能的行为,且未说明可根据用户偏好切换语言或先征求语言选择。按照语言/地区政策,若技能默认强制特定语言而没有用户选择机制,属于自然语言政策风险。

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The display name, description, and default prompt are all written exclusively in Chinese and specify behavior for Coupang Korea research without offering any language or locale choice. This can violate language/locale policy because the skill appears to enforce a specific language experience rather than allowing user opt-in or documenting a justified region-specific language constraint.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The instruction requires responses to state '韩国站, KRW' as a uniform requirement, which imposes a specific locale/currency context in natural language. There is no indication that users can opt into a different language/locale or that this constraint is justified as a region-specific compliance requirement.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This code file contains user-facing natural-language strings entirely in Chinese, including the module description, argument help, and error messages, and it defaults the country argument to a Chinese value. Under the policy for natural-language violations, forcing a specific language without user opt-in is reportable when no alternative locale or language selection is offered.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The auth state is stored under a hard-coded different skill namespace ("temu-research-skill") even though this skill is for Coupang. That can cause credential/state mix-ups across skills, leading to cross-skill token reuse, accidental disclosure of login state, or one skill clearing/overwriting another skill's auth data if they share the same backend or host.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The clear_auth_state function unlinks authentication state files from all resolved stores, which is a destructive file operation affecting persisted login data. The function and its CLI entry point expose no confirmation prompt and provide no explicit user-facing warning beyond the terse command name/help text.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

The code rejects any site_id other than 1 and emits a message stating that only the Korean Coupang site is supported. This enforces a specific locale/region in user-facing behavior without offering a language/locale choice or documenting a compliance-style justification in the file.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

The code rejects any site_id other than 1 and emits a message stating that only the Korean Coupang site is supported. This is a natural-language locale constraint embedded in code, and the file does not offer a user choice or explain a justified region-specific policy exception.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

The script enforces siteId=1 and states that only the Korean Coupang site is supported. This is a locale restriction expressed in natural language and behavior, but the file does not present it as a user choice or clearly justify it as a region-specific tool beyond the error text.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
79% confidence
Finding

This code performs an authenticated HTTP request using user-supplied identifiers and a base URL, but the file provides no explicit user-facing warning or disclosure about transmitting query data over the network. While network access is central to the skill's purpose, there is no comment, prompt, or message in this file clarifying that the request is sent to an external service.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
81% confidence
Finding

This Python file performs an outbound authenticated HTTP request to a remote Coupang search API using user-supplied parameters. While the script name and argument names imply search behavior, there is no explicit user-facing warning or comment that entered search terms and filters will be sent to an external service.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

The module docstring is written entirely in Chinese, and user-facing error messages throughout the file are also hard-coded in Chinese. This imposes a language choice without indicating user opt-in or documenting that the skill is intentionally limited to Chinese-speaking users.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

The module docstring is written only in Chinese, and all user-facing messages and CLI descriptions in this file are also fixed to Chinese with no indication of locale choice. This creates a language policy concern because the skill imposes one language for interaction rather than offering opt-in or documented locale constraints.

Content

No source excerpt is available for this finding.