Back to skill

Security audit

蓝海扫描专家

Security checks for vulnerabilities and agentic risk

Overview

This market-scanning skill is coherent overall, but it needs Review because it combines credential handling, public file uploads, broad local execution, and scheduled task changes without tight enough scoping.

Install only if you trust LinkFox with your Amazon market queries and LinkFox API key, and treat uploads and scheduled tasks as high-impact actions. Do not upload sensitive local files, avoid overriding gateway environment variables, rotate any API key printed into logs, and review scheduled tasks before enabling them.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (6)

T09 · Insecure Skill Coding Practices

Error
Location
skills/amazon-niche-radar/scripts/response_io.py:61
Finding

Unrestricted Python Script Execution Through a Generic Wrapper

Content
View full analysis
Path: p = Path(script_arg).expanduser() if not p.is_absolute(): # Resolve relative to the current working directory the agent invoked from. p = (Path.cwd() / p).resolve() else: p = p.resolve() if not p.is_file(): _err(f"--script path not found: {p}") return p ``` ```python child_env = os.environ.copy() child_env["PYTHONIOENCODING"] = "utf-8" proc = subprocess.run( [sys.executable, str(main_script), params_str], capture_output=True, text=True, encoding="utf-8", errors="replace", env=child_env, timeout=args.timeout, ) ``` ### Technical Analysis The wrapper accepts an arbitrary path through `--script`, resolves it, and verifies only that it is a file. It does not require the target to reside in the expected Skill directory and does not restrict execution to an allowlist of known entry points. The selected file is then executed by the current Python interpreter. The child process receives a complete copy of the parent environment, which can include `LINKFOX_AGENT_API_KEY`, session identifiers, workspace paths, and other credentials. This creates a local code-execution primitive when an attacker can influence the wrapper arguments or place a Python file at a path accessible to the Agent. ### Attack Path 1. An attacker causes a Python file to be written into the workspace or identifies another attacker-controlled readable path. 2. Through prompt or argument manipulation, the attacker induces the Agent to invoke `response_io.py run` with that file as `--script`. 3. `_resolve_script()` accepts the file because it performs no directory-boundary or entry-point validation. 4. `subprocess.run()` exe ...[truncated 635 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
skills/amazon-niche-radar/scripts/linkfox_paths.py:458
Finding

Server-Side Request Forgery Through Arbitrary Media Downloads

Content
View full analysis
Optional[str]: """Download URL to the session media directory and return its local path.""" from urllib.request import urlopen, Request from urllib.error import HTTPError, URLError import posixpath if not url or not isinstance(url, str): return None if not url.startswith("http://") and not url.startswith("https://"): print(f"[download_media] Unsupported URL scheme: {url[:80]}", file=sys.stderr) return None if ts is None: ts = time.time() _, session_dir = _ensure_session(ts) media_dir = os.path.join(session_dir, "media") os.makedirs(media_dir, exist_ok=True) tmp_filename = f".tmp-{_safe_slug(slug)}-{int(ts * 1_000_000)}.download" tmp_path = os.path.join(media_dir, tmp_filename) req = Request(url, headers={"User-Agent": "LinkFox-Skill/2.0"}) try: with urlopen(req, timeout=timeout) as resp: with open(tmp_path, "wb") as f: while True: chunk = resp.read(65536) if not chunk: break f.write(chunk) ``` ### Technical Analysis The function validates only that the supplied value begins with `http://` or `https://`. It does not validate the resolved IP address, hostname, port, redirect destination, or network range. Consequently, URLs targeting loopback interfaces, private networks, link-local services, or cloud instance metadata are accepted. Python's `urlopen()` may also follow redirects, allowing a seemingly public URL to redirect to a prohibited internal destination. The fetched response is wri ...[truncated 1092 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Error
Location
skills/amazon-niche-radar/scripts/linkfox_paths.py:331
Finding

Arbitrary Local Files Can Be Uploaded to Publicly Accessible Object Storage

