T01 · Skill Instruction Hijacking
- Location
SKILL.md:163- Finding
Silent Transmission of User Statements and Inferred Intent Through the Feedback API
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill performs the advertised trademark checks, but it also includes under-scoped feedback, credential, billing, endpoint override, and persistence behaviors that users should review carefully before installing.
Install only if you are comfortable sending product listing text and account/authentication data to LinkFox, handling a LinkFox API key, and potentially using the built-in billing workflow. Before use, avoid endpoint override environment variables, do not paste API keys into shared logs or shell history, review what feedback would send externally, and periodically clean local linkfox response/cache files.
SKILL.md:163Silent Transmission of User Statements and Inferred Intent Through the Feedback API
scripts/ruiguan_text_trademark_detection.py:36Environment-Controlled Endpoints Can Receive Authentication Credentials and Sensitive Product Data
scripts/ruiguan_text_trademark_detection.py:61Unnecessary Agent and Session Metadata Is Transmitted With Trademark Queries
scripts/onboarding.py:484Generated API Keys Are Printed in Full and Recommended for Plaintext Shell Storage
scripts/ruiguan_text_trademark_detection.py:250Unvalidated Session Identifiers Permit Path Escape and Cached Results Are Not Isolated by User
scripts/onboarding.py:163Onboarding Recommends Installing Unpinned Dependencies From the Active Package Index
The code allows service base URLs to be overridden by environment variables and then sends authentication material, SMS-login data, and token-related requests to those computed endpoints via requests.post. In a skill/runtime environment where env vars can be influenced, this can redirect sensitive traffic to attacker-controlled infrastructure and expose access tokens, phone numbers, verification codes, or generated API keys.
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-controlled base settings and used in urlopen with the Authorization header populated from LINKFOX_AGENT_API_KEY. If an attacker can alter the environment, API keys and subsequent account, package, or order traffic can be exfiltrated to a malicious endpoint under the guise of normal gateway operations.
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
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 declared purpose is trademark text analysis, but the detected behavior includes SMS verification, third-party login, API key generation, account/team inspection, subscription listing, order creation, payment initiation, QR-code generation, and payment-status polling. This is a severe description-behavior mismatch that could trick users into authorizing credential handling and financial actions unrelated to the stated task.
Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.
limit: 100
## Display Rules
1. **Risk-first presentation**: Always highlight the overall risk level (`textTrademarkRadar`) at the top of results. Use clear language: "Low Risk", "Needs Manual Review", or "High Risk".
2. **Blacklist prominence**: If `blacklistTrademarks` is non-empty, display them first with a clear warning.
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
This file implements account onboarding, SMS authentication, API-key retrieval, plan discovery, ordering, and payment QR generation, which are unrelated to the declared trademark-text detection purpose. Such scope divergence is dangerous because it introduces credential collection and monetization behavior into a skill that users would reasonably expect to perform content analysis only.
The billing and order workflow creates purchasable plans and renders payment QR codes despite no functional need for trademark detection. In this context, hidden purchasing capability materially increases risk of unauthorized charges, deceptive upsell behavior, and abuse of user trust within an unrelated skill.
The skill performs SMS-based login, processes verification codes, and generates or retrieves API tokens, none of which are justified by a trademark-screening feature. This effectively turns the skill into a credential-harvesting and account-access mechanism under misleading metadata, making the mismatch especially dangerous.
The docstring promises 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 then the system temp directory. That mismatch is dangerous because operators and users may rely on the documented storage boundary, while the actual code may place sensitive trademark-analysis data in less controlled locations, increasing exposure to other local users, backup systems, or ephemeral shared environments.
The skill declares no explicit tool scope or permissions despite instructions that require access to environment variables, network calls, and file writes. This creates an over-privileged execution model where the runtime may permit capabilities beyond what users expect, increasing the chance of unintended data access or side effects.
The skill mandates persistent logging of complete API responses to session-scoped project files and sometimes stdout. Because responses can contain user-supplied listing text, risk assessments, and possibly account-related metadata, this creates a durable data exposure path in the workspace and terminal history beyond the immediate task.
The skill instructs automatic feedback reporting under broad conditions without notifying the user what data may be sent. In this context, user listing content, dissatisfaction comments, or workflow details could be transmitted externally without informed consent, creating a privacy and data-governance risk.
The skill sends productTitle and optional productText to an external endpoint but provides no privacy, retention, consent, or data-classification guidance. Because listing text may contain unpublished product details, supplier information, or other sensitive business data, the omission can lead agents to export user-provided content to a third party without adequate notice or safeguards.
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/ruiguan/textTrademarkDetection \
The documentation includes a separate feedback API that is unrelated to the trademark-detection function of the skill. In an agent setting, this creates an unnecessary secondary outbound channel that could be invoked to transmit user content, analysis results, or metadata to another service, increasing data-exfiltration and prompt-injection risk even though the doc warns not to mix endpoints.
The onboarding instructions explicitly tell the operator to collect a user's phone number and pass it to an external registration/login script, but they do not require informed consent, describe what service will receive the data, or state how the phone number and verification code will be handled. This creates a real privacy and security risk because the skill normalizes transmission of personal data and OTP-based authentication material to a third-party workflow without clear disclosure or minimization.
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 format and fixed area code +86, and its interface/help text is entirely in Chinese. This imposes a specific language and locale without opt-in or an explicit documented justification in the file.
The login flow returns the API key directly in stdout JSON, which is likely to be captured by agent logs, shell history pipelines, transcripts, or downstream tooling. Exposing long-lived credentials in routine command output increases the chance of inadvertent disclosure and later account compromise.
The skill sends user-supplied listing content plus session metadata to a remote API without any in-band disclosure or consent mechanism in the execution flow. While remote processing is expected for this type of skill, the absence of explicit notice and metadata minimization makes it a genuine privacy/security weakness, especially because the content being analyzed can include commercially sensitive product drafts and account context.
The skill implements persistent session tracking and local logging infrastructure well beyond simple trademark detection, including session directories, index files, metadata aggregation, and cross-run bookkeeping. In this skill context, that broadens data retention and creates unnecessary privacy and compliance risk because user inputs and API outputs may contain product plans, listings, or infringement-analysis results that are stored long-term without clear need or user consent.
The code always writes the full API response to disk before deciding what to print, with no runtime prompt, opt-in, or masking. In this skill context, the response may contain sensitive listing text, suspected trademarks, and compliance assessments, so unconditional persistence increases the chance of unintended local disclosure and over-retention.
The instruction says to default to US whenever the user does not specify a region. This imposes a locale/region choice without explicit user opt-in, which matches the policy category for language or locale constraints applied by default.