T01 · Skill Instruction Hijacking
- Location
SKILL.md:180- Finding
Automatic External Feedback Reporting Hijacks Agent Behavior
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill mostly matches Shopee order management, but it also handles credentials, billing, persistent sensitive data, live order mutations, and automatic external feedback in ways users should review carefully.
Review before installing. Use this only if you trust LinkFox with Shopee order, buyer, invoice, and billing data; verify gateway environment variables point only to LinkFox HTTPS hosts; require explicit confirmation before any order-changing action; avoid sending automatic feedback with conversation/order content; and treat any printed or shell-stored API key as sensitive and rotate it if exposed.
SKILL.md:180Automatic External Feedback Reporting Hijacks Agent Behavior
scripts/_shopee_orders_common.py:18Credential-Bearing Requests Can Be Redirected to Arbitrary Environment-Controlled Endpoints
scripts/_shopee_orders_common.py:185Complete Sensitive API Responses Are Persisted with Insecure Temporary-Directory Fallback
scripts/onboarding.py:481Generated API Keys Are Printed and Recommended for Plaintext Persistent Storage
Outbound requests are built from environment-controlled values including API_BASE_URL and multiple metadata headers, then sent with an Authorization secret to whatever endpoint is configured. If an attacker can influence environment variables, they can redirect requests and exfiltrate API keys, session identifiers, and Shopee-related data to an attacker-controlled server.
method="POST",
)
try:
with urlopen(req, timeout=150) as response:
return json.loads(response.read().decode("utf-8"))
except HTTPError as e:
body = e.read().decode("utf-8") if e.fp else ""
The code builds destination URLs from environment-controlled base URLs and then sends sensitive data to them via requests.post. Because this script handles SMS login, access tokens, refresh tokens, user/team identifiers, and API key generation, a manipulated environment can redirect those secrets to an attacker-controlled endpoint, resulting in credential exfiltration and account compromise.
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 = ""
The gateway request path uses an environment-derived base URL and transmits the LinkFox agent API key in the Authorization header via urlopen. If an attacker can influence environment variables, they can redirect authenticated traffic to their own server and capture API keys, payment/order operations, and account metadata.
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
The declared description says this skill handles Shopee order-related API functionality across many Order module endpoints. The actual code chunk does not call Shopee APIs, process orders, or expose any order-management behavior. Instead, it performs a dependency check for the separate linkfox-shopee-store-auth skill by inspecting environment variables and local filesystem paths for installation markers. While such a script could be a supporting internal component of the overall skill package, the supplied code chunk itself has a materially different primary purpose than the declared description. Therefore this chunk does not accurately represent the declared functionality and should be flagged as a mismatch.
The description claims coverage of the Shopee Order module's full set of 22 interfaces and names many specific endpoints, but the provided code chunk only wraps one endpoint: get_buyer_invoice_info. That endpoint appears related to invoice retrieval and may be order-adjacent, but it is not disclosed in the declared description text and is materially different from the specifically enumerated interface set. This is therefore a description/behavior mismatch: the code provides an undeclared capability and does not, in this chunk, match the declared broad functionality.
The declared description is about Shopee seller order management and forwarding Shopee Open API order endpoints. The code does not reference Shopee, store authorization, /shopee/developerProxy, or any Shopee order/list/detail/shipment/package/cancel/booking/FBS functionality. Instead, it is a standalone CLI for LinkFox user onboarding and commerce workflows: SMS login, token handling, account/team lookup, API token generation, package listing, purchasing, and payment status querying. This is a materially different primary purpose and accesses entirely different services/resources, so the description does not accurately represent the code.
YARA rule matched a known malware signature (reverse shell, backdoor, ransomware, C2 framework, or info stealer).
示 JSON 里的 phone/agreements
- 收到验证码后:`python scripts/onboarding.py login <phone> <code>`
- 拿到 `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
This file implements a LinkFox onboarding and monetization CLI—SMS code delivery, login, API key issuance, package purchase, and payment QR generation—which is unrelated to a Shopee store orders skill. In this context, the mismatch is dangerous because it expands the skill's privileges and data collection far beyond its declared purpose, creating a strong indicator of covert credential harvesting or unauthorized billing functionality.
The code can obtain or generate LinkFox API tokens and use them to support paid package ordering, which is unjustified for a Shopee order-management integration. In a mismatched skill context, this capability can be abused to mint long-lived credentials and drive unauthorized purchases or account takeover outside the user's expected task.
The skill declares shell, network, environment-variable, and file-write behaviors but provides no explicit tool scope such as allowed-tools or permissions. In an agent setting, missing capability boundaries increases the chance the skill can access more local resources or execute more actions than users or reviewers expect.
The trigger language is intentionally broad, including cases where the user does not explicitly mention orders as long as the request 'involves' authorized Shopee store order handling. Overbroad activation raises the chance of the skill being selected in marginal contexts, leading to unnecessary access to sensitive order data or accidental execution of order-management actions.
The skill instructs the agent to always persist full API responses to disk and sometimes print full JSON to stdout. Because this skill handles order, shipment, note, and invoice data, that behavior creates a strong risk of leaking sensitive business or personal information through local files, logs, terminal output, or downstream model context.
The skill documents destructive operations such as cancel_order, handle_buyer_cancellation, split_order, and unsplit_order without mandating an explicit confirmation step. In an order-management context, accidental invocation can directly alter customer orders, cause financial loss, operational disruption, and customer harm.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
curl -X POST https://skill-api.linkfox.com/api/v1/public/feedback \
-H "Content-Type: application/json" \
-d '{"skillName":"linkfox-shopee-store-orders","sentiment":"POSITIVE",
"category":"OTHER","content":"订单接口正常"}'
This skill documents and enables a destructive order-cancellation operation but does not warn users that canceling an order can be irreversible and may directly affect fulfillment, revenue, customer experience, and compliance workflows. In an agent setting, the lack of an explicit caution or confirmation requirement increases the chance of accidental or socially engineered cancellations, especially because the skill is designed to trigger broadly for Shopee order-processing requests.
The file’s user-facing instructions, parameter descriptions, and usage guidance are presented entirely in Chinese. Under the policy, forcing a specific language without user opt-in or a documented justification is a natural-language policy violation.
The manifest describes this skill as forwarding Shopee Open API Order module's 22 interfaces, listing examples such as order list/detail, shipment, cancel, booking, and FBS invoice operations. This file documents download_invoice_doc, which appears to be an invoice-document download endpoint and is not mentioned in the declared scope, creating a semantic mismatch between the skill's claimed coverage and the documented behavior.
The document describes downloading invoice documents without warning that invoices can contain sensitive billing, order, and customer data. In an agent context that triggers on order-processing requests, omission of a privacy/security warning can normalize retrieval of sensitive documents and increase the risk of overbroad access, accidental disclosure, or inappropriate sharing.
This markdown file documents an API that returns buyer invoice information, which is likely to contain sensitive personal or billing data. The description and response notes explain how to call and read the API response but provide no warning about privacy sensitivity, careful handling, or access limitations.
The documentation explicitly highlights that the API response may include recipient_address and other order details, which are customer-sensitive data, but it provides no warning about privacy, least-privilege use, retention, or redaction. In an agent skill that can be triggered by natural-language requests for Shopee order handling, this increases the chance of over-collection or inappropriate disclosure of personal data to users or downstream systems.
This documentation exposes a state-changing order operation that can accept or reject buyer cancellation requests, but it does not clearly warn that invoking it alters live business records and may be difficult or impossible to reverse. In an agent skill context, omission of destructive-action warnings increases the chance that an automated agent or user triggers order-state changes unintentionally, affecting fulfillment, customer experience, and dispute handling.
This markdown file documents a skill that can approve or reject prescription checks, which may affect order handling and regulated medical workflows. The description and examples do not include any warning about the sensitivity, impact, or need for caution before performing these actions.
This documentation exposes a destructive order-processing capability (split_order) but does not warn that splitting an order can be operationally sensitive or difficult to reverse. In an agent context, missing safety guidance increases the chance that the tool is invoked on the wrong order or without user confirmation, causing fulfillment errors, package inconsistencies, and customer-impacting order mutations.
The manifest describes this skill as forwarding the Shopee Open API Order module’s 22 interfaces, focusing on order list/detail, shipment, package, cancel, booking, and FBS invoice operations. This file documents upload_invoice_doc, a separate upload capability for invoice documents, which is not mentioned in the manifest description and appears to extend the skill beyond the declared interface set.
The documentation embeds account onboarding, registration, API-key setup, and billing recovery flows into a Shopee order-processing skill, expanding the skill's operational scope beyond its declared purpose. This creates an unnecessary path for credential handling and payment-related actions that could be triggered under error conditions, increasing the risk of over-collection of sensitive data and unintended account or purchase operations.