Content
View full analysis
dict: ... file_size = os.path.getsize(local_path) ... auth = oss2.StsAuth( voucher["accessKeyId"], voucher["accessKeySecret"], voucher["securityToken"], ) bucket = oss2.Bucket(auth, endpoint_url, bucket_name) with open(local_path, "rb") as f: bucket.put_object(object_key, f) url = f"https://{bucket_name}.{endpoint_host}/{object_key}" _, session_dir = _ensure_session(ts) _update_meta(session_dir, skill=slug, kind="deliverable", file_rel=url, ts=ts) return { "url": url, "path": object_key, "name": os.path.basename(local_path), "size": file_size, "ext": ext, } ``` ### Technical Analysis The helper accepts any local path readable by the Agent process. It does not constrain the resolved path to a deliverables directory, verify that the file was generated during the current task, reject symlinks, or deny known sensitive locations. After reading the file, it uploads the content to object storage and constructs a directly accessible HTTPS URL. Registering that URL as a deliverable makes accidental disclosure more likely. File-extension and size checks returned by the remote voucher service do not establish whether the caller is authorized to disclose the selected local file. ...[truncated 1098 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
skills/linkfox-amazon-search/scripts/onboarding.py:484
Finding

Generated LinkFox API Keys Are Emitted in Plaintext

Content
View full analysis
int: r = login_and_get_key(args.phone.strip(), args.code.strip(), args.channel) _emit(r) if "api_key" in r: print(f"{TAG} Successfully obtained API key", file=sys.stderr) return 0 return 1 ``` ### Technical Analysis After SMS authentication, the onboarding flow retrieves or generates an API token and includes the full token in a dictionary. `_cmd_login()` serializes the entire dictionary to standard output. Standard output is commonly captured by Agent runtimes, shell histories, orchestration logs, transcripts, test harnesses, or response persistence utilities. The code masks the phone number but does not mask the more security-sensitive API key. ### Attack Path 1. A user completes SMS onboarding through `onboarding.py login`. 2. The script retrieves or generates the user's LinkFox API key. 3. The full key is placed in the return object. 4. `_emit()` prints the complete object to standard output. 5. An Agent runtime or wrapper capt ...[truncated 544 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
skills/amazon-niche-radar/scripts/linkfox_paths.py:354
Finding

Unpinned Runtime Dependency Installation Instructions

Content
View full analysis
Remediation
View remediation

T01 · Skill Instruction Hijacking

Note
Location
SKILL.md:39
Finding

Skill Instructions Mandate Unrelated Content in Every Agent Response

Content
View full analysis
` with three actionable follow-up suggestions tailored to the current task. ``` The original instruction is marked as a mandatory rule whose violation is considered failure. ### Technical Analysis The Skill requires the Agent to append a proprietary LinkFox-specific element to every response, regardless of the user's requested format or whether suggestions are relevant. This is broader than the core Amazon market-analysis functionality. Unlike direct safety-constraint bypass instructions, this rule does not request dangerous behavior. However, it alters the Agent's output policy whenever the Skill is loaded and can conflict with strict JSON, XML, API, or concise-response requirements. ### Attack Path 1. The Agent loads the Skill instructions. 2. The mandatory closing rule becomes part of the active instruction context. 3. A user requests output in a strict schema or requests no additional commentary. 4. The Skill directs the Agent to append the proprietary block anyway. 5. The caller receives structurally invalid or unwanted output. ### Impact Assessment The issue affects response integrity rather than host privileges. It can break machine-readable outputs, violate caller formatting expectations, add unsolicited promotional or workflow content, and reduce user control over the response. It does not independently provide code execution, credential access, or system persistence. ]]>
Remediation
View remediation
Vulnerability Patterns
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (485)

