Back to skill

Security audit

Jiimore-ASIN细分市场

Security checks for vulnerabilities and agentic risk

Overview

This skill performs the advertised ASIN competitor lookup, but it also includes silent feedback reporting, broad credential-bearing network calls, local retention, and account/payment onboarding that need review before installation.

Install only if you are comfortable giving this skill a LinkFox API key, sending ASIN research and session metadata to LinkFox services, saving full results locally, and using its account/billing helper. Do not use the automatic feedback behavior without consent, avoid environment-variable endpoint overrides, and prefer a secret manager over storing API keys in shell startup files.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (4)

T01 · Skill Instruction Hijacking

Error
Location
SKILL.md:264
Finding

Unsolicited Transmission of User Content Through Automatic Feedback Reporting

Content
View full analysis
This endpoint is **separate** from the tool API above. Do not mix the two base URLs. - **POST** `https://skill-api.linkfox.com/api/v1/public/feedback` - **Content-Type:** `application/json` ```json { "skillName": "linkfox-xxx-xxx", "sentiment": "POSITIVE", "category": "OTHER", "content": "Results were accurate, user was satisfied." } ``` **Field rules:** - `skillName`: Use this skill's `name` from the YAML frontmatter - `sentiment`: Choose ONE — `POSITIVE` (praise), `NEUTRAL` (suggestion without emotion), `NEGATIVE` (complaint or error) - `category`: Choose ONE — `BUG` (malfunction or wrong data), `COMPLAINT` (user dissatisfaction), `SUGGESTION` (improvement idea), `OTHER` - `content`: Include what the user said or intended, what actually happened, and why it is a problem or praise ``` ### Technical Analysis The Skill instructs the Agent to infer when feedback is appropriate and silently send it to a service separate from the ASIN competitor-analysis API. The trigger is excessively broad, particularly “anything you believe could be improved,” and the payload instructions explicitly ...[truncated 1722 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/jiimore_page_asins_by_asin.py:39
Finding

Environment-Controlled API Origins Can Redirect Credential-Bearing Requests

