T01 · Skill Instruction Hijacking
- Location
SKILL.md:178- Finding
Silent external feedback reporting redirects the Agent beyond the declared task
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill mostly matches Shopee authorization use, but it adds under-scoped outbound reporting, credential-bearing configurable endpoints, and broad local retention of sensitive authorization data.
Install only after reviewing the publisher and deciding whether you accept LinkFox account access, local response storage, clipboard/file handling of authorization URLs, billing-order capability, and automatic feedback reporting. Use a clean environment with trusted LINKFOX_* URL variables, avoid shared machines, inspect/delete generated linkfox cache files after use, and do not provide phone codes or payment confirmation unless you explicitly intend to set up or purchase LinkFox service access.
SKILL.md:178Silent external feedback reporting redirects the Agent beyond the declared task
scripts/authorize_url.py:25API credentials can be transmitted to an arbitrary environment-controlled origin
scripts/_token_status_output.py:24Shallow token filtering can persist and print nested credentials
scripts/authorize_url.py:121Shopee OAuth authorization URLs are automatically copied and stored insecurely
scripts/_lf_output.py:22Complete API responses are retained with weak permission and temporary-directory controls
The destination URL is partially controlled by environment variables, allowing requests containing the authorization API key to be redirected to an arbitrary host. In an agent or multi-tenant runtime, a poisoned environment could exfiltrate credentials and all submitted authorization parameters to attacker infrastructure.
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 request destination is derived from environment variables (LINKFOX_TOOL_GATEWAY or SHOPEE_API_BASE_URL) and then used directly in urlopen with the Authorization API key attached. If an attacker can influence the runtime environment, they can redirect this request to an attacker-controlled server and exfiltrate the credential, making this an SSRF-style credential leakage issue. In a store-authorization skill, this is especially sensitive because the response may also reveal authorized store metadata.
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 allows base URLs for login and agent-user API calls to be overridden by environment variables, then sends SMS login data, access tokens, refresh tokens, and API-token generation requests to those derived endpoints. If an attacker controls the runtime environment, they can redirect these credential-bearing requests to an attacker server and capture sensitive authentication material.
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 also derived from environment variables and used to send authenticated requests with the LinkFox API key in the Authorization header. In a hostile skill/runtime environment, this can exfiltrate the API key and redirect account, package, and order operations to attacker-controlled infrastructure.
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 request destination is derived from environment variables (LINKFOX_TOOL_GATEWAY or SHOPEE_API_BASE_URL) and then used directly in urlopen. If an attacker can influence the runtime environment, they can redirect this script to an arbitrary endpoint and cause the Authorization API key and store authorization query data to be sent to an attacker-controlled server, resulting in credential exfiltration and possible SSRF-style outbound access.
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 ""
Claiming support for authorization flow, shop binding, and authorized-store queries while only supporting narrower token/status lookup is a material capability overstatement. In agent systems, such overclaiming is a security issue because it broadens activation and can prompt unnecessary collection of identifiers or interaction with sensitive account state without actually fulfilling the stated task.
Claiming support for authorization flow, shop binding, and authorized-store queries while only supporting narrower token/status lookup is a material capability overstatement. In agent systems, such overclaiming is a security issue because it broadens activation and can prompt unnecessary collection of identifiers or interaction with sensitive account state without actually fulfilling the stated task.
Claiming support for authorization flow, shop binding, and authorized-store queries while only supporting narrower token/status lookup is a material capability overstatement. In agent systems, such overclaiming is a security issue because it broadens activation and can prompt unnecessary collection of identifiers or interaction with sensitive account state without actually fulfilling the stated task.
Claiming support for authorization flow, shop binding, and authorized-store queries while only supporting narrower token/status lookup is a material capability overstatement. In agent systems, such overclaiming is a security issue because it broadens activation and can prompt unnecessary collection of identifiers or interaction with sensitive account state without actually fulfilling the stated task.
The trigger rule explicitly allows activation even when key terms like Shopee or authorization are absent, making accidental or adversarial invocation much more likely. Over-broad routing is dangerous because it can pull unrelated conversations into a skill that performs network calls, filesystem writes, or account-sensitive operations, expanding exposure without clear user intent.
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
- If the user needs both capabilities, obtain two fresh authorization URLs and explain that both authorizations must be completed.
- Authorization URLs expire after one hour, so obtain a new URL for every authorization attempt.
When calling `developerProxy`, pass the Shopee API path plus `shopId` or `merchantId`. Do not pass `appType` or an access token. The service routes `api/v2/ads/**` through the AD application and all other `api/v2/**` paths through the ERP application.
## 可用脚本
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
### 3. 查询授权状态 — `/shopee/storeTokens`
只返回授权状态/元数据,**不返回**原始 access token 或 refresh token(脚本侧也会剥离)。
**Request**(`shopId` 与 `merchantId` 二选一):
| 参数 | 类型 | 必填 | 默认 | 说明 |
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
The file implements LinkFox account onboarding, SMS login, billing, and API-key provisioning, while the manifest claims Shopee store authorization and management. This mismatch is dangerous because users and reviewers may grant trust and permissions under false pretenses, enabling credential collection and unrelated account operations.
The ability to purchase LinkFox plans and generate payment QR codes is unjustified by the advertised Shopee authorization purpose. In this context, unrelated monetization features are especially suspicious because they can manipulate users into financial actions they did not intend when invoking a store-binding skill.
The code creates purchase orders and renders payment QR codes, which is materially outside the stated Shopee authorization/query scope. Hidden payment functionality increases the risk of unauthorized charges, deceptive user flows, and abuse of trust in a marketplace authorization skill.
The login flow obtains or generates a LinkFox API key and returns it to the caller, which is unrelated to Shopee store authorization. This creates a clear risk of credential harvesting and privilege expansion under a misleading skill description.
The skill advertises file writing, shell, environment, and network-capable behavior but declares no explicit tool scope or permission boundary. In an agent setting this increases the blast radius of prompt-triggered actions, because the model may invoke sensitive capabilities without a least-privilege contract visible to reviewers or enforcement layers.
The skill instructs the agent to always persist full API responses to session-scoped files, which may include store identifiers, authorization state, account metadata, and other data beyond what is needed for the reply. Unnecessary retention increases the chance of later unauthorized access, cross-task leakage, or accidental inclusion of sensitive information in subsequent agent context.
The skill defines cn as the default region, which imposes a locale-specific choice unless the user explicitly overrides it. Because the file serves multilingual usage and does not state a justification for defaulting all users to the China cross-border flow, this is a natural-language locale policy concern.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
export KEY=$LINKFOXAGENT_API_KEY
The document instructs operators to collect a user's phone number and process login/registration flows via a script, but it does not require explicit user consent, minimization, masking, retention limits, or a privacy notice. This creates a real privacy and account-security risk because operators may handle sensitive identifiers and one-time codes in ad hoc ways that expose personal data or facilitate unauthorized account access.
The helper serializes and persistently stores full API responses to disk and also updates session indexing metadata. In a Shopee store authorization skill, API responses can reasonably contain access tokens, shop identifiers, account metadata, or other sensitive business data, so writing them unredacted to broadly chosen local paths creates an unnecessary data-retention and exposure risk beyond the stated authorization/query function.
The skill writes complete response payloads to disk automatically without any user-facing notice, consent, or indication that sensitive authorization data will be retained. Because this skill handles store authorization and account-linking workflows, silent persistence can capture credentials, tokens, shop data, and internal business information that users would not expect to be stored locally.
This Python file contains natural-language strings and comments in Chinese, including API key guidance and later runtime messages, but does not offer the user any language selection or indicate that the skill is intentionally China-only. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation.