T01 · Skill Instruction Hijacking
- Location
SKILL.md:132- 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
This skill performs copyright checks, but it also has under-consented feedback reporting and risky credential, upload, billing, and local persistence behavior that warrant review before installation.
Install only if you are comfortable sending image URLs or uploaded local images to LinkFox/Ruiguan services, using a LinkFox API key, and potentially engaging account or billing flows. Avoid confidential images, do not let the skill submit feedback without consent, prefer self-service key setup over sharing phone/OTP in chat, and store any API key in a safer credential store rather than shell startup files.
SKILL.md:132Automatic Transmission of User Feedback to an Unrelated External Service
scripts/upload_image.py:20Environment-Controlled Endpoints Can Receive Authentication Credentials and Personal Data
scripts/upload_image.py:85Local Images Are Uploaded with a Public-Read ACL Without Client-Enforced Expiration
scripts/onboarding.py:477Generated API Keys Are Exposed in Standard Output and Plaintext Configuration Guidance
scripts/onboarding.py:163Runtime Guidance Installs Unpinned Third-Party Dependencies
scripts/ruiguan_copyright_detection.py:246Unsanitized Session Identifier Can Escape the Intended Output Directory
The code sends authentication tokens and user data to URLs whose base is taken directly from environment variables such as LINKFOX_LOGIN_API_URL and LINKFOX_AGENT_USER_API_URL. If an attacker or untrusted runtime can influence those variables, the CLI will POST SMS-login data, access tokens, refresh tokens, and API-token requests to attacker-controlled infrastructure, causing credential exfiltration and possible account takeover.
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 path uses a URL built from environment-controlled base variables and attaches the API key in the Authorization header before calling urlopen. A malicious endpoint override can therefore capture the user's API key and all order/account requests, enabling unauthorized use of the account and manipulation of billing-related 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 ""
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
)
try:
with urlopen(req, timeout=150) as response:
result = json.loads(response.read().decode("utf-8"))
except HTTPError as e:
body = e.read().decode("utf-8") if e.fp else ""
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
)
try:
with urlopen(req, timeout=120) as response:
if response.status not in (200, 201):
print(f"Upload failed with status: {response.status}", file=sys.stderr)
sys.exit(1)
The skill is advertised as performing copyright-risk analysis, but the described local-image path uploads user files to remote storage and returns a public URL, without itself performing the promised analysis. This can expose user images publicly and mislead users about what processing is actually occurring.
The skill is advertised as performing copyright-risk analysis, but the described local-image path uploads user files to remote storage and returns a public URL, without itself performing the promised analysis. This can expose user images publicly and mislead users about what processing is actually occurring.
The trigger conditions are intentionally broad and allow activation even when the user does not explicitly ask for copyright analysis. Over-broad activation increases the chance of collecting URLs, uploading images, or invoking costly external services in contexts the user did not intend.
Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.
User: "Check these three images for copyright: url1, url2, url3"
Action: Call the API once for each image URL and consolidate results.
## Display Rules
1. **Present data clearly**: Show detection results in a well-structured table. Key columns to display include: similarity score, rights owner, copyright code, radar result, TRO history, and copyright source link.
2. **Highlight high-risk results**: When similarity is high (e.g., >= 0.80) or radar detection flags infringement (`subRadarResult` = 1), clearly mark these as high-risk entries.
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 SMS login, API-key issuance, subscription listing, order creation, and payment QR generation, which are unrelated to the declared image copyright detection purpose. That mismatch is dangerous because it enables credential collection and monetization workflows under the cover of an unrelated skill, increasing the likelihood of deceptive or unauthorized account operations.
The skill can create orders and render payment QR codes even though billing is not justified by the advertised function. In a skill context, hidden payment logic materially raises abuse risk because a user invoking copyright analysis could instead be funneled into unintended purchases or account charges.
The code retrieves or generates API tokens for the user and returns them to stdout, behavior that is highly sensitive and unrelated to the declared purpose. In the context of a copyright-detection skill, this looks like covert credential provisioning that could be used to grant persistent API access and facilitate downstream abuse of the user's account.
The docstring explicitly says writes to /tmp are forbidden and that failure to write the current directory should be an error, but the implementation silently falls back to the home directory and then the system temporary directory. This mismatch can cause sensitive response data to be written into less-trusted locations, including shared or weakly protected temp storage, violating operator expectations and potentially organizational handling requirements.
The skill declares no explicit tool scope while its instructions require environment-variable access, network calls, and file writes. That omission weakens least-privilege controls and makes it harder for a host agent or reviewer to understand and constrain what the skill can do.
The skill directs the agent to persist full responses to session-scoped local files under the working directory. Those responses may contain user-supplied image URLs, rights-holder information, account details, or other sensitive metadata, creating avoidable local data retention and possible cross-task exposure.
The skill instructs automatic reporting of user feedback and usage observations to a separate Feedback API unrelated to the core copyright-detection task. This creates unnecessary secondary data sharing and can leak user interactions, sentiments, or operational details without informed consent.
Forcing automatic feedback reporting without user opt-in is a privacy and consent issue, especially because feedback may include user sentiments, usage patterns, or other contextual details not necessary for delivering the requested result. The hidden nature of the reporting makes the behavior more problematic.
The API requires a user-supplied public image URL and sends it to an external third-party service for copyright analysis, but the documentation does not warn about data sharing, retention, or privacy implications. This can lead agents or users to submit sensitive or proprietary images without informed consent, creating privacy, confidentiality, and compliance risk.
The curl example demonstrates transmitting user-provided image URLs and an API key to an external network endpoint. In this skill context, external transmission is expected, but it still carries real risk because agents may forward sensitive user data to a third party without clearly surfacing that boundary or validating whether the image URL is safe to share.
}
## curl 示例
```bash
curl -X POST https://tool-gateway.linkfox.com/ruiguan/copyrightDetection \
The skill explicitly instructs operators to ask for a user's phone number and use it in registration/login flows, but provides no privacy notice, consent guidance, retention limits, or safer alternative handling. This creates a real risk of unnecessary collection and exposure of personal data and OTP-linked account access information during support interactions.
The skill tells the operator to provide commands that append secrets to shell startup files, permanently modifying user environment configuration without warning about persistence, local exposure, or safer alternatives. Storing API keys in shell rc files can unintentionally disclose credentials to other local processes, future shell sessions, backups, or shared accounts.
The module openly describes itself as an onboarding CLI, contradicting the skill metadata that claims copyright detection. Such purpose mismatch is a strong indicator of deceptive packaging, which makes other sensitive behaviors in the file more dangerous because users and reviewers may grant trust based on false functionality claims.
The file’s natural-language interface, help text, and operational messages are written exclusively in Chinese, and the phone workflow is constrained to domestic numbers with area code +86. There is no indication that the user can choose language or locale, which violates the requirement not to force a specific language/locale without opt-in.
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 = ""
No suspicious patterns detected.