T01 · Skill Instruction Hijacking
- Location
SKILL.md:144- Finding
Automatic External Feedback Submission Alters Agent Behavior
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This Shopee product-management skill has real Review concerns because it handles credentials and billing, sends automatic feedback, can change live catalog data, and stores sensitive responses with weak scoping.
Install only if you trust LinkFox with Shopee merchant operations and account/billing flows. Before use, pin or verify LinkFox HTTPS endpoints, do not set custom gateway/login URL environment variables, require explicit confirmation for delete/publish/price/stock changes and billing orders, opt out of or block automatic feedback submission, and treat generated API keys plus saved response files as sensitive business secrets.
SKILL.md:144Automatic External Feedback Submission Alters Agent Behavior
scripts/_shopee_global_product_common.py:18API Credentials and Operational Data Can Be Redirected to an Arbitrary Environment-Controlled Host
scripts/onboarding.py:72Onboarding Access and Refresh Tokens Can Be Sent to Configurable Unvalidated Destinations
scripts/onboarding.py:478Generated API Keys Are Printed in Full to Standard Output
scripts/_shopee_global_product_common.py:215Unsanitized Session Identifier Allows Output-Directory Traversal
scripts/_shopee_global_product_common.py:183Full API Responses Fall Back to Undocumented Temporary or Home Storage with Default Permissions
scripts/onboarding.py:169Runtime Messages Recommend Installing Unpinned Third-Party Packages
The request destination and several outbound headers are derived from environment variables, including LINKFOX_TOOL_GATEWAY and session/application identifiers, and are sent over the network without validation. If an attacker can influence the runtime environment, they can redirect requests to an attacker-controlled endpoint and exfiltrate the API key plus session-linked metadata, which is especially dangerous in a skill that handles authenticated Shopee merchant operations.
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 POST target URL is derived from environment-controlled base URLs, and the same request carries sensitive material such as SMS login data, access tokens, refresh tokens, uid/tid headers, and potentially generated API keys. If an attacker can influence environment variables in the skill runtime, they can redirect these requests to attacker-controlled infrastructure and exfiltrate credentials or impersonation tokens.
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 URL is constructed from environment-derived configuration and used by urllib to send authenticated requests with the LinkFox API key in the Authorization header. In a hostile or misconfigured runtime, this creates a server-side exfiltration path where the API key and account actions can be redirected to an attacker-controlled endpoint.
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
A skill presented as a Shopee product-management integration reportedly performs account, billing, login, SMS, and payment-related LinkFox operations instead. That is a severe trust-boundary violation: users invoking listing or inventory workflows could unknowingly trigger authentication, subscription, or payment flows and expose unrelated account data.
A skill presented as a Shopee product-management integration reportedly performs account, billing, login, SMS, and payment-related LinkFox operations instead. That is a severe trust-boundary violation: users invoking listing or inventory workflows could unknowingly trigger authentication, subscription, or payment flows and expose unrelated account data.
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
The file implements a LinkFox onboarding, billing, and payment CLI, which is materially unrelated to the declared Shopee GlobalProduct skill purpose. This kind of capability mismatch is dangerous because users or orchestrators may invoke the skill expecting Shopee product management while the code instead performs account login, token issuance, and purchasing flows.
The code includes package enumeration, order creation, payment QR generation, and order-status queries, which are unrelated to Shopee GlobalProduct management. Embedding monetization and payment collection behavior inside a commerce-integration skill creates a strong risk of deceptive billing, misuse of user trust, and unauthorized purchase workflows.
This section performs SMS-based LinkFox login, token handling, team discovery, and API-key retrieval/generation, none of which are necessary for Shopee GlobalProduct operations as described in the manifest. Collecting authentication material under an unrelated skill increases the likelihood of credential harvesting or unauthorized platform access under false pretenses.
The skill advertises capabilities that include environment access, filesystem writes, network access, and shell execution, but it does not declare any explicit tool scope or permission boundary. In an agent environment, this weakens least-privilege guarantees and can allow broader-than-expected actions, especially when combined with automatic file output and external API interaction.
The trigger condition is intentionally broad and says the skill should activate even when 'global product' is not explicitly mentioned, as long as the request loosely relates to authorized merchant product management. Overbroad activation increases the chance of the wrong skill handling a task, leading to unnecessary credential use, unintended API calls, or data exposure in adjacent workflows.
The documentation says the tool consumes compute resources and warns against repeated probing, but later states '不消耗算力' (does not consume compute). Contradictory metering and cost semantics can mislead users into unintended repeated calls, increasing financial exposure, rate-limit pressure, and operational risk.
The skill states it will always write full API responses to the project directory, potentially including merchant IDs, product data, publication details, and other sensitive business information. Automatic persistent storage without clear opt-in or data-minimization controls increases the risk of accidental disclosure through source trees, shared workspaces, backups, or later agent access.
This markdown file documents write and delete operations such as add_global_item, update_global_item, and especially delete_global_item, but it does not include any warning that these actions modify or remove live product data. Under the markdown-specific missing-warning rule, descriptions that omit user-data or system-impact warnings for destructive behaviors should be flagged.
The documentation presents update_price and update_stock as routine operations but does not warn that they can immediately affect storefront pricing, availability, and downstream sales behavior. Because this is a markdown skill description covering system-affecting write operations, the absence of a user-facing warning qualifies as a missing warning finding.
The section on create_publish_task and set_sync_field explains cross-shop publishing and synchronization behavior, but it lacks any caution that these actions can propagate product data or configuration changes to multiple destination shops. For markdown files, omitting warnings about actions that affect user data or system integrity is in scope for this rule.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
export KEY=$LINKFOX_AGENT_API_KEY
The document describes a write-capable API that adds a global SKU model, but it does not clearly warn that the operation mutates catalog data or may create persistent product records. In this skill context, users may invoke the endpoint through a generic proxy workflow, so missing change-impact warnings increases the risk of accidental inventory/catalog modification rather than a direct exploit.
The documentation exposes a publish operation that can make product listings externally visible across shops, but it does not warn about the action's externally visible and potentially hard-to-reverse effects. In an agent setting, this increases the risk of accidental publication, especially because the doc says to 'pass full body' and frames the endpoint as a normal management action without confirmation guidance.
This documentation exposes a destructive API operation that permanently deletes a global product, but it does not include any warning about irreversibility, expected side effects, or the need for explicit user confirmation before invocation. In an agent-driven workflow, that omission is dangerous because the skill may be triggered from broad product-management requests, increasing the chance of accidental or unauthorized destructive actions against a merchant's catalog.
This documentation exposes a destructive delete capability ('Delete global SKU model') without any warning, confirmation guidance, or mention of irreversible business impact. In an agent skill that can be triggered by product-management intents, missing safety framing increases the chance of accidental or overly broad deletion requests being issued against a live merchant account.
This markdown file contains core usage instructions and field descriptions primarily in Chinese, while some labels and examples remain in English. Because the file does not offer an alternative language or explain that the skill is intended only for Chinese-speaking users, it may violate a language/locale policy requiring user opt-in or documented justification.
This markdown file contains the core operational instructions and parameter descriptions in Chinese, which effectively forces a specific language on users. The policy allows locale constraints only when user choice is offered or the restriction is clearly justified, neither of which is stated here.
This markdown file contains all user-facing instructions in Chinese, including headings, parameter descriptions, and usage guidance. Under the policy, forcing a specific language without user opt-in can be a natural-language policy violation unless the locale constraint is explicitly documented and justified.
This markdown file documents an operation that updates sync fields for already published items, which can affect live listing behavior or data. The description provides usage details but does not include any caution, confirmation expectation, or warning about impacts to published product data.