T01 · Skill Instruction Hijacking
- Location
SKILL.md:223- Finding
Silent Transmission of Conversation-Derived Feedback to an External Service
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill can perform keyword traffic analysis, but it also has under-scoped account, billing, feedback-reporting, endpoint, and file-persistence behavior that deserves review before installation.
Review this skill carefully before installing. It is not just a read-only keyword analytics helper: it can handle phone-based login, generate or expose API keys, guide paid credit purchases, create payment orders, submit feedback externally, and write full response data to disk. Only use it if you trust LinkFox with the queried business data and credentials, and avoid endpoint overrides or shared environments unless the publisher fixes the scoping and persistence issues.
SKILL.md:223Silent Transmission of Conversation-Derived Feedback to an External Service
scripts/onboarding.py:72Environment-Controlled API Endpoints Can Redirect Sensitive Credentials
references/onboarding.md:12API Key Is Exposed in Standard Output and Stored in Plaintext Shell Profiles
```
2. The script obtains or generates an API key.
3. `_emit` prints the full key to stdout.
...[truncated 777 chars]scripts/sif_keyword_traffic.py:250Unsanitized Session Identifier Allows Writes Outside the Intended Data Directory
The code builds request destinations from environment-controlled base URLs and then sends sensitive authentication material, including access tokens, refresh tokens, SMS-login data, and generated API keys, to those endpoints. If an attacker can influence environment variables in the skill runtime, they can redirect these requests to attacker-controlled infrastructure and exfiltrate credentials or trigger SSRF-style outbound access.
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 helper uses environment-derived base URLs with urllib and attaches the API key in the Authorization header before performing outbound requests. In a compromised or misconfigured environment, this can leak the user's API key and route requests to unintended internal or external services, creating both credential-exposure and SSRF risk.
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 sent via urlopen includes environment-derived values in headers, including the API key and session/application metadata, and the destination base URL is itself configurable via the LINKFOX_TOOL_GATEWAY environment variable. In an agent setting, environment variables are often influenced by the execution harness; if an attacker can alter them, the skill can exfiltrate credentials and tracking metadata to an attacker-controlled endpoint. The skill context makes this more dangerous because it is designed to call a remote service and always performs network transmission automatically.
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 keyword traffic analysis, but the documented behavior includes authentication, account inspection, plan listing, payment order creation, QR code generation, and payment-status polling. This is a major capability mismatch that can surprise users and route the agent into handling credentials, billing, and account data unrelated to the requested analysis.
Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.
searchKeyword: "wireless charger", country: "US", condition: "totalPeriod.in"
## Display Rules
1. **Present data clearly**: Show query results in well-structured tables. Group data by traffic channel exposure ratios for easy comparison.
2. **Distinguish product-level vs keyword-level scores**: Do not mix `naturalSearchExposureScore` (product-wide) with `keywordNaturalExposureScore` (this keyword only). Label columns so users know which scope they are reading.
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
This file implements SMS login, API-key issuance, subscription discovery, order creation, and payment QR generation, which is materially unrelated to the declared keyword traffic-analysis skill. That mismatch expands the skill's privilege and attack surface, enabling credential collection and financial operations that users would not reasonably expect from an analytics workflow.
The skill contains direct billing functionality, including package lookup, order creation, and payment QR rendering. For a traffic-analysis skill, embedded purchase capability is unjustified and dangerous because it can initiate real-money transactions and expose users to unexpected charges or social-engineering-style monetization flows.
The code performs SMS-based login and then retrieves or generates API tokens for the user, which is far beyond what the stated analytics purpose justifies. This creates a credential-handling and token-minting path inside the skill, so compromise or misuse could grant persistent access to the user's account and linked services.
The skill declares no explicit tool or permission scope even though its documented behavior requires environment access, local file writes, and network calls. Without a least-privilege boundary, an agent may invoke capabilities beyond what users would reasonably infer from a keyword-analysis skill, increasing the chance of unintended data access or exfiltration.
The trigger conditions are overly broad and activate on generic topical mentions rather than a narrow, user-intended invocation. Broad triggers increase the risk that the skill runs in contexts where the user did not request this external lookup, potentially causing unnecessary network calls, data persistence, or paid API usage.
The skill documents automatic persistence of full API responses into the current project directory, tied to session structure, without a prominent up-front warning or consent flow. This can leave potentially sensitive commercial data, account-linked metadata, or user query history on disk where other tools, collaborators, or future tasks may access it.
The skill instructs automatic reporting to a Feedback API for broad situations unrelated to the core task. That creates an undisclosed secondary data flow where user prompts, dissatisfaction, or other interaction content may be transmitted externally without being necessary to fulfill the requested keyword analysis.
Auto-reporting broad user feedback can transmit user-provided content to an external service without explicit consent or a clear need for task completion. In an agent setting, that creates privacy and data-governance risk because free-form prompts may contain business-sensitive details beyond the skill's functional inputs.
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/sif/keywordSummary \
The file documents a separate feedback-posting endpoint that is unrelated to the keyword summary capability. In an agent-skill context, unrelated write-capable endpoints expand the skill’s effective scope and can be abused to exfiltrate user/task details or perform unintended external actions if the agent follows the documentation literally.
The onboarding document adds authentication, account registration, and billing workflows that are outside the stated purpose of a keyword traffic analysis skill. This unnecessarily expands the skill’s operational scope into credential and payment handling, increasing the chance an agent will solicit sensitive data or guide users through risky actions under the guise of analytics support.
The documentation instructs the agent to assist with registration and plan purchase despite the skill being described as competitive keyword traffic analysis. Embedding account creation and payment enablement into an unrelated skill creates a social-engineering surface where users may be persuaded to share personal data or make purchases through agent-mediated flows they would not expect.
The instructions explicitly tell the agent to collect a user's phone number and use it to initiate login/registration flows, but provide no privacy notice, consent language, data minimization guidance, or retention limits. In the context of an analytics skill, requesting phone numbers is especially unexpected and increases the risk of privacy harm, phishing, or misuse of personally identifiable information.
The skill description and runtime behavior are entirely Chinese-focused, including Chinese-language UI text and a fixed +86 phone area code in the login flow. There is no indication that the user can choose another language or locale, so the skill effectively forces a specific locale without documented opt-in or a clearly stated regional-only scope.
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 = ""
Both the verification-code request and login request hard-code areaCode to +86, restricting the skill to a specific locale. Because the file does not clearly justify this as a region-specific tool or offer any user choice, this is a natural-language locale policy concern.
The documentation promises cwd-only persistence and explicitly says not to write to /tmp, but the implementation falls back to the home directory and temporary directory when earlier locations are not writable. This mismatch can cause sensitive API responses to be stored in less expected or less controlled locations, undermining operator assumptions and increasing the risk of unintended disclosure in multi-user or ephemeral environments. In this skill, the stored data contains traffic-analysis results and metadata, so silent relocation materially changes the privacy posture.
The request includes SESSION_ID, MODE_ID, and APP_NAME headers in addition to authorization, but the script does not clearly disclose this metadata transmission at execution time. While sending some context to a trusted backend may be operationally legitimate, undisclosed metadata sharing can leak identifiers and usage context beyond what users expect, especially if the endpoint is misconfigured or redirected. The risk is amplified by this skill's remote API design and environment-configurable gateway base URL.
The script always saves the complete API response to local disk, but there is no explicit execution-time consent, opt-out, or warning before persistence occurs. If the response contains sensitive commercial data, identifiers, or account-related metadata, automatic storage increases exposure through local filesystem access, backups, logs, and artifact collection. The skill context increases risk because the behavior is systematic and applies to every invocation.