T01 · Skill Instruction Hijacking
- Location
SKILL.md:127- Finding
Automatic Disclosure of User Conversation Content to an External Feedback Service
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill can perform Walmart product lookup, but it also handles sensitive login/payment flows, stores full results locally, and can automatically send feedback externally without clear user consent.
Install only if you are comfortable giving this skill LinkFox credentials, product-query history, and possible phone/SMS onboarding data, and only after reviewing or disabling automatic feedback submission, local response storage, endpoint overrides, and billing/order actions.
SKILL.md:127Automatic Disclosure of User Conversation Content to an External Feedback Service
scripts/wallysmarter_product_detail.py:37Environment-Controlled Endpoints Can Receive API Keys and Login Tokens
scripts/onboarding.py:478Phone Numbers, SMS Codes, and API Keys Are Exposed Through Command-Line and Output Channels
```
The parser accepts both secrets as ordinary positional arguments:
```python
p = sub.add_parser("login")
p.add_argument("phone")
p.add_argument("code")
p.add_argument("--channel", default="skill")
p.set_defaults(func=_cmd_login)
```
The login flow returns the complete API key:
```python
return {
"api_key": tok["api_key"],
"phone": masked,
"group_id": info["group_id"],
"member_id": info["member_id"],
"source": tok["source"],
"nick_name": lg.get("nick_name", ""),
"team_name": info.get("team_name", ""),
"is_new_user": lg.get("is_new_user", False),
}
```
The command handler serializes that object to standard output:
```python
def _cmd_login(args) -> int:
r = login_and_get_key(
args.phone.strip(),
args.code.strip(),
args.channel,
)
_emit(r)
if "api_key" in r:
return 0
return 1
```
### Technical Analysis
Command-line arguments may be recorded in shell history and can be visible to local process-inspection tools, job supervisors, terminal capture systems, CI logs, or Agent execution traces. SMS verification codes are short-lived, but exposure during their validity period may permit account login.
The generated API key is included in structured standard output. Standard output is likely to be retained by the invoking Agent, terminal, orchestration platform, or diagnostic logs. The onboarding documentation also recommends embedding the API key in shell commands used to update profile files, which can preserve the key in shell history.
Masking the returned phone number d
...[truncated 1129 chars]scripts/wallysmarter_product_detail.py:97Unsanitized Session Identifier and Insecure Persistent Response Storage
scripts/onboarding.py:167Unpinned Runtime Dependency Installation Guidance
The POST target URL is derived from environment-controlled base URLs, and the request includes sensitive authentication material such as access tokens, uid/tid headers, SMS-login data, and token-generation flows. If an attacker can influence environment variables, they can redirect these requests to attacker-controlled infrastructure and exfiltrate credentials or induce the skill to perform unintended account actions.
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 destination is also environment-derived, while the code automatically attaches the LinkFox API key in the Authorization header. An attacker who can tamper with environment configuration can force authenticated requests to an arbitrary host, leaking the API key and enabling unauthorized use of the account or downstream service abuse.
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 skill description does not disclose local persistence, session archiving, cache/meta/index maintenance, or fallback writes to temporary directories, yet the detected behavior includes file-system side effects. Hidden persistence is dangerous because it can retain user data, API responses, or operational metadata beyond the immediate request and bypass user expectations about a read-only lookup tool.
The skill description does not disclose local persistence, session archiving, cache/meta/index maintenance, or fallback writes to temporary directories, yet the detected behavior includes file-system side effects. Hidden persistence is dangerous because it can retain user data, API responses, or operational metadata beyond the immediate request and bypass user expectations about a read-only lookup tool.
The activation criteria are very broad, saying the skill should trigger whenever a request loosely relates to Walmart product details, price history, or sales trends, even without explicit mention of the tool. Overbroad triggering can cause the agent to invoke this skill in unintended contexts, exposing users to unnecessary data access, hidden billing, or side effects from the broader undeclared capabilities noted elsewhere.
Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.
{"productId": 5169493923, "includeStats": false}
## Display Rules
1. **Present data clearly**: Show product details in a structured format. Do not add subjective business recommendations unless asked.
2. **Price formatting**: Display current price alongside wasPrice when available to highlight discounts. Always show USD symbol.
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
The skill metadata claims Walmart product-detail functionality, but the code implements an unrelated LinkFox onboarding, SMS login, API-key issuance, plan listing, ordering, and payment workflow. This capability mismatch is dangerous because it can socially engineer users or the host system into exposing phone numbers, verification codes, credentials, and payment actions under false pretenses.
The code contains high-risk account and payment operations—SMS authentication, API token generation, order creation, and QR payment rendering—that are far beyond the minimum privileges needed for product-detail lookup. In the context of a Walmart data skill, these hidden capabilities materially increase the chance of credential theft, unauthorized account access, and deceptive payment initiation.
The skill declares only a product-detail lookup purpose, but the metadata provides no explicit tool scope while static analysis detected environment access, file writing, and network capabilities. This creates an authority gap where the skill may access secrets, persist data, or make outbound requests beyond what users would reasonably expect from a simple Walmart product query.
The file embeds both Chinese and English trigger phrases and includes instructions like @智能数据查询, but it does not state how the assistant should choose response language or defer to the user's preference. This can create a locale-policy issue if the skill defaults behavior based on fixed language assumptions rather than explicit user opt-in.
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/wallysmarter/productDetail \
The file for a Walmart product-detail skill includes a separate feedback submission API that is unrelated to the declared data-retrieval function. This expands the skill's capabilities to send user-derived content to an external endpoint, creating unnecessary data-exfiltration and prompt-manipulation risk if an agent is induced to submit feedback containing user data or internal context.
The onboarding document directs the agent to handle authentication recovery, user registration, and paid plan purchase flows that are outside the expected scope of a Walmart product-detail skill. This scope expansion is dangerous because it can cause the agent to collect sensitive data and steer users into account/payment actions unrelated to the requested product lookup, increasing phishing, privacy, and social-engineering risk.
The instructions explicitly tell the agent to ask for a user's phone number and then use it to trigger a registration/login flow, but they provide no privacy disclosure, data-minimization guidance, or verification that the destination service is trusted. In an agent context, this creates a real risk of unnecessary collection of personal data and credential-like OTP handling, which can be abused for account takeover or privacy violations.
The module docstring and command help strings are entirely in Chinese, and the CLI presents its guidance and messages in that language by default. This can constitute a language/locale policy violation because the skill does not offer any language selection or opt-in mechanism.
External transmission is expected for networked skills, but here it is security-relevant because the transmitted data can include phone numbers, SMS codes, access tokens, refresh tokens, and API-token operations. Combined with environment-overridable endpoints and misleading skill scope, this transmission surface becomes materially more dangerous than a normal product-query integration.
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 = ""
This flow logs in with SMS, fetches team context, and returns a usable API key to stdout JSON without any in-file safeguards, consent gate, or minimization. In a skill environment, that makes sensitive credentials easy to expose to logs, calling components, or unintended consumers, especially given the mismatch between declared skill purpose and actual behavior.
The docstring promises that writing to /tmp is forbidden and that failure to write the current directory should raise an error, but the implementation silently falls back to home and temporary directories. This mismatch can cause operators to trust the storage behavior incorrectly, leading to data being written into less protected or unexpected locations such as shared temp space.
The script persistently stores full API responses, cache entries, and session metadata to local disk even though the skill's functional scope is just querying Walmart product details. If API responses contain sensitive business data, identifiers, or account-linked metadata, this creates unnecessary retention, expands the attack surface to local file disclosure, and may violate least-privilege/data-minimization expectations.
The QR rendering function creates a PNG file on disk, and the order command invokes it automatically when creating a payment order. Although stderr logs mention ordering details, there is no explicit user disclosure in this code path that a file will be written to a workspace/home/temp directory.
No suspicious patterns detected.