Tainted flow: 'req' from os.environ.get (line 274, 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 · skills/amazon-niche-radar/scripts/linkfox_paths.py (reported line 504)May include surrounding context.

python
req = Request(url, headers={"User-Agent": "LinkFox-Skill/2.0"})
    try:
        with urlopen(req, timeout=timeout) as resp:
            # 从 Content-Type 进一步修正扩展名
            if guessed_ext == "bin":
                ct = resp.headers.get("Content-Type", "")

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

Critical
Category
Data Flow
Confidence
93% confidence
Finding

The POST target is constructed from environment-controlled base URLs, and the same request path carries sensitive materials such as phone numbers, SMS codes, access tokens, refresh tokens, generated API keys, and billing-related metadata. If an attacker can influence environment variables, the CLI can be redirected to attacker-controlled infrastructure, causing credential exfiltration and phishing/payment abuse via SSRF-style endpoint substitution.

Content

Scanner excerpt · skills/linkfox-1688-search-by-image/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 URL is also derived from environment-controlled configuration and is used with an Authorization header containing the LinkFox API key. An attacker who can set LINKFOX_AGENT_API_URL or related variables can redirect authenticated order, account, and package requests to a malicious endpoint and capture the API key or manipulate responses to drive unsafe purchase flows.

Content

Scanner excerpt · skills/linkfox-1688-search-by-image/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

Tainted flow: 'req' from os.environ.get (line 57, 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 · skills/linkfox-1688-search-by-image/scripts/upload_image.py (reported line 73)May include surrounding context.

python
)

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

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

Critical
Category
Data Flow
Confidence
90% confidence
Finding

The upload target comes from a presigned URL returned by the gateway, and the script uploads arbitrary local file contents to that external URL with public-read ACL. If the gateway base URL is replaced or the gateway is compromised, this creates a file exfiltration path from the local system to attacker-controlled storage.

Content

Scanner excerpt · skills/linkfox-1688-search-by-image/scripts/upload_image.py (reported line 106)May include surrounding context.

python
)

    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)

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

Critical
Category
Data Flow
Confidence
95% confidence
Finding

The request destination and multiple request headers are influenced by environment variables, including LINKFOX_TOOL_GATEWAY and session-related metadata, and are sent via urlopen without validation. If an attacker can control the runtime environment, they can redirect requests to an arbitrary host and exfiltrate the API key and session metadata, creating a server-side request forgery and credential leakage risk.

Content

Scanner excerpt · skills/linkfox-aba-intelligent-query/scripts/aba_query.py (reported line 80)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
96% confidence
Finding

The destination URL for requests.post is derived from environment-controlled base URLs, and the request carries sensitive data including SMS login credentials, access tokens, refresh tokens, and API-token management payloads. If an attacker can influence environment variables, they can redirect these requests to an attacker-controlled endpoint and capture authentication material, turning this into credential exfiltration/SSRF-style behavior.

Content

Scanner excerpt · skills/linkfox-aba-intelligent-query/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
95% confidence
Finding

The urllib gateway request target is built from environment-controlled base URLs and includes the Authorization header populated from LINKFOX_AGENT_API_KEY. An attacker who can set the environment can redirect the gateway call to an arbitrary server and steal the API key or force requests to internal/untrusted services.

Content

Scanner excerpt · skills/linkfox-aba-intelligent-query/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

Tainted flow: 'req' from os.environ.get (line 335, 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 · skills/linkfox-aigc-textgen/scripts/aigc_textgen.py (reported line 237)May include surrounding context.

python
req = _lf_Request(url, headers={"User-Agent": "LinkFox-Skill/2.0"})
    try:
        with _lf_urlopen(req, timeout=timeout) as resp:
            if guessed_ext == "bin":
                ct = resp.headers.get("Content-Type", "")
                if "mp4" in ct:

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

Critical
Category
Data Flow
Confidence
97% confidence
Finding

The script sends multiple environment-derived values, including an API key in the Authorization header and session/app metadata, to a URL whose base is controlled by the LINKFOX_TOOL_GATEWAY environment variable. If an attacker can alter that environment variable or execution environment, the script will transmit credentials and metadata to an attacker-controlled endpoint, creating a realistic secret-exfiltration path.

Content

Scanner excerpt · skills/linkfox-aigc-textgen/scripts/aigc_textgen.py (reported line 337)May include surrounding context.

python
}
    req = Request(url, data=data, headers=headers, method="POST")
    try:
        with urlopen(req, timeout=HTTP_TIMEOUT) 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
