Back to skill

Security audit

1688-shop-daily-report

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent 1688 shop reporting tool, but it can expose access-key material and provides broader data-query and file-output authority than a daily report needs.

Install only if you trust the publisher and are comfortable granting access to bound-shop operational data. Before production use, sanitize get_bindlist so AK fields are never printed or passed to the agent, restrict supplemental API paths to an allowlist, confine report exports to a dedicated reports directory, and make any recurring daily-report setup explicit and reversible.

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

T09 · Insecure Skill Coding Practices

Error
Location
scripts/capabilities/get_bindlist/cmd.py:25
Finding

Access-Key Material Is Exposed Through Binding-List CLI Output

Content
View full analysis
dict: """获取当前用户的多店铺绑定关系及 AK Returns: API 响应 data 字段,包含 bindList 数组 每个元素包含:companyName, isOwner, ak """ data = api_post("/api/alibaba.1688.newton.shop.list.binds/1.0.0", {}) if not isinstance(data, dict): raise ServiceError("格式异常,请稍后重试") return data ``` ```python # scripts/capabilities/get_bindlist/cmd.py try: result = get_bindlist() print_output(True, "多店铺绑定关系查询成功", { "data": result, }) except Exception as e: print_error(e, {"data": {}}) ``` ### Technical Analysis The binding-list service documentation explicitly states that each returned entry can contain an `ak` field. The service returns the gateway response without applying a field-level allowlist, and the command serializes that complete response into standard output. As a result, access-key material returned by the gateway can enter: - Agent or model context - Workflow execution traces - Terminal output and shell logs - Diagnostic captures - Copied or forwarded command output Encoding a credential with Base64 would not mitigate this issue because Base64 is reversible and provides no confidentiality. The command only needs shop identifiers and display metadata for report generation; returning per-shop access-key material exceeds the minimum data exposure required by the declared functionality. ### Attack Path 1. An authenticated user or workflow invokes `python3 cli.py get_bindlist`. 2. The service sends an authenticated request to the binding-list API. 3. The gateway returns binding entries that may include `companyName`, `isOwner`, and `ak`. 4. `get_bindlist()` returns the response without r ...[truncated 866 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/capabilities/get_multi_shop_report/cmd.py:129
Finding

Arbitrary Writable Files Can Be Overwritten Through the Report Output Path

Content
View full analysis
str: """将完整结果写入文件(自动创建父目录),返回绝对路径 避免 Agent 端手动 `mkdir` + shell 重定向:目录不存在时由本函数创建, 保证在任意部署目录下都能落盘成功。 """ abspath = os.path.abspath(os.path.expanduser(path)) os.makedirs(os.path.dirname(abspath), exist_ok=True) # 以缩进多行格式写入(而非压缩单行):多行 JSON 可被读文件工具按行范围分段读取, # 避免一条超长单行被从中间硬截断、进而迫使 Agent 改用临时脚本读取。 with open(abspath, "w", encoding="utf-8") as f: json.dump(make_output(True, markdown, data), f, ensure_ascii=False, indent=2) return abspath ``` The path reaches this function from the user-controllable `--output_file` argument: ```python parser.add_argument( "--output_file", help="将完整 JSON 结果写入该文件(自动创建目录,无需手动 mkdir);stdout 仅打印摘要", ) ``` ### Technical Analysis `_dump_full()` expands and normalizes the supplied path but does not restrict it to the project report directory documented by the Skill. Absolute paths and traversal-resolved paths are accepted. The file is then opened with mode `"w"`, which truncates an existing target before writing the report. The implementation also does not reject symbolic-link targets or use no-follow semantics. Therefore, if an attacker can influence the output path or a path component, the write may be redirected to another file accessible to the process. The vulnerability is constrained by the operating-system permissions of the account running the Skill. It does not bypass filesystem permissions, but it unnecessarily exposes all files writable by that account instead of limiting writes to the intended report directory. ### Attack Path 1. An attacker, untrusted caller, or manipulated agent controls the `--output_file` argument. 2. The attacker supplies an absolute path or a traversal path resolving ...[truncated 1225 chars]
Remediation
View remediation
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • 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
Findings (91)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Exposing arbitrary data-source and API-path access across shops turns the skill into a broad data access broker rather than a narrow report generator. In the context of multi-shop business data, that significantly increases the risk of collecting or disclosing information beyond the user's intended request.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Exposing arbitrary data-source and API-path access across shops turns the skill into a broad data access broker rather than a narrow report generator. In the context of multi-shop business data, that significantly increases the risk of collecting or disclosing information beyond the user's intended request.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Exposing arbitrary data-source and API-path access across shops turns the skill into a broad data access broker rather than a narrow report generator. In the context of multi-shop business data, that significantly increases the risk of collecting or disclosing information beyond the user's intended request.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Exposing arbitrary data-source and API-path access across shops turns the skill into a broad data access broker rather than a narrow report generator. In the context of multi-shop business data, that significantly increases the risk of collecting or disclosing information beyond the user's intended request.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Exposing arbitrary data-source and API-path access across shops turns the skill into a broad data access broker rather than a narrow report generator. In the context of multi-shop business data, that significantly increases the risk of collecting or disclosing information beyond the user's intended request.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Exposing arbitrary data-source and API-path access across shops turns the skill into a broad data access broker rather than a narrow report generator. In the context of multi-shop business data, that significantly increases the risk of collecting or disclosing information beyond the user's intended request.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

Exposing arbitrary data-source and API-path access across shops turns the skill into a broad data access broker rather than a narrow report generator. In the context of multi-shop business data, that significantly increases the risk of collecting or disclosing information beyond the user's intended request.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Exposing arbitrary data-source and API-path access across shops turns the skill into a broad data access broker rather than a narrow report generator. In the context of multi-shop business data, that significantly increases the risk of collecting or disclosing information beyond the user's intended request.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Exposing arbitrary data-source and API-path access across shops turns the skill into a broad data access broker rather than a narrow report generator. In the context of multi-shop business data, that significantly increases the risk of collecting or disclosing information beyond the user's intended request.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

