T01 · Skill Instruction Hijacking
- Location
SKILL.md:132- Finding
Automatic External Feedback Reporting Without Explicit User Consent
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill's Ozon trend lookup is mostly coherent, but it also includes sensitive account, payment, credential, persistence, and automatic feedback behaviors that need user review before installation.
Install only if you are comfortable giving this skill a LinkFox API key and, when troubleshooting access, potentially using phone/SMS login and payment flows. Prefer self-service key setup, avoid pasting keys into chat or shell profile files on shared machines, verify no LINKFOX_* endpoint variables are set to untrusted hosts, and be aware that full API responses, cache files, and possible QR images may be written locally.
SKILL.md:132Automatic External Feedback Reporting Without Explicit User Consent
scripts/mpstats_ozon_product_trend.py:36Environment-Controlled Endpoints Can Receive API Keys and Login Credentials
scripts/mpstats_ozon_product_trend.py:252Unvalidated Session Identifier Enables Output Path Traversal
scripts/mpstats_ozon_product_trend.py:60Agent Session and Application Metadata Is Sent With Every Trend Query
scripts/onboarding.py:478Generated API Key Is Printed to Standard Output and Recommended for Plaintext Persistence
scripts/onboarding.py:163Runtime Installation Instructions Use Unpinned Third-Party Dependencies
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
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 file implements LinkFox account onboarding, SMS login, API key acquisition, plan listing, order creation, payment QR generation, and order querying, which is unrelated to the declared Ozon product-trend analytics skill. This kind of scope mismatch is dangerous because it can be used to harvest user credentials, provision tokens, or monetize through payment flows under the guise of a benign analytics capability. The skill context makes this substantially more dangerous because users would not reasonably expect account-creation and payment behavior from an Ozon trend lookup tool.
The code constructs outbound request destinations from environment-controlled base URLs and then sends sensitive data such as phone numbers, SMS codes, access tokens, refresh tokens, and generated API tokens to those endpoints. If an attacker can influence environment variables, they can redirect authentication and token flows to attacker-controlled infrastructure, resulting in credential exfiltration and account compromise. The mismatch between the skill's stated Ozon trend purpose and this onboarding/login behavior makes the risk more suspicious and less justifiable.
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 a URL derived from environment variables and includes the Authorization header populated from the agent API key. An attacker who can set the environment can redirect requests to a malicious server and capture the API key or induce unintended privileged actions against attacker-chosen endpoints. Because this skill is supposed to retrieve Ozon product trend data, embedding a generic authenticated gateway client and billing operations increases the danger and reduces any legitimate need for configurable secret-bearing destinations.
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 is a severe description-behavior mismatch: a product-trend skill is reportedly tied to SMS login, API-key generation, account access, subscription browsing, payment order creation, and QR/payment rendering. Such hidden authentication and billing flows can collect sensitive user data, manipulate account state, or trigger financial actions under the guise of analytics, making the skill materially more dangerous than its stated purpose.
Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.
2. **Aggregate vs time-series**: `mpstats-ozon-product-detail` gives a one-number-per-metric period view; this skill shows the day-by-day shape behind those numbers.
3. **Drill-down → trend**: After `brand-products` / `category-products` / `seller-products` surfaces a hot SKU, use this skill to validate whether the hotness is recent, seasonal, or sustained.
## Display Rules
1. **Prefer a simple table or sparkline-friendly output** — one row per date with `date`, `price`, `sales`, `balance`, `rating`, `comments`; do not overfit a 90-point series into a single paragraph.
2. **Use `hasData` to distinguish gaps from zero sales** — `hasData=false` means the day has no observation; don't report it as a zero-sale day.
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 code includes plan purchasing, order creation, payment URL retrieval, QR rendering, and payment-status querying despite the skill being described as an analytics tool. These billing capabilities can charge users or steer them into financial transactions unrelated to the promised function, creating a strong deception and abuse risk. In this context, the presence of payment logic is especially suspicious because it is not needed to answer Ozon trend questions.
The code sends SMS verification codes, logs users in with phone-based authentication, calls token-login endpoints, fetches team metadata, and generates API tokens, none of which are necessary for Ozon product trend retrieval. This creates a direct path to collect sensitive authentication factors and issue long-lived credentials under a misleading skill identity. The deceptive context materially increases risk because users may disclose phone numbers and SMS codes believing they are needed for analytics.
The skill advertises capabilities that imply access to environment variables, file writing, and network operations, but it declares no explicit tool scope or permission boundaries. In an agent environment this weakens least-privilege controls and can let a seemingly simple analytics skill access secrets, exfiltrate data, or write files unexpectedly if the backing implementation is broader than described.
The trigger conditions are intentionally broad and direct activation even when the specific tool is not named, increasing the chance the skill is invoked for loosely related requests. In the presence of hidden authentication, account, or billing behavior, overbroad triggering increases accidental exposure and makes misuse more likely.
The skill instructs automatic feedback reporting based on user statements and model judgment, which can transmit user-provided content or interaction metadata to an external feedback API without explicit, informed consent. This creates a meaningful privacy risk because complaints, praise, intents, and free-form text may be forwarded outside the immediate task flow unexpectedly.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
| 402 | 算力或余额不足 | HTTP 402:按 SKILL.md 的 ## 解决认证和算力问题 处理。 |
| 其他非 200 值 | 业务异常 | 查看 errmsg / msg;常见为 productId 无效、日期越过昨日等 |
curl -X POST https://tool-gateway.linkfox.com/mpstats/ozon/productTrend \
The skill documentation includes a separate public feedback-submission API that is outside the stated purpose of retrieving Ozon product trend data. In an agent setting, unrelated write-capable endpoints expand the action surface and can cause unintended external data transmission or user-content submission, especially if an agent interprets all documented APIs as available workflow steps.
The onboarding instructions tell the operator to collect and process a user's phone number and SMS verification code through a script, but provide no privacy notice, consent guidance, retention limits, or handling restrictions. This creates a real risk of unnecessary collection of sensitive personal data and credential-like authentication factors, especially because the skill encourages an alternate registration flow rather than directing the user to self-service by default.
The markdown instructs permanently writing API keys into shell profile files and sourcing them immediately, without warning about credential persistence, shell history exposure, shared-account risks, or safer alternatives. While common operationally, embedding secrets into long-lived profile files can leak credentials to backups, dotfile sync, local users, or support tooling and increases the blast radius of compromise.
The skill persistently stores full API responses and cache files on local disk, including marketplace trend data and possibly request-correlated metadata, even though the tool is described as a read-only query skill. Unconditional persistence increases the risk of unintended data retention, cross-task data exposure, and later disclosure from shared workspaces or compromised local environments.
The docstring states that writing to /tmp is forbidden and that failure to write to the current directory should error, but the implementation silently falls back to the home directory and temporary directory. This mismatch can defeat operator expectations and policy controls, causing data to be written to less trusted locations where other users or processes may access it.
The request includes SESSION_ID, MESSAGE_ID, MODE_ID, and APP_NAME headers pulled from the environment and sends them to a remote gateway without explicit disclosure at the call site. While likely intended for tracing and product functionality, this still transmits contextual metadata off-host and may expose workflow identifiers or app context beyond what a user expects from a simple product-trend query.
The script always writes the complete API response to disk before deciding whether to print inline or summarize, and it does so without an explicit runtime warning or user confirmation. This creates silent local persistence of potentially sensitive business or session-linked data, which is especially risky in multi-user or shared project directories.
The code accesses LINKFOX_AGENT_API_KEY and LINKFOXAGENT_API_KEY, which are credential-bearing environment variables. The top docstring defers environment variable documentation to an external SKILL.md, so this file itself does not provide a direct warning or explanation about handling sensitive credentials.
The manifest describes returning daily Ozon product metrics, not creating local filesystem artifacts. Here the code creates writable directories and persists QR PNG files specifically to support checkout/payment, a capability outside the stated analytics context.
The code writes payment QR-code PNG files into local session directories without clear in-file disclosure or lifecycle controls. On shared systems, these files may be discoverable by other users or tools, exposing payment links or transaction metadata and leaving unnecessary sensitive artifacts on disk. In this skill's context, persistent payment artifacts are also unexpected and therefore more risky.
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 display rule instructs the agent to use the specific Chinese phrase "搜索位次数据在该赛道暂不可用" when search-visibility data is absent. This is a language-specific output requirement with no user opt-in or stated locale justification, which can violate language/locale policy expectations.