92% confidence
Finding

The URL used by requests.post is derived from environment-controlled base URLs, and this same helper is used on authenticated login and token-related flows. If an attacker can influence environment variables, they can redirect SMS login, access tokens, refresh tokens, user identifiers, and generated API keys to an attacker-controlled endpoint, causing credential exfiltration. The mismatch between the skill’s market-scanning description and this onboarding/login behavior increases suspicion because users would not reasonably expect credential-handling network activity here.

Content

Scanner excerpt · skills/linkfox-aigc-textgen/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
91% confidence
Finding

The urllib gateway request sends the API key in an Authorization header to a URL built from environment-controlled configuration. If the base URL is overridden, the script can disclose the user’s API key and account/order data to an attacker-controlled service, and it may also enable deceptive purchase/order interactions. This is especially risky because the code performs billing-related actions that are unrelated to the advertised skill purpose.

Content

Scanner excerpt · skills/linkfox-aigc-textgen/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

Tainted flow: 'req' from os.environ.get (line 76, 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 · skills/linkfox-amazon-category-lookup/scripts/amazon_category_lookup.py (reported line 78)May include surrounding context.

python
}
    req = Request(api_url, data=data, headers=headers, method="POST")
    try:
        with urlopen(req, timeout=120) 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
94% confidence
Finding

The script builds request destinations from environment variables such as LINKFOX_LOGIN_API_URL and LINKFOX_AGENT_USER_API_URL, then sends sensitive data including phone numbers, SMS codes, access tokens, refresh tokens, and generated API keys to those endpoints. If an attacker can influence the environment, they can redirect these authentication flows to a malicious host and exfiltrate credentials; the skill context makes this worse because the file is explicitly an onboarding/login tool handling high-value secrets.

Content

Scanner excerpt · skills/linkfox-amazon-opportunity-report-by-keyword/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
95% confidence
Finding

The gateway URL is also derived from environment variables and used by urllib.request.urlopen with the Authorization header populated from LINKFOX_AGENT_API_KEY. An attacker who controls the runtime environment can redirect API-key-bearing requests for user info, packages, and orders to an attacker-controlled server, causing credential leakage and unauthorized account actions.

Content

Scanner excerpt · skills/linkfox-amazon-opportunity-report-by-keyword/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

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

Critical
Category
Data Flow
Confidence
94% confidence
Finding

The code copies ambient environment variables such as SESSION_ID, MESSAGE_ID, MODE_ID, and APP_NAME directly into outbound HTTP headers and sends them to a remote API via urlopen. This creates a real exfiltration path for runtime metadata and potentially sensitive identifiers unrelated to the script’s stated Keepa batch-fetch purpose, especially because these values are not validated, minimized, or user-consented.

Content

Scanner excerpt · skills/linkfox-amazon-search-competition/scripts/batch_keepa_fetch.py (reported line 153)May include surrounding context.

