Back to skill

Security audit

Temu美国站-定价

Security checks for vulnerabilities and agentic risk

Overview

This skill mostly matches a Temu price-management purpose, but it handles powerful account tokens, broad proxy calls, billing actions, and local persistence in ways users should review carefully before installing.

Install only if you are comfortable with LinkFox receiving Temu API calls, storing Temu access tokens locally, saving full API responses to disk, and using scripts that can change live SKU prices. Use a dedicated low-privilege Temu token if possible, avoid granting unrelated sensitive permissions, keep the token store private, review any price-change request before running it, and avoid using environment overrides for gateway URLs with real credentials.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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
Findings (4)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/_temu_token_store.py:10
Finding

Temu Access Tokens Stored in Plaintext Without Restrictive File Permissions

Content
View full analysis
str: return os.environ.get("TEMU_TOKEN_STORE_PATH", DEFAULT_STORE_PATH) ``` ```python def _save_store(data: dict) -> None: path = store_path() parent = os.path.dirname(path) if parent: os.makedirs(parent, exist_ok=True) with open(path, "w", encoding="utf-8") as f: json.dump(data, f, indent=2, ensure_ascii=False) f.write("\n") ``` ```python entry = { "site": site, "managementType": management_type, "tokenPurpose": token_purpose, "accessToken": access_token, "updatedAt": _utc_now(), } ``` ### Technical Analysis The Skill stores Temu access tokens directly in an unencrypted JSON file. Neither the parent directory nor the token file is created with an explicit restrictive mode such as `0700` for the directory and `0600` for the file. Actual permissions therefore depend on the process umask and the properties of any pre-existing path. The `TEMU_TOKEN_STORE_PATH` environment variable can also redirect the credential file to another location, including a shared directory. The implementation does not reject symbolic links, verify ownership, inspect existing permissions, or use atomic replacement. These tokens are security-sensitive bearer credentials. Their effective privilege is particularly significant because the authorization instructions elsewhere in the Skill recommend granting broad application permissions. ### Attack Path 1. A user follows the documented workflow and runs `save_temu_access_token.py`. 2. `_save_store()` creates or overwrites the configured JSON file using ambient filesystem permissions. 3. A local user, process, shared-workspace participant ...[truncated 984 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/_temu_common.py:176
Finding

Complete API Responses Persisted to Potentially Shared Locations Without Access Controls

Content
View full analysis
str: cached = _LF_SESSION_CACHE.get("_root") if cached: return cached candidates = [] acpx = (os.environ.get("ACPX_WORKSPACES") or "").strip() if acpx: acpx = acpx.split(os.pathsep)[0].strip() if acpx: candidates.append(os.path.join(acpx, "linkfox")) candidates.append(os.path.join(os.getcwd(), "linkfox")) candidates.append(os.path.join(os.path.expanduser("~"), "linkfox")) candidates.append(os.path.join(_lf_tempfile.gettempdir(), "linkfox")) for root in candidates: try: os.makedirs(root, exist_ok=True) probe = os.path.join(root, ".write_probe") with open(probe, "w", encoding="utf-8") as f: f.write("") os.remove(probe) except OSError: continue root = os.path.abspath(root) _LF_SESSION_CACHE["_root"] = root return root fallback = os.path.abspath(candidates[-1]) _LF_SESSION_CACHE["_root"] = fallback return fallback ``` ```python def emit_result(result, slug=SLUG, inline=False): serialized = json.dumps(result, ensure_ascii=False, indent=2) ts = _lf_time.time() date_str = _lf_time.strftime("%Y-%m-%d", _lf_time.localtime(ts)) sid = _lf_session_id(ts) root = _lf_root() session_dir = os.path.join(root, date_str, sid) os.makedirs(session_dir, exist_ok=True) _lf_ensure_meta(root, session_dir, date_str, sid, ts) data_dir = os.path.join(session_dir, "data") os.makedirs(data_dir, exist_ok=True) out = os.path.join(data_dir, f"{slug}-{int(ts * 1_000_000)}.json") try: with open(out, "w", encoding="utf-8") as f: f.write(serialized) print(f"Sa ...[truncated 2205 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
scripts/_temu_auth_guide.py:46
Finding

Authorization Instructions Request Permissions Beyond the Price-Management Scope

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Note
Location
scripts/onboarding.py:159
Finding

Runtime Guidance Recommends Installing Unpinned Third-Party Packages

Content
View full analysis
dict: try: import qrcode except ImportError: err = "The qrcode dependency is missing. Run: pip install qrcode pillow" print(f"{TAG} render_qr: {err}", file=sys.stderr) return {"png_path": None, "ascii_qr": None, "error": err} ``` ```python def _require_requests() -> None: if requests is None: raise RuntimeError( "The requests dependency is missing. Run: pip install requests" ) ``` ### Technical Analysis The onboarding script recommends installing `qrcode`, `pillow`, and `requests` without exact versions, hashes, a lock file, or an explicitly trusted package index. Package resolution is therefore affected by: - Mutable package releases. - Transitive dependency changes. - User or system pip configuration. - Private-index precedence. - A compromised package registry or dependency release. The script does not automatically execute pip, so exploitation requires the user to follow the displayed installation instructions. This lowers severity but still creates a supply-chain risk. ### Attack Path 1. The user runs an onboarding feature that imports an unavailable package. 2. The script prints an unpinned `pip install` command. 3. The user executes that command in the Skill’s environment. 4. Pip resolves the latest matching packages and dependencies from the configured index or indexes. 5. A compromised release, malicious mirror, or dependency-confusion package is downloaded. 6. Package installation or later import executes attacker-controlled code with the user’s privileges. ### Impact Assessment A compromised dependency can execute arbitrary Python code in the user environmen ...[truncated 444 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • YARA SignaturesMalware Match, Webshell Match, Cryptominer Match
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (64)

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

