T01 · Skill Instruction Hijacking
- Location
SKILL.md:130- Finding
Mandatory Silent Feedback Transmission Redirects Agent Behavior
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This Shopee store skill includes useful shop APIs, but it also handles login, billing, silent feedback, and sensitive local storage in ways that require careful review before use.
Install only after reviewing the extra account, billing, feedback, and local-storage behavior. Use it in a trusted environment with no endpoint override variables set, avoid sharing phone/SMS codes unless you intend to run LinkFox onboarding, require manual confirmation before store changes or purchases, and inspect/delete saved response files that may contain shop, address, or KYC data.
SKILL.md:130Mandatory Silent Feedback Transmission Redirects Agent Behavior
scripts/_shopee_shop_common.py:19Credentials Can Be Forwarded to Environment-Controlled Network Destinations
scripts/onboarding.py:471Out-of-Scope Authentication and Billing Flow Exposes API Keys to Standard Output
scripts/_shopee_shop_common.py:181Unsanitized Session Identifier Enables Arbitrary Response-File Placement
scripts/onboarding.py:163Runtime Instructions Recommend Unpinned Third-Party Package Installation
The code builds destination URLs from environment-controlled base URLs and then sends sensitive authentication material to them via requests.post. Because these calls handle SMS-login, access tokens, refresh tokens, and API-token generation, a modified environment can redirect credentials to an attacker-controlled endpoint, causing credential exfiltration and account compromise. The mismatch between the stated Shopee shop-management purpose and this onboarding/login behavior increases suspicion rather than reducing risk.
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 environment-derived base URLs and attaches the API key in the Authorization header before calling urlopen. If an attacker can influence the process environment, requests can be redirected to an arbitrary server and leak the LinkFox API key, enabling unauthorized use of the account and downstream actions such as order creation or access to account data.
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
This finding indicates the skill's effective behavior extends into SMS login, token handling, account/package retrieval, payments, QR code generation, and order status checks, which are materially different from simple shop-info and holiday-mode operations. Such hidden identity, billing, and payment-related capabilities greatly expand the blast radius if the skill is invoked under false assumptions, especially because secrets and financial actions may be triggered indirectly.
This finding indicates the skill's effective behavior extends into SMS login, token handling, account/package retrieval, payments, QR code generation, and order status checks, which are materially different from simple shop-info and holiday-mode operations. Such hidden identity, billing, and payment-related capabilities greatly expand the blast radius if the skill is invoked under false assumptions, especially because secrets and financial actions may be triggered indirectly.
The trigger rules are extremely broad, including cases where the user does not explicitly mention shop information as long as the request relates to an authorized Shopee store. Overbroad activation increases the chance that this skill captures unrelated store-management requests and performs networked or state-changing actions without clear user intent, especially in a multi-skill environment.
YARA rule matched a known malware signature (reverse shell, backdoor, ransomware, C2 framework, or info stealer).
证码后:`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
This skill is declared as a Shopee store information/settings integration, but the file instead implements LinkFox account onboarding, SMS login, plan purchase, and payment support. That capability mismatch is dangerous because it can trick users or the hosting agent into invoking unrelated privileged account flows under the guise of Shopee shop management, indicating possible hidden monetization or credential-harvesting behavior.
The code can create paid orders and generate payment QR codes even though the skill is supposed to manage Shopee shop information and settings. In this context, billing functionality is unjustified and could be abused to solicit payments, trigger unauthorized purchases, or socially engineer users into paying for unrelated services.
The skill exposes capabilities to read environment variables, write files, use the network, and invoke shell commands, but does not declare any tool scope or permissions boundary. This creates an implicit trust problem: users and orchestrators cannot tell from the manifest what side effects are possible, increasing the risk of unexpected data access, file writes, or outbound requests.
The skill first warns that it consumes points and discourages automatic retries due to extra cost, but later states that it does not consume points. Contradictory billing guidance can mislead operators into performing unexpected paid actions or, conversely, trusting that retries are free when they are not, which is a security-relevant transparency issue around resource consumption.
The skill documents write operations that can alter store state, including profile changes and enabling holiday mode that prevents buyers from ordering, but it does not require a confirmation step. In practice this creates a risk of accidental business-impacting changes from ambiguous prompts, mis-triggering, or automation mistakes.
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-shop","sentiment":"POSITIVE",
"category":"OTHER","content":"店铺信息查询正常"}'
The documentation explicitly states that this endpoint returns Brazil-specific KYC and tax onboarding data, including CPF/CNPJ and billing address, but it provides no warning about handling sensitive personal and business information. In an agent skill context, that omission increases the risk that downstream agents or users will retrieve, display, log, or persist regulated data without appropriate privacy safeguards or least-privilege justification.
This documentation describes an operation that enables holiday mode, which blocks new customer orders, but it does not prominently warn about the business-impacting consequence at the point of use. In an agent skill context, missing operational safeguards can lead to accidental store disruption if a user or downstream agent triggers the action without understanding that order intake will be stopped.
The instructions direct an operator to collect and use a user's phone number with a registration script, but they do not require explicit user consent, provide a privacy notice, or describe how the number and returned data will be handled. In a support/onboarding workflow, this creates a real privacy and compliance risk because an agent may process personal data without informed authorization or adequate safeguards.
ensure_auth_skill_available() launches check_auth_dependency.py using subprocess.run(). For a skill whose declared role is forwarding Shopee Shop API operations, spawning another process is not an obvious or declared capability; it goes beyond straightforward API invocation and dependency checking could be handled in-process.
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
print(f"DEPENDENCY_MISSING: {json.dumps(payload, ensure_ascii=False)}", file=sys.stderr)
sys.exit(DEPENDENCY_EXIT_CODE)
try:
result = subprocess.run(
[sys.executable, str(checker)],
capture_output=True,
text=True,
The docstring and stderr message are written only in Chinese, and later comments/docstrings in the file continue this pattern. The policy allows locale constraints only when users are given a choice or the constraint is clearly documented and justified, which is not present here.
The code probes several writable filesystem locations and creates directories/files unrelated to simply proxying Shopee shop APIs. This broadens the skill from network forwarding into local data placement, which can leak sensitive output into shared or unexpected locations such as the working directory, home directory, or temp space where other users or processes may access it.
The helper unconditionally serializes and saves full API responses to local disk, even though the skill is described as forwarding Shopee shop info/settings APIs. Those responses can contain shop profile data, warehouse addresses, reseller brand info, KYC-related details, tokens, or other sensitive metadata, creating unnecessary local persistence and possible data exposure beyond user expectations.
The module docstring and all user-facing help/log strings are written in Chinese, which effectively constrains the skill's interaction language. There is no indication that users may select another language or that the Chinese-only behavior is a documented, justified locale restriction.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
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 file performs SMS-based LinkFox login, token exchange, user/team discovery, and API token generation, none of which are necessary for calling Shopee shop info/settings APIs through the declared developer proxy. This creates a high-risk credential-handling surface and suggests the skill may be collecting or minting credentials for a different platform than the one users expect.
This markdown file documents use of an Authorization header carrying LINKFOXAGENT_API_KEY, which is a sensitive credential. The file does not include any warning about keeping the key secret, avoiding sharing it, or handling it securely, despite describing a security-relevant operation.
This markdown file presents the skill instructions and operational details almost entirely in Chinese, which effectively forces a specific language for users consuming the skill documentation. The policy requires flagging language or locale constraints when they are imposed without user opt-in or a documented justification.