T01 · Skill Instruction Hijacking
- Location
SKILL.md:164- Finding
Automatic External Feedback Submission Without Explicit User Consent
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill mostly performs the advertised Ozon analytics task, but it also includes sensitive onboarding, payment, credential handling, persistent storage, and automatic feedback reporting that need human review before installation.
Review this skill before installing. Use it only if you are comfortable sending Ozon brand queries and account credentials to LinkFox services, paying for credits through its onboarding flow, and storing returned analytics data locally. Avoid endpoint override environment variables unless you control the runtime, and prefer secure secret storage over putting API keys in shell startup files.
SKILL.md:164Automatic External Feedback Submission Without Explicit User Consent
scripts/mpstats_ozon_brand_products.py:40Sensitive Credentials Can Be Redirected to Arbitrary Endpoints
scripts/onboarding.py:491API Key Is Printed to Standard Output and Recommended for Plaintext Persistence
scripts/mpstats_ozon_brand_products.py:235Unsanitized Session Identifier Permits Output Path Traversal
The outbound request includes multiple environment-derived headers and, more importantly, allows the destination base URL to be overridden via LINKFOX_TOOL_GATEWAY. That creates a server-side request/data exfiltration path: in a hostile or misconfigured runtime, sensitive metadata and the API key can be sent to an attacker-controlled endpoint instead of the intended gateway. In this skill context, the tool handles marketplace analytics but also carries authentication material, so redirectable egress is more dangerous than a normal API client pattern.
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 a LinkFox onboarding, login, API-token generation, package purchase, and payment QR workflow, while the skill is described as Ozon brand-product analytics. This severe capability mismatch is dangerous because a user or orchestrator expecting marketplace analytics may instead be induced to disclose phone numbers, SMS codes, and payment actions to unrelated infrastructure.
The code builds request destinations from environment-controlled base URLs and then sends sensitive data such as phone numbers, SMS codes, access tokens, refresh tokens, API keys, and payment/order data to those endpoints. If an attacker can influence the environment, this becomes credential exfiltration or SSRF-to-attacker infrastructure, and the risk is amplified because this file is an onboarding/payment flow unrelated to the advertised MPSTATS analytics purpose.
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 derived from environment variables and used in urllib requests with the Authorization header populated from the agent API key. An attacker who controls the runtime environment can redirect these requests to a malicious host and capture the API key or force requests to unintended internal/external services; the mismatch with the declared skill intent makes this especially suspicious.
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 skill is presented as product analytics, yet static analysis indicates additional account and payment workflows such as SMS login, API key generation, package listing, order creation, and payment QR generation/status checks. Hidden authentication and payment capabilities are highly sensitive because they can collect user phone numbers, initiate billing flows, or manipulate credentials far beyond the user's apparent intent.
The skill is presented as product analytics, yet static analysis indicates additional account and payment workflows such as SMS login, API key generation, package listing, order creation, and payment QR generation/status checks. Hidden authentication and payment capabilities are highly sensitive because they can collect user phone numbers, initiate billing flows, or manipulate credentials far beyond the user's apparent intent.
Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.
}
## Display Rules
1. **Compact brand table** — key columns: `productId`, `title`, `price`, `monthlySalesUnits`, `monthlySalesRevenue`, `rating`, `reviewCount`, `balance`, `turnoverDays`, `lostProfit`.
2. **Revenue share context** — `revenueSharePercent` is the SKU's share **within this brand result set**, 0-100; clarify the base when presenting.
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 docstring promises writes only under the current working directory and explicitly forbids /tmp, but the implementation silently falls back to home-directory and temporary-directory storage. That mismatch is security-relevant because operators and higher-level agents may rely on the documented storage boundary, while actual behavior can place sensitive API output in less controlled or unexpected locations, increasing accidental disclosure risk.
The module docstring openly states that this is a self-contained account/environment onboarding CLI with commands for login, plan listing, ordering, and payment status, which directly contradicts the manifest’s Ozon analytics intent. That contradiction is a strong indicator of deceptive packaging and raises the likelihood that the skill could trick users or the platform into running unrelated sensitive workflows.
This section performs SMS login, token exchange, user-info retrieval, API key generation, and related account bootstrap actions that are unrelated to brand-product analytics. In the context of a data-analysis skill, such credential and payment-enablement logic creates a high-risk phishing/provisioning vector and expands the blast radius from analytics to full account compromise and monetized actions.
The skill exposes capabilities to read environment variables, write files, and access the network without declaring any explicit tool scope or permission boundaries. In an agent setting, this weakens least-privilege controls and makes it harder for reviewers and policy systems to constrain what the skill can do, increasing the chance of secret access or unintended persistence.
The trigger rules are broad enough to activate the skill even when the user does not explicitly request MPSTATS or this specific integration. Over-broad invocation can cause unintended external calls, unnecessary cost, and disclosure of user queries to a third-party service when a narrower or different tool would have been more appropriate.
The skill instructs the agent to always write full API responses into a session-scoped directory under the current project. Persistent storage of complete responses can retain sensitive business data, query context, and identifiers beyond the immediate task, and writing into the project workspace can expose that data to other tools, users, commits, or later sessions.
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 的 ## 解决认证和算力问题 处理。 |
| 其他 | 业务异常 | 查看 errmsg;常见为 brandName 拼写错误、日期越过昨日等 |
curl -X POST https://tool-gateway.linkfox.com/mpstats/ozon/brandProducts \
The onboarding flow instructs users to provide a phone number to a local script and to persist the returned API key in shell startup files, but it does not disclose the privacy and security implications of either action. This can lead to unintended collection/exposure of personal data and long-lived credential leakage via plaintext shell profiles, backups, shared accounts, or diagnostic logs.
The script caches and persists full API responses to local files, including session-associated analytics data and possibly error bodies or account-scoped information. This expands the data exposure surface beyond the stated read-only analytics behavior and can leak sensitive business intelligence to other local users, logs, backups, or later processes with filesystem access.
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 skill enforces an 11-digit phone number format and always submits areaCode '+86', which forces a specific locale/region behavior. There is no opt-in, alternate locale handling, or documented justification in this file that would exempt this restriction.
The login flow exchanges a phone number and SMS code for access tokens and then retrieves or generates an API key via multiple network calls. Although the module docstring describes the commands, this file does not include an in-code warning, confirmation, or explicit user-facing disclosure that sensitive authentication data and resulting credentials will be transmitted to remote services.
This line directs a specific language/locale behavior for outputs: original Russian titles must be preserved unless the user asks for translation. That is a language-policy constraint embedded in natural language and does not explicitly offer a default user choice at presentation time.
This limitation requires the agent to keep content in Russian unless the user specifically requests translation. Because it hard-codes a locale behavior rather than offering a language choice, it matches the language/locale policy concern described by SQP-3.
The QR rendering path creates a PNG file on disk in a session directory, which is a file write affecting the local system. While the command name mentions QR rendering, the code does not provide an explicit warning or disclosure that a persistent file will be created under a workspace/home/temp path.