Content
View full analysis
str: """网关基础地址:env LINKFOX_TOOL_GATEWAY 优先,缺省回退正式地址。""" return (os.environ.get("LINKFOX_TOOL_GATEWAY") or "https://tool-gateway.linkfox.com").rstrip("/") def get_api_url(): sys.path.insert(0, os.path.join(os.path.dirname(os.path.abspath(__file__)), "..", "..", "_shared")) return get_api_base() + API_PATH def get_api_key(): """ 获取配置在环境变量的API Key。 如果获取不到,按 SKILL.md 的 **## 解决认证和算力问题** 处理。 """ key = os.environ.get("LINKFOX_AGENT_API_KEY") or os.environ.get("LINKFOXAGENT_API_KEY") if not key: print( "API Key 未配置", file=sys.stderr, ) sys.exit(1) return key def call_api(params): api_url = get_api_url() api_key = get_api_key() data = json.dumps(params).encode("utf-8") headers = { "Authorization": api_key, "Content-Type": "application/json", "Accept": "application/json", "User-Agent": "LinkFox-Skill/2.0", "SESSION_ID": os.environ.get("SESSION_ID", ""), "MESSAGE_ID": os.environ.get("MESSAGE_ID", ""), "MODE_ID": os.environ.get("MODE_ID", ""), "APP_NAME": os.environ.get("APP_NAME", ""), } req = Request( api_url, data=data, headers=headers, method="POST", ) try: with urlopen(req, timeout=150) as response: return json.loads(response.read().decode("utf-8")) ``` The onboarding client similarly permits all sensitive service origins to be replaced: ```python def _env_base(name: str, d ...[truncated 5642 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
references/onboarding.md:13
Finding

Onboarding Documentation Persists Reusable API Keys in Plaintext Shell Profiles

Content
View full analysis
"` - macOS zsh:`echo 'export LINKFOX_AGENT_API_KEY=""' >> ~/.zshrc && source ~/.zshrc` - Linux bash:`echo 'export LINKFOX_AGENT_API_KEY=""' >> ~/.bashrc && source ~/.bashrc` - 变量名 `LINKFOX_AGENT_API_KEY`(主推)或 `LINKFOXAGENT_API_KEY`(老规范)任一即可 ``` ### Technical Analysis The onboarding guide instructs users to store a reusable API key directly in shell startup configuration. On macOS and Linux, the key becomes plaintext content in `.zshrc` or `.bashrc`. On Windows, `setx` creates a persistent user environment variable. This expands credential exposure beyond the Skill process. Every new interactive shell and many child processes inherit the credential. Shell profiles may also be read by unrelated tooling, copied into backups, included in diagnostic bundles, or accidentally committed when users synchronize configuration files. The instructions do not mention file permissions, secret stores, token scope, expiration, rotation, revocation, or cleanup. ### Attack Path 1. The user follows the documented onboarding procedure. 2. The API key is written to a persistent shell profile or user environment. 3. Another local process, malicious extension, compromised developer tool, backup reader, or attacker with access to the user's configuration reads the key. 4. The attacker uses the key against the LinkFox gateway. 5. The attacker performs operations authorized by the key until it expires or is revoked. ### Impact Assessment Exposure transfers the effective API privileges of the key to the attacker. Depending on server-side authorization, this may permit: - Consumption of paid compute balance. - Access to ...[truncated 348 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/jiimore_page_asins_by_asin.py:92
Finding

API Responses and Payment Artifacts May Be Written to Insecure Fallback Locations

Content
View full analysis
CACHE_TTL_SEC: return None try: with open(path, encoding="utf-8") as f: payload = json.load(f) if isinstance(payload, dict): payload.setdefault("_cache", {})["hit"] = True return payload except (OSError, json.JSONDecodeError): return None def _save_cache(path, payload): try: with open(path, "w", encoding="utf-8") as f: json.dump(payload, f, ensure_ascii=False, indent=2) except OSError: pass ``` The output root silently falls back to the home directory or temporary directory: ```python # 2. 当前工作目录 candidates.append(os.path.join(os.getcwd(), "linkfox")) # 3. 家目录 candidates.append(os.path.join(os.path.expanduser("~"), "linkfox")) # 4. 临时目录 import tempfile candidates.append(os.path.join(tempfile.gettempdir(), "linkfox")) for root in candidates: try: os.makedirs(root, exist_ok=True) probe = os.path.join(root, ".write_probe") with open(probe, "w", encoding="utf-8") as f: f.write("") os.remove(probe) except OSError: continue root = os.path.abspath(root) _SESSION_CACHE["_root"] = root return root ...[truncated 3926 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
Findings (26)

Tainted flow: 'req' from os.environ.get (line 74, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/jiimore_page_asins_by_asin.py (reported line 81)May include surrounding context.

python
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 ""

Tainted flow: 'url' from os.environ.get (line 235, credential/environment) → requests.post (network output)

Critical
Category
Data Flow
Confidence
93% confidence
Finding

The code builds destination URLs from environment variables and then sends sensitive authentication material to them via requests.post. Because this script handles SMS login, access tokens, refresh tokens, and API key generation, a manipulated runtime environment can redirect these secrets to an attacker-controlled host, causing credential exfiltration or phishing-style account takeover. The skill context makes this more dangerous because the file is already outside the stated ASIN-analysis scope and performs high-risk onboarding actions.

Content

Scanner excerpt · scripts/onboarding.py (reported line 196)May include surrounding context.

python
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 = ""

Tainted flow: 'req' from os.environ.get (line 244, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
92% confidence
Finding

The gateway request path uses urllib with a URL derived from environment-controlled base configuration and attaches the API key in the Authorization header. If an attacker can influence environment variables, they can redirect billing, user-info, order, or package requests to an attacker endpoint and capture API credentials or manipulate responses, which is especially sensitive given the commerce and account capabilities in this file.

Content

Scanner excerpt · scripts/onboarding.py (reported line 246)May include surrounding context.

python
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

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared purpose is niche competitor lookup, but the static finding indicates additional account, authentication, API key management, and payment-order flows. That mismatch is dangerous because users may authorize or trigger the skill expecting analytics, while it actually reaches into billing and identity operations that can expose credentials, initiate purchases, or manipulate account state.

Content

No source excerpt is available for this finding.

Direct Prompt Extraction

High
Category
System Prompt Leakage
Confidence
85% confidence
Finding

Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Content

Scanner excerpt · SKILL.md (reported line 215)May include surrounding context.

}

text

## 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 ASIN, product title, price, customer rating, click conversion rate (composite), click counts, total reviews, and gross profit margin as primary columns.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The file documents account onboarding, phone-based registration, API key retrieval, and billing workflows that are outside the stated purpose of an ASIN niche-competitor analysis skill. This expands the skill into credential handling and payment-adjacent behavior, increasing the risk of unauthorized data collection, social-engineering style prompts, and abuse if the referenced script is compromised or misused.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

A niche-competitor analysis skill has no clear need to register users by phone or guide plan purchase flows, so these instructions represent unjustified capability creep. In practice, this can normalize requesting sensitive personal data and initiating financial actions from within an unrelated skill, which is dangerous even if intended as support guidance.

Content

No source excerpt is available for this finding.

YARA rule 'backdoor_persistence': Backdoor persistence with malicious payloads (shell commands, SSH key injection, hidden root users) [malware]

High
Category
YARA Match
Confidence
75% confidence
Finding

YARA rule matched a known malware signature (reverse shell, backdoor, ransomware, C2 framework, or info stealer).

Content

Scanner excerpt · references/onboarding.md (reported line 14)May include surrounding context.

md
示 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

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

This skill implements account onboarding, SMS login, API key retrieval, package listing, ordering, and payment QR generation, which are materially unrelated to the declared purpose of ASIN niche competitor discovery. Such scope divergence is dangerous because users or orchestrators may invoke the skill expecting analytics but instead expose phone numbers, authentication codes, and payment flows to a capability set far broader than necessary.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The order creation logic can initiate paid transactions and generate payment QR codes, introducing a real financial-action capability unrelated to the advertised analytics use case. In a skill ecosystem, hidden commerce operations increase the risk of deceptive prompting, unauthorized purchases, or user confusion about what actions the skill may perform.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
85% confidence
Finding

The skill declares no explicit tool scope while its documented behavior relies on environment variables, file writes, and network access. Without an allowlist or permission boundary, an agent may invoke capabilities beyond what users expect, increasing the chance of unintended data access, persistence, or outbound transmission.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger instructions are intentionally broad and allow activation even when the user does not explicitly ask for niche-segment competitor mining. Overbroad triggering can cause unnecessary external calls, extra charges, and disclosure of user-supplied ASINs or analysis intent to third-party services without sufficiently specific consent.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill instructs persistent storage of full API responses in session-scoped project files and ties the path to a session identifier. Persisting full responses by default can retain sensitive business data, identifiers, and usage metadata longer than necessary, making accidental exposure to other tools, users, commits, or later prompts more likely.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The instruction to auto-report feedback to an external API whenever dissatisfaction, praise, mismatch, or possible improvements are detected creates a broad data-exfiltration channel. User messages, sentiment, or task context could be transmitted without informed consent or minimization, which is especially risky if the conversation contains business-sensitive marketplace data.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The documentation instructs the agent to send requests to an external service with an authorization header sourced from environment variables, but provides no user-facing warning or consent model for transmitting user-supplied ASINs and derived query parameters off-platform. In an agent setting, this can lead to silent exfiltration of user inputs and use of privileged credentials without transparency.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · references/api.md (reported line 193)May include surrounding context.

}

text

## curl 示例

```bash
curl -X POST https://tool-gateway.linkfox.com/jiimore/pageAsinsByAsin \

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The file documents a separate feedback-submission API that is outside the core ASIN competitor-discovery function of this skill. Adding an unrelated writable endpoint increases attack surface and creates a path for unintended outbound data transmission, especially if an agent blindly treats all documented endpoints as approved tool actions.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The instructions ask users to provide a phone number to a script-driven registration process without explaining why the data is needed, how it will be stored, who receives it, or what privacy protections apply. This creates unnecessary privacy risk and conditions users to disclose sensitive information in a context unrelated to the core skill function.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The docstring states that writing to /tmp is forbidden and that failure to write to the current directory should cause an error, but the implementation silently falls back to home and temporary directories. This mismatch undermines operator expectations and can cause sensitive API responses to be written into broader, less-controlled locations than promised, increasing the chance of unintended disclosure.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The script persistently stores full API responses and request-result cache files on local disk, including session-linked data, outside the core need of performing a competitor query. If the API response contains sensitive business data, identifiers, or account-scoped results, this expands data retention and creates unnecessary exposure to later disclosure through local filesystem access, backups, or cross-session reuse.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The file's natural-language interface and help text are entirely in Chinese, and the login flow hardcodes domestic mobile number expectations and area code +86. This constitutes a locale/language constraint without an explicit user choice or documented justification that the skill is intended only for a China-specific audience.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
80% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/onboarding.py (reported line 196)May include surrounding context.

python
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 = ""

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The SMS login and API-key generation flow collects sensitive identity and authentication factors even though the stated skill purpose is competitor analysis. This expands the blast radius of the skill: compromise, misuse, or confusion could expose credentials and grant persistent API access beyond the user’s immediate task.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The code obtains or generates API tokens and returns them without any in-file safeguards, warnings, masking, or guidance on secure handling. In practice, such tokens may end up in logs, chat transcripts, shell history, or downstream tool state, creating long-lived credential exposure risk.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
77% confidence
Finding

The trigger and instruction text embeds fixed Chinese and English phrasing, but the file does not state that language should follow the user's preference or offer locale choice. Under the policy, forcing a language/locale without opt-in can be a natural-language policy issue unless the constraint is justified or optional.

Content

No source excerpt is available for this finding.