Exposing arbitrary data-source and API-path access across shops turns the skill into a broad data access broker rather than a narrow report generator. In the context of multi-shop business data, that significantly increases the risk of collecting or disclosing information beyond the user's intended request.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

Exposing arbitrary data-source and API-path access across shops turns the skill into a broad data access broker rather than a narrow report generator. In the context of multi-shop business data, that significantly increases the risk of collecting or disclosing information beyond the user's intended request.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Exposing arbitrary data-source and API-path access across shops turns the skill into a broad data access broker rather than a narrow report generator. In the context of multi-shop business data, that significantly increases the risk of collecting or disclosing information beyond the user's intended request.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Exposing arbitrary data-source and API-path access across shops turns the skill into a broad data access broker rather than a narrow report generator. In the context of multi-shop business data, that significantly increases the risk of collecting or disclosing information beyond the user's intended request.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

Exposing arbitrary data-source and API-path access across shops turns the skill into a broad data access broker rather than a narrow report generator. In the context of multi-shop business data, that significantly increases the risk of collecting or disclosing information beyond the user's intended request.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

Exposing arbitrary data-source and API-path access across shops turns the skill into a broad data access broker rather than a narrow report generator. In the context of multi-shop business data, that significantly increases the risk of collecting or disclosing information beyond the user's intended request.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

Exposing arbitrary data-source and API-path access across shops turns the skill into a broad data access broker rather than a narrow report generator. In the context of multi-shop business data, that significantly increases the risk of collecting or disclosing information beyond the user's intended request.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

Exposing arbitrary data-source and API-path access across shops turns the skill into a broad data access broker rather than a narrow report generator. In the context of multi-shop business data, that significantly increases the risk of collecting or disclosing information beyond the user's intended request.

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 19)May include surrounding context.

md
> 🧩 **本 Skill 已 workflow 化**。标准日报链路由 [`workflow/1688-shop-daily-report.js`](./workflow/1688-shop-daily-report.js) 编排执行(意图识别 → 日期解析 → 单店/多店子图 → 行动选择);本文档是 **work

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

This instruction tells the agent to create and enable a daily scheduled task after the user selects the option, which is a persistent configuration change rather than a read-only reporting action. Because it changes future system behavior and can trigger recurring messages/actions, it creates a meaningful side effect that may be surprising, abused, or executed without sufficiently informed consent.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/_tracker.py (reported line 8)May include surrounding context.

python
职责:每次 CLI 命令执行时,向 skill 网关上报一次调用记录,用于统计 skill 调用次数。
上报失败不影响主流程,静默处理。

环境变量(从项目根目录 .env 读取):
    SKILL_NAME     skill 名称,默认 1688-shop-daily-report
    SKILL_VERSION  skill 版本,默认 1.0.0
    SKILL_CHANNEL  发布渠道,默认 clawhubai

Credential Access

High
Category
Privilege Escalation
Confidence
91% confidence
Finding

Constructing a path to the project .env and loading it for telemetry broadens access to potentially sensitive configuration unrelated to the skill’s purpose. While the code does not exfiltrate all secrets directly, it unnecessarily brings credentials into process scope, which can enable accidental leakage or misuse by other code paths.

Content

Scanner excerpt · scripts/_tracker.py (reported line 25)May include surrounding context.

python
_ROOT_DIR = Path(__file__).parent.parent

def _load_env_file() -> None:
    """解析项目根目录的 .env 文件,将变量注入 os.environ(已有环境变量不覆盖)。"""
    env_path = _ROOT_DIR / ".env"
    if not env_path.exists():
        return

Credential Access

High
Category
Privilege Escalation
Confidence
92% confidence
Finding

Opening and parsing the project .env file for a telemetry helper is a form of unnecessary secret access. In the context of a shop daily report skill, this behavior is not justified by core functionality and increases the sensitivity of the module and the process it runs in.

Content

Scanner excerpt · scripts/_tracker.py (reported line 26)May include surrounding context.

python
def _load_env_file() -> None:
    """解析项目根目录的 .env 文件,将变量注入 os.environ(已有环境变量不覆盖)。"""
    env_path = _ROOT_DIR / ".env"
    if not env_path.exists():
        return
    with open(env_path, encoding="utf-8") as f:

Credential Access

High
Category
Privilege Escalation
Confidence
90% confidence
Finding

Injecting .env values into os.environ at module load time propagates potentially sensitive settings globally within the process. That can unintentionally expose credentials to imported libraries, subprocesses, diagnostics, or future code changes, making accidental disclosure more likely.

Content

Scanner excerpt · scripts/_tracker.py (reported line 41)May include surrounding context.

python
if key and key not in os.environ:
                os.environ[key] = value

# 模块加载时解析一次 .env
_load_env_file()

def _get_skill_env() -> tuple[str, str, str]:

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

This file implements a credential-configuration CLI for an AK, which is materially unrelated to the skill's declared purpose of generating a 1688 shop daily analytics report. In a skill package whose expected behavior is reporting and analysis, hidden or undocumented credential-handling functionality expands the attack surface and can facilitate unauthorized secret collection or persistence, especially if users are prompted to provide sensitive keys outside the stated workflow.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

The file adds a capability for querying account binding relationships and AK information without any visible tie to the stated daily-report functionality. That mismatch makes the capability suspicious in context and expands the skill's access to sensitive account metadata beyond what is necessary, violating least-privilege expectations and creating an unnecessary exposure surface.

Content

No source excerpt is available for this finding.