Critical
Category
Data Flow
Confidence
95% confidence
Finding

The script builds request destinations from environment-controlled base URLs and then sends SMS-login data, access tokens, refresh tokens, team identifiers, and API-token requests to those endpoints. If an attacker can influence the environment, they can redirect these authenticated requests to an arbitrary server and capture credentials or personal data, making this effectively SSRF plus credential exfiltration.

Content

Scanner excerpt · scripts/onboarding.py (reported line 196)May include surrounding context.

python
except RuntimeError as e:
        return {"_error": str(e)}
    try:
        r = requests.post(url, json=body or {}, headers=headers, timeout=timeout)
        return r.json()
    except Exception as e:
        body_text = ""

Tainted flow: 'req' from os.environ.get (line 244, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
94% confidence
Finding

The gateway URL is also derived from environment variables and used with an Authorization header carrying the API key. A malicious or compromised environment can redirect order, package, and account requests to an attacker-controlled endpoint, leaking the API key and enabling unauthorized use of the linked account.

Content

Scanner excerpt · scripts/onboarding.py (reported line 246)May include surrounding context.

python
headers["Content-Type"] = "application/json"
        req = Request(url, method=method, data=body_bytes, headers=headers)
        try:
            with urlopen(req, timeout=30) as resp:
                return json.loads(resp.read().decode())
        except urllib.error.HTTPError as e:
            status = e.code

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Auth-guidance and token-authorization instruction generation are not inherently dangerous, but they are a true scope mismatch when embedded in a pricing skill and can facilitate credential collection workflows users did not intend to invoke. In a skill that already handles tokens and local storage, this mismatch makes accidental overexposure of secrets more likely.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Auth-guidance and token-authorization instruction generation are not inherently dangerous, but they are a true scope mismatch when embedded in a pricing skill and can facilitate credential collection workflows users did not intend to invoke. In a skill that already handles tokens and local storage, this mismatch makes accidental overexposure of secrets more likely.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Auth-guidance and token-authorization instruction generation are not inherently dangerous, but they are a true scope mismatch when embedded in a pricing skill and can facilitate credential collection workflows users did not intend to invoke. In a skill that already handles tokens and local storage, this mismatch makes accidental overexposure of secrets more likely.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Auth-guidance and token-authorization instruction generation are not inherently dangerous, but they are a true scope mismatch when embedded in a pricing skill and can facilitate credential collection workflows users did not intend to invoke. In a skill that already handles tokens and local storage, this mismatch makes accidental overexposure of secrets more likely.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Auth-guidance and token-authorization instruction generation are not inherently dangerous, but they are a true scope mismatch when embedded in a pricing skill and can facilitate credential collection workflows users did not intend to invoke. In a skill that already handles tokens and local storage, this mismatch makes accidental overexposure of secrets more likely.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Auth-guidance and token-authorization instruction generation are not inherently dangerous, but they are a true scope mismatch when embedded in a pricing skill and can facilitate credential collection workflows users did not intend to invoke. In a skill that already handles tokens and local storage, this mismatch makes accidental overexposure of secrets more likely.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Auth-guidance and token-authorization instruction generation are not inherently dangerous, but they are a true scope mismatch when embedded in a pricing skill and can facilitate credential collection workflows users did not intend to invoke. In a skill that already handles tokens and local storage, this mismatch makes accidental overexposure of secrets more likely.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Auth-guidance and token-authorization instruction generation are not inherently dangerous, but they are a true scope mismatch when embedded in a pricing skill and can facilitate credential collection workflows users did not intend to invoke. In a skill that already handles tokens and local storage, this mismatch makes accidental overexposure of secrets more likely.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Auth-guidance and token-authorization instruction generation are not inherently dangerous, but they are a true scope mismatch when embedded in a pricing skill and can facilitate credential collection workflows users did not intend to invoke. In a skill that already handles tokens and local storage, this mismatch makes accidental overexposure of secrets more likely.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Auth-guidance and token-authorization instruction generation are not inherently dangerous, but they are a true scope mismatch when embedded in a pricing skill and can facilitate credential collection workflows users did not intend to invoke. In a skill that already handles tokens and local storage, this mismatch makes accidental overexposure of secrets more likely.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Auth-guidance and token-authorization instruction generation are not inherently dangerous, but they are a true scope mismatch when embedded in a pricing skill and can facilitate credential collection workflows users did not intend to invoke. In a skill that already handles tokens and local storage, this mismatch makes accidental overexposure of secrets more likely.

Content

No source excerpt is available for this finding.

YARA rule 'backdoor_persistence': Backdoor persistence with malicious payloads (shell commands, SSH key injection, hidden root users) [malware]

High
Category
YARA Match
Confidence
75% confidence
Finding

YARA rule matched a known malware signature (reverse shell, backdoor, ransomware, C2 framework, or info stealer).

Content

Scanner excerpt · references/onboarding.md (reported line 14)May include surrounding context.

md
证码后:`python scripts/onboarding.py login <phone> <code>`(workbuddy 宿主加 `--channel workbuddy`)
   - 拿到 `api_key` 后把下面三平台配置转发给用户,提示重启会话生效:
     - Windows PowerShell(永久):`setx LINKFOX_AGENT_API_KEY "<key>"`
     - macOS zsh:`echo 'export LINKFOX_AGENT_API_KEY="<key>"' >> ~/.zshrc && source ~/.zshrc`
     - Linux bash:`echo 'export LINKFOX_AGENT_API_KEY="<key>"' >> ~/.bashrc && source ~/.bashrc`
     - 变量名 `LINKFOX_AGENT_API_KEY`(主推)或 `LINKFOXAGENT_API_KEY`(老规范)任一即可

**billing 场景**:`errcode=402` 或消息含 `积分/余额/quota/insufficient/充值/套餐到期`。
- `python scripts/onboarding.py list-plans` → 有 AskUserQuestion 就弹菜单,否则输出编号清单让用户选
- 校验 `plan_id` ∈ 清单、支付方式 ∈ 该套餐 `available_methods`(通常 `wechat/alipay`)
- `python scripts/onboarding.py order <plan_id> <method>` → 展示优先级 PNG

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

This skill claims to manage Temu US pricing, but the included onboarding code performs unrelated LinkFox account login, plan purchase, order creation, and payment QR generation. Hidden or unrelated account/payment capabilities materially increase attack surface and can trick users or hosts into invoking actions they would not expect from a pricing-management skill.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The implemented behavior in this region centers on package discovery, order creation, and payment status querying rather than Temu US price-order operations. This mismatch makes the skill more dangerous because reviewers and users may grant trust based on the pricing description while the code can initiate commercial transactions.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest describes a skill focused on Temu US price-order querying, batch SKU price changes, and recommended/base price estimation via the LinkFox gateway. This script instead saves arbitrary Temu access tokens to a local store for later proxy/fileDownload reuse, which is a credential-management capability rather than a price-management API operation.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
91% confidence
Finding

The script persists a reusable access token locally for later use, which creates a credential-at-rest risk. If the local store is readable by other users, processes, backups, or logs, an attacker could recover the token and perform authenticated actions against Temu-related APIs beyond the immediate session.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

This script adds a signed file download capability that is not described by the skill’s stated Temu US price-management scope. Scope expansion is security-relevant because it enables handling arbitrary remote resource URLs and access tokens, increasing the chance of data exfiltration, misuse of privileged API actions, or hidden secondary functionality beyond what users expect from a pricing skill.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The script accepts an arbitrary type value and forwards arbitrary params to a generic Temu proxy endpoint, without enforcing the skill's declared scope of US price-management operations. This creates a capability-expansion vulnerability: a caller can use this skill as a general Temu API passthrough to reach unrelated APIs, bypassing the principle of least privilege and potentially accessing or mutating data outside the intended domain.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill advertises capabilities that involve environment variables, file writes, and outbound network access, but it does not declare an explicit permission or allowed-tools scope. That weakens reviewability and containment because consumers cannot tell from the manifest what the skill is authorized to do, especially when it also handles tokens and writes API responses to disk.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The document states both that the tool consumes credits and that it does not consume credits, creating contradictory operator guidance. In a security context this matters because users may be misled into repeated or automated calls they would otherwise avoid, and conflicting operational claims are a trust and governance risk in a skill that can modify prices and handle credentials.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The instructions require always saving full API responses locally, even though those responses may contain access tokens, account identifiers, pricing data, or other sensitive user-provided content. Persisting full responses by default materially increases exposure through local compromise, accidental commits, shared workspaces, or later unrelated tooling reading those files.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill documents a bulk SKU base-price change operation without an explicit warning that it is a state-changing, potentially destructive action affecting live product pricing. In this business context, accidental execution could cause financial loss, incorrect marketplace pricing, and operational disruption across many SKUs.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The documentation instructs users to persist Temu access tokens in a local JSON file and even provides commands that include pasting live credentials, but it does not explicitly warn that these are sensitive secrets requiring filesystem protection. This increases the chance that tokens are stored with weak permissions, committed to source control, exposed in shell history, or left on shared systems, which could let an attacker reuse the token to access Temu business APIs.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.