Back to skill

Security audit

1688 爆款操盘手

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly aligned with 1688 sourcing, but it under-discloses automatic use of an optional 1688 session cookie, so users should review it before installing.

Install only if you are comfortable with a Chinese-first 1688 sourcing tool that makes outbound requests to 1688 domains. Do not set ALI_COOKIE unless you intentionally want the scripts to use your authenticated 1688 session; prefer the declared ALI_APP_KEY/ALI_APP_SECRET flow, and use an isolated environment with a pinned requests dependency if possible.

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

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/scraper.py:15
Finding

Undeclared session-cookie access with overly broad cookie forwarding

Content
View full analysis
Optional[str]: try: resp = SESSION.get(url, timeout=timeout) ``` `scripts/search_products.py`: ```python _OPTIONAL_COOKIE = os.environ.get("ALI_COOKIE", "") if _OPTIONAL_COOKIE: HEADERS["Cookie"] = _OPTIONAL_COOKIE resp = requests.get(url, params=params, headers=HEADERS, timeout=15) ``` `scripts/search_factories.py`: ```python _OPTIONAL_COOKIE = os.environ.get("ALI_COOKIE", "") if _OPTIONAL_COOKIE: HEADERS["Cookie"] = _OPTIONAL_COOKIE resp = requests.get(url, params=params, headers=HEADERS, timeout=15) ``` `scripts/product_detail.py`: ```python _OPTIONAL_COOKIE = os.environ.get("ALI_COOKIE", "") if _OPTIONAL_COOKIE: HEADERS["Cookie"] = _OPTIONAL_COOKIE resp = requests.get(url, params=params, headers=HEADERS, timeout=15) url2 = f"https://m.1688.com/offer/{product_id}.html" resp2 = requests.get(url2, headers=HEADERS, timeout=15) ``` The Skill manifest declares only these optional environment variables: ```yaml env: - name: ALI_APP_KEY required: false - name: ALI_APP_SECRET required: false ``` It does not declare `ALI_COOKIE`. ### Technical Analysis The four affected scripts read a complete authenticated browser-session cookie from `ALI_COOKIE` and place it directly into a generic HTTP `Cookie` header. This ...[truncated 2261 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Note
Location
scripts/1688_trader.py:7
Finding

Unpinned third-party network dependency

Content
View full analysis
Remediation
View remediation
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
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
Findings (20)

Tainted flow: 'all_params' from os.environ.get (line 63, credential/environment) → requests.post (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/ali_api.py (reported line 78)May include surrounding context.

python
url = f"{API_BASE}/{method}/2.0"
    try:
        resp = requests.post(url, data=all_params, timeout=timeout)
        resp.encoding = "utf-8"
        data = resp.json()
        return data

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

声明描述的是一个覆盖“选、找、谈”三步的供应链 Agent,核心能力应包括选品分析、1688 工厂/货源发现、供应商沟通与询盘生成等。而代码仅实现“利润核算”这一单一子功能,且是离线 CLI 脚本,主要做费率、运费、汇率、平台佣金和毛利计算。虽然声明中提到“利润核算”,因此代码与描述存在部分交集,但整体主用途明显比声明窄得多,无法支持描述中的大部分核心能力,因此属于实质性不匹配。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

声明描述的是一个覆盖选、找、谈三步的综合供应链 Agent,而给出的代码块只是一个搜索 1688 商品的工具脚本。它访问 1688 搜索接口,提取商品标题、价格、MOQ、成交、公司名等信息,并生成简单统计,这与“选品/找货源”的一部分相关,因此不是完全无关;但其实际能力明显窄于声明。尤其是描述中强调的找工厂、询盘话术生成、利润核算、砍价谈判等核心能力,在代码中均未体现。此外,CLI 暴露了 --factory-only、--min-price、--max-price 参数,但函数内部并未真正使用这些参数进行筛选,说明即使声明中与工厂筛选相关的部分也未落实。因此该描述对当前代码能力有明显夸大,构成不匹配。

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.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The manifest description, trigger phrases, and keywords are entirely specified in Chinese, which effectively constrains use to a single language. Under the policy, a language-specific constraint should either offer user opt-in/choice or be clearly documented as a justified locale-specific limitation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This markdown file contains user-facing instructional content exclusively in Chinese, and there is no indication that the user can choose another language or that the skill is intentionally limited to a Chinese-speaking audience. Per the policy, forcing a specific language without user opt-in is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

This markdown file presents all instructions and templates exclusively in Chinese, with no indication that users may choose another language or locale. Under the policy for natural-language violations, forcing a specific language without user opt-in is in scope.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The file is entirely framed as a Chinese report template and instructs users to output this report format, but it does not provide any language opt-in or alternative locale handling. Under the policy, forcing a specific language without user choice is a natural-language policy violation unless the locale constraint is explicitly justified.

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 extensive natural-language strings, help text, and operational messages exclusively in Chinese. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale constraint is explicitly documented and justified, which is not present here.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This code file contains natural-language strings for the title, usage, help text, and operational descriptions exclusively in Chinese. Under the policy, forcing a specific language without offering the user a language/locale choice is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The argparse description, help messages, health-check status, and summary fields are all presented only in Chinese, with no documented locale choice. This creates a file-wide language policy issue because users are required to interact in one language regardless of preference.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The code reads an authentication cookie from the ALI_COOKIE environment variable and automatically injects it into all outbound requests to 1688. This can cause the skill to operate with a real user's authenticated session, extending access beyond anonymous public scraping and potentially exposing account-scoped data or actions without explicit user awareness or consent.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The scraper silently transmits cookie credentials in HTTP headers whenever ALI_COOKIE is present, with no disclosure, warning, or runtime confirmation. In an agent setting, this is dangerous because operators may unknowingly grant the skill access to privileged account context, making data collection attributable to their session and increasing the risk of credential misuse.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The request headers hard-code Accept-Language: zh-CN,zh;q=0.9, which instructs the remote service to respond in a specific language/locale. The file does not offer the user a language choice or explain why this locale restriction is required, so it constitutes a natural-language locale policy violation under the stated rules.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The usage string and function signature indicate support for --min-price, --max-price, and --factory-only, and these values are parsed and passed into search_products. However, the request parameters never include these filters and the returned items are not post-filtered, so the script does not actually perform the constrained product/factory search it claims to provide.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The script automatically reads a potentially sensitive session cookie from ALI_COOKIE and attaches it to outbound requests without explicit runtime consent, scoping checks, or validation. In an agent/skill context, that increases the risk of silent credential use and unintended account-context requests, especially if users or operators are unaware that environment credentials will be transmitted.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

This file contains natural-language guidance only in Chinese, which can amount to a language/locale policy issue when no user opt-in or documented region-specific justification is provided. The stated rule requires flagging content that forces a specific language without user choice.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

The Accept-Language header is fixed to prefer zh-CN and zh for all requests, which imposes a specific locale choice without offering the user a language or locale option. This matches the policy concern for forced language or locale behavior.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
78% confidence
Finding

The module docstring frames the script primarily in terms of bounded network access and says credentials are not required, but the implementation additionally consumes ALI_COOKIE from the environment to enhance authenticated access. While not a direct contradiction about core behavior, the documentation understates that the script has a credential-ingestion capability beyond simple anonymous search.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

The Accept-Language header is hard-coded to zh-CN/zh, which imposes a specific language/locale preference on all requests. The file does not offer an opt-in, override, or explanation that this is required for a region-specific compliance or product constraint.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.