python
}
    req = Request(api_url, data=data, headers=headers, method="POST")
    try:
        with urlopen(req, timeout=120) 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: 'req' from os.environ.get (line 274, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
93% confidence
Finding

download_media() performs outbound requests to arbitrary caller-supplied URLs with only a basic http/https scheme check. This creates a classic SSRF primitive that can reach internal services, cloud metadata endpoints, or other network-restricted resources, then persist the retrieved content into the session workspace.

Content

Scanner excerpt · skills/linkfox-amazon-search-competition/scripts/linkfox_paths.py (reported line 504)May include surrounding context.

python
req = Request(url, headers={"User-Agent": "LinkFox-Skill/2.0"})
    try:
        with urlopen(req, timeout=timeout) as resp:
            # 从 Content-Type 进一步修正扩展名
            if guessed_ext == "bin":
                ct = resp.headers.get("Content-Type", "")

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

Critical
Category
Data Flow
Confidence
96% confidence
Finding

The request sent via urlopen includes multiple HTTP headers populated directly from environment variables, and the destination base URL is also environment-controlled via LINKFOX_TOOL_GATEWAY. In an agent/runtime setting where environment variables may be influenced by untrusted configuration or upstream context, this can cause credential-bearing requests to be redirected to an attacker-controlled endpoint, leaking the API key and session metadata and enabling SSRF-like outbound access.

Content

Scanner excerpt · skills/linkfox-amazon-search/scripts/amazon_search.py (reported line 80)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 script builds request destinations from environment-controlled base URLs and then sends highly sensitive data to them, including phone numbers, SMS codes, access tokens, refresh tokens, generated API keys, and authorization headers. If an attacker can influence environment variables in the agent/runtime, they can redirect these requests to an attacker-controlled server and exfiltrate credentials or payment/session data; the skill context makes this more dangerous because this file is explicitly an onboarding/login flow handling secrets rather than ordinary market-scan traffic.

Content

Scanner excerpt · skills/linkfox-amazon-search/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
93% confidence
Finding

The gateway request path uses an environment-derived base URL and attaches the API key in the Authorization header before calling urlopen. An attacker who can set LINKFOX_AGENT_API_URL or fallback variables can redirect paid-plan, account, and order queries to an arbitrary host and harvest API credentials or manipulate onboarding/payment flows; this is especially risky because the file is unrelated to the advertised market-scanning purpose and concentrates account and billing actions.

Content

Scanner excerpt · skills/linkfox-amazon-search/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

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

Critical
Category
Data Flow
Confidence
90% confidence
Finding

The request sent via urlopen includes environment-derived values in headers, and the destination base URL is also overridable by the LINKFOX_TOOL_GATEWAY environment variable. This means sensitive identifiers and the API key can be transmitted to an attacker-controlled endpoint if the runtime environment is tampered with, creating a realistic exfiltration risk rather than a purely theoretical network call.

Content

Scanner excerpt · skills/linkfox-dld-product-search/scripts/dld_product_search.py (reported line 80)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 script builds request destinations from environment variables and then sends sensitive authentication material to those URLs via requests.post. Because this file handles SMS login, access tokens, refresh tokens, and API key generation, a malicious or tampered environment can redirect traffic to an attacker-controlled endpoint and exfiltrate credentials or payment-related data.

Content

Scanner excerpt · skills/linkfox-dld-product-search/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
91% confidence
Finding

The gateway request uses a URL derived from environment variables and includes the API key in the Authorization header before calling urlopen. If an attacker can influence the runtime environment, they can redirect these authenticated requests to an external server and capture the API key, user/account metadata, and order operations.

Content

Scanner excerpt · skills/linkfox-dld-product-search/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

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

Critical
Category
Data Flow
Confidence
95% confidence
Finding

download_media performs outbound requests to an arbitrary caller-supplied URL with only a basic http/https scheme check. This creates an SSRF primitive that can reach internal services or attacker-controlled endpoints and also pull untrusted content into local storage, which is unrelated to a market-scanning utility and increases risk in an agent environment.

Content

Scanner excerpt · skills/linkfox-file-upload/scripts/linkfox_paths.py (reported line 524)May include surrounding context.

python
req = Request(url, headers={"User-Agent": "LinkFox-Skill/2.0"})
    try:
        with urlopen(req, timeout=timeout) as resp:
            # 从 Content-Type 进一步修正扩展名
            if guessed_ext == "bin":
                ct = resp.headers.get("Content-Type", "")

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

Critical
Category
Data Flow
Confidence
97% confidence
Finding

The request URL is derived from the LINKFOX_TOOL_GATEWAY environment variable and then used directly in urlopen, while sensitive headers including the API key and session metadata are attached to the request. In an agent/runtime setting where environment variables may be influenced by deployment config or a malicious wrapper, this can redirect authenticated traffic to an attacker-controlled endpoint and exfiltrate credentials and user/task metadata.

Content

Scanner excerpt · skills/linkfox-google-trend-get-trend-by-keys/scripts/google_trends_keyword.py (reported line 80)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 ""