T01 · Skill Instruction Hijacking
- Location
SKILL.md:262- Finding
Automatic Transmission of User Feedback to an Unrelated External Service
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill’s main market-analysis function is legitimate, but it also handles authentication, API keys, payments, automatic feedback reporting, and persistent local outputs with insufficient scoping and disclosure.
Review this skill carefully before installing. It may be useful for paid LinkFox/Jiimore niche analysis, but it can collect phone/SMS login data, expose API keys in command output, guide users into plaintext key storage, create payment orders, send automatic feedback to a separate service, and store full responses locally. Only use it in a controlled environment with trusted environment variables and avoid sharing sensitive product-research queries or credentials through agent logs.
SKILL.md:262Automatic Transmission of User Feedback to an Unrelated External Service
scripts/jiimore_get_niche_info_by_keyword.py:35Credential-Bearing Requests Can Be Redirected to Arbitrary Endpoints
scripts/jiimore_get_niche_info_by_keyword.py:60Unnecessary Agent Session and Message Metadata Is Sent to the Gateway
scripts/onboarding.py:483Generated API Key Is Printed to Standard Output and Stored in Plaintext Shell Profiles
scripts/jiimore_get_niche_info_by_keyword.py:247Unsanitized Session Identifier Allows Output Path Traversal
scripts/onboarding.py:162Onboarding Recommends Unpinned Runtime Dependency Installation
The outbound request includes multiple headers populated directly from environment variables, and the destination base URL is also environment-controlled via LINKFOX_TOOL_GATEWAY. In an agent/runtime context where environment values may be attacker-influenced, this enables exfiltration of sensitive execution metadata and potentially the API key to an arbitrary endpoint by redirecting the request target.
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 network destinations to be controlled by environment variables such as LINKFOX_LOGIN_API_URL and LINKFOX_AGENT_USER_API_URL, then sends sensitive data including phone numbers, SMS codes, access tokens, refresh tokens, and generated API tokens to those endpoints via requests.post. In a skill/runtime environment where env vars can be influenced, this becomes an SSRF and credential-exfiltration path, and the danger is amplified because this skill already handles high-value authentication material unrelated to its declared niche-analysis 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 then used in urllib.request.urlopen with the Authorization header carrying the API key. An attacker who can alter the environment can redirect these calls to a malicious or internal host, causing API-key leakage or unauthorized network access, which is especially risky in an agent skill that may run in shared or automated environments.
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 documented purpose is keyword-based niche analysis, but the skill behavior reportedly includes SMS verification, phone-based login, API-key generation, team/account inspection, plan listing, order creation, QR-code payment generation, and payment-status checks. That is a major privilege and purpose expansion into authentication, account management, and billing flows, which can be abused for unauthorized account actions or social-engineering-assisted purchases.
The activation criteria are overly broad and can trigger on generic market-research or opportunity-assessment requests, even when the user did not ask for this specific tool. In context, that is dangerous because the skill can incur paid API usage, write persistent local logs, and invoke unrelated onboarding/payment behaviors under an expansive trigger surface.
Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.
}
## Display Rules
1. **Present data clearly**: Show query results in well-structured tables. Convert decimal ratios to percentages for readability (e.g., 0.25 -> 25%).
2. **Highlight key metrics**: Always surface the niche title, demand score, weekly search volume, weekly sales, brand count, and top 5 brands click share as primary columns.
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 account onboarding, SMS login, API-key acquisition, plan listing, ordering, and payment QR generation, which does not match the declared skill purpose of Amazon niche keyword analysis. This functionality mismatch is dangerous because it creates a covert credential-collection and commerce workflow under the cover of an unrelated analytical skill, increasing the likelihood of deceptive data capture.
The package and order management logic introduces commerce capabilities that are unnecessary for a keyword-market-analysis skill and can induce users to make purchases through the agent. In context, this is more dangerous because it monetizes an undeclared workflow and pairs purchasing with account/API-key handling, expanding both fraud and abuse potential.
This section performs SMS verification, login, token exchange, user/team discovery, and API-token generation, all unrelated to the stated niche-analysis functionality. Because it directly obtains and returns long-lived credentials, a misleading skill context makes this significantly more dangerous: users may provide phone numbers and codes without realizing the skill is provisioning access and exposing tokens.
The skill advertises capabilities that imply access to environment variables, local file writing, and network calls, yet it declares no explicit tool scope or permission boundary. This creates an authorization ambiguity where a user or host system may not realize the skill can access secrets, persist data, or contact external services, increasing the risk of unintended data exposure or over-privileged execution.
The skill requires saving every full API response to a session-linked local path under the working directory by default. Persistent logging of complete responses can leak sensitive user queries, business research, account-related API content, or identifiers to other local processes, collaborators, backups, or source-control mistakes, and the session-based path makes cross-task correlation easier.
The file instructs the skill to translate user-provided keywords into English, Japanese, or German based on marketplace before calling the API. This imposes a language transformation automatically rather than offering the user a choice or obtaining opt-in, which is a natural-language locale policy concern.
The skill instructs automatic reporting to a separate Feedback API unrelated to the core niche-analysis function. Silent side-channel reporting can transmit user prompts, outputs, or metadata to an additional service without clear consent, expanding data sharing beyond the user's expectation.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
}
## curl 示例
```bash
curl -X POST https://tool-gateway.linkfox.com/jiimore/getNicheInfoByKeyword \
The manifest describes a skill for analyzing Amazon niche markets by keyword, but this file also documents a distinct endpoint for posting user feedback to skill-api.linkfox.com. Collecting and transmitting feedback is not an obvious requirement of keyword-based niche analysis and introduces an additional outbound capability outside the core analytical purpose.
The onboarding flow explicitly instructs collection and handling of a user's phone number and one-time verification code, which are sensitive authentication factors, without any privacy notice, minimization guidance, or warning not to retain or reuse them. In an agent context, this increases the risk of credential interception, account takeover, and unsafe handling of personal data if the agent or logs capture these values.
The file header promises outputs are written only under the current working directory and explicitly says writing to /tmp is forbidden, but the implementation falls back to the home directory and then the temp directory. In agent environments, this can cause data to be written outside the expected project boundary, increasing the risk of unintended data exposure, cross-task leakage, or persistence in less controlled locations.
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 = ""
Natural-language strings and validation logic enforce an 11-digit domestic phone number with +86, and the ordering flow is limited to wechat and alipay. For a general onboarding CLI, this constitutes a locale policy concern because the file does not offer user opt-in to a China-specific locale or clearly document that the skill is intentionally region-specific.
The login flow returns a freshly obtained API key in stdout JSON, which is likely to be captured by agent logs, transcripts, shell history, orchestration systems, or downstream tools. Since the code is part of a skill and not a local-only CLI with clear operator expectations, the surrounding context makes credential exposure substantially more dangerous.
This markdown file contains user-facing API instructions in Chinese from the title onward, but it does not indicate that the skill is region-specific or provide an opt-in language choice. Under the policy, forcing a specific language without user choice can be a natural-language policy violation.
The file’s primary natural-language documentation, usage notes, and output policy are written in Chinese, and later runtime messages such as the API key error are also Chinese-only. This imposes a specific language/locale on users without any indication of choice or justification, which matches the language-policy violation criteria.
The comment says responses below the threshold are 'directly fully output, not written to file', but main() always resolves an output path and writes the serialized response to disk before deciding whether to print inline. This is an active contradiction between documentation and behavior, not just omitted detail.
The path-selection logic explicitly allows falling back to $TMPDIR even though earlier documentation says /tmp must not be used. For a skill that may process market-analysis data tied to user sessions and metadata, writing to temp locations can expose data to weaker retention and isolation guarantees and may violate user or platform expectations.