Back to skill

Security audit

跨境电商带货口播专家

Security checks for vulnerabilities and agentic risk

Overview

This is a disclosed LinkFox product-video workflow, but it needs review because it handles API keys, account/payment flows, local file writes, remote downloads, and hard-coded demographic casting rules with weak safeguards.

Install only if you are comfortable sending product images, prompts, account identifiers, and payment/onboarding data to LinkFox services. Do not use custom LINKFOX_* endpoint environment variables unless you fully trust the destination, avoid storing API keys in shell startup files, review any plan/order/payment step before proceeding, and remove or override the demographic casting rules for compliant creative work.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • 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
Findings (6)

T09 · Insecure Skill Coding Practices

Error
Location
skills/linkfox-aigc-textgen/scripts/aigc_textgen.py:75
Finding

Credential-Bearing API Requests Can Be Redirected to Arbitrary Hosts

Content
View full analysis
str: return _env_base( "LINKFOX_AGENT_API_URL", "https://tool-gateway.linkfox.com", "LINKFOX_TOOL_GATEWAY", ) def _login_base() -> str: return _env_base( "LINKFOX_LOGIN_API_URL", "https://api.linkfox.com", ...[truncated 2768 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
skills/linkfox-aigc-videogen/references/onboarding.md:11
Finding

API Keys Are Persisted in Plaintext Shell Startup Files

Content
View full analysis
" ``` ```bash echo 'export LINKFOX_AGENT_API_KEY=""' >> ~/.zshrc source ~/.zshrc ``` ```bash echo 'export LINKFOX_AGENT_API_KEY=""' >> ~/.bashrc source ~/.bashrc ``` ### Technical Analysis The onboarding documentation instructs users to permanently store a bearer API key in shell initialization files or the user's persistent environment. Shell startup files are not purpose-built secret stores. They may be copied into backups, diagnostic archives, configuration repositories, remote-support bundles, or home-directory synchronization systems. They are also readable by other processes running under the same operating-system account. Appending the export command repeatedly can leave multiple obsolete credentials in the file. Revoking or replacing a key does not automatically remove previous values. The generated API key is also returned through the onboarding command's JSON output, which increases the number of channels through which it may be captured. ### Attack Path 1. A user follows the documented onboarding procedure. 2. The complete bearer token is written to `.bashrc`, `.zshrc`, or the persistent Windows user environment. 3. A same-user process, backup utility, support tool, shell configuration repository, or accidental file disclosure obtains the stored value. 4. The exposed key is submitted to LinkFox APIs. 5. The attacker consumes credits or performs actions authorized to that API key. ### Impact Assessment The issue can expose a long-lived LinkFox API credential. The resulting scope depends on the key's server-side permissions and may i ...[truncated 257 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
skills/linkfox-aigc-videogen/scripts/aigc_videogen.py:171
Finding

Server-Controlled Result URLs Permit Unrestricted Network Requests

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
skills/linkfox-aigc-textgen/scripts/aigc_textgen.py:82
Finding

Externally Controlled Session Identifiers Can Escape the Intended Storage Directory

Content
View full analysis
str: ts = time.time() sid = ( os.environ.get("SESSION_ID") or "" ).strip() or ( time.strftime("%H%M%S", time.localtime(ts)) + "-" + secrets.token_hex(3) ) path = os.path.join( _linkfox_root(), time.strftime("%Y-%m-%d", time.localtime(ts)), sid, ) os.makedirs(path, exist_ok=True) return path ``` ### Technical Analysis `SESSION_ID` is treated as a trusted path component without validation. Absolute paths, directory separators, parent-directory comp ...[truncated 1579 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
skills/linkfox-aigc-videogen/scripts/aigc_videogen.py:201
Finding

Generated Media Downloads Have No Size or Storage Quota

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Note
Location
skills/linkfox-aigc-videogen/scripts/onboarding.py:162
Finding

Onboarding Recommends Installing Unpinned Runtime Dependencies

Content
View full analysis
None: if requests is None: raise RuntimeError( "Missing requests dependency; run: pip install requests" ) ``` ### Technical Analysis The onboarding scripts direct users to install `qrcode`, `pillow`, and `requests` from the package resolver without exact versions, cryptographic hashes, a lockfile, or a documented trusted package index. The reviewed project does not automatically execute `pip`, and the package names are not apparent typographical substitutions. Consequently, this is not evidence of an intentionally malicious dependency. It nevertheless creates a mutable and non-reproducible supply-chain boundary: the code installed in the future may differ from the version reviewed with this skill. Installation may also include unreviewed transitive dependencies and package installation hooks. ### Attack Path 1. A required package is absent. 2. The user follows the runtime installation instruction. 3. `pip` resolves the latest available package and its transitive dependencies from the configured index. 4. A compromised release, compromised index, or unsafe future dependency executes installation or import-time code. 5. That code runs with the privileges of the user performing the installation or invoking the skill. ### Impact Assessment A compromised dependency can execute arbitrary code unde ...[truncated 292 chars]
Remediation
View remediation
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (87)

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
90% confidence
Finding

The script builds outbound requests using environment-derived metadata headers such as SESSION_ID, MESSAGE_ID, MODE_ID, and APP_NAME, plus an API key in the Authorization header, and sends them to a base URL that is environment-overridable via LINKFOX_TOOL_GATEWAY. If an attacker can influence that gateway variable or runtime environment, the skill can exfiltrate sensitive credentials and session metadata to an attacker-controlled endpoint.

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
95% confidence
Finding

The code constructs request destinations from environment-controlled base URLs and then sends sensitive data, including phone numbers, SMS codes, access tokens, refresh tokens, and generated API keys, to those endpoints via requests.post. If an attacker can influence environment variables in the runtime, they can redirect authentication and token traffic to attacker-controlled infrastructure, causing credential exfiltration and account compromise.

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
94% confidence
Finding

The gateway helper uses an environment-derived base URL with urllib.request.urlopen and automatically attaches the API key in the Authorization header. An attacker who can set LINKFOX_AGENT_API_URL or related variables can redirect API-key-bearing requests for account info, plans, and orders to a malicious server, exposing secrets and enabling fraudulent actions or service abuse.

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: 'url' from os.environ.get (line 235, credential/environment) → requests.post (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-videogen-multi/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
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-videogen-multi/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 296, 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-videogen-multi/scripts/aigc_videogen_multi.py (reported line 201)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 296, 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-videogen/scripts/aigc_videogen.py (reported line 201)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 296, 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-videogen-multi/scripts/aigc_videogen_multi.py (reported line 298)May include surrounding context.

python
}
    req = Request(url, data=data, headers=headers, 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: 'req' from os.environ.get (line 296, 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-videogen/scripts/aigc_videogen.py (reported line 298)May include surrounding context.

python
}
    req = Request(url, data=data, headers=headers, 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
95% 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, API keys, and team identifiers to those URLs. If an attacker can influence the environment, they can redirect these requests to an arbitrary host and exfiltrate credentials and account metadata, which is especially dangerous because this file performs authentication and token issuance.

Content

Scanner excerpt · skills/linkfox-aigc-videogen/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 then used by urllib to send authenticated requests with the LINKFOX_AGENT_API_KEY in the Authorization header. An attacker who can set LINKFOX_AGENT_API_URL or LINKFOX_TOOL_GATEWAY can force the CLI to transmit the API key and order/account operations to an attacker-controlled server, enabling credential theft and potentially fraudulent workflow manipulation.

Content

Scanner excerpt · skills/linkfox-aigc-videogen/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 description is for a video-generation skill that should assemble product assets into a promotional speaking-model MP4 for e-commerce/TikTok use. The supplied code is clearly an async text-generation client (aigc_textgen.py) that calls /aigc/textGenAsync and /aigc/textTaskQuery, polls task status, outputs content, flattens newlines, and stores large JSON responses. There is no video generation pipeline, no MP4 creation, no product-image ingestion beyond generic utility code, and no logic specific to talking-head or seller video production. This is a material primary-purpose mismatch.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

声明描述的是电商带货口播视频生成能力,且明确排除了普通图转视频、视频剪辑、数据分析等范围。但代码没有任何与图片、视频、音频、文案合成、时长控制、语言处理或 MP4 导出相关的逻辑。相反,它实现的是 LinkFox 平台的账户 onboarding 和商业支付流程:调用登录接口发送验证码与登录、调用 account/package/order 接口列套餐和下单、渲染二维码、查询订单状态,并处理 API token。其主要用途与声明完全不同,属于明显的描述与行为不匹配。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

描述将该 Skill 定位为电商带货口播视频生成器,强调基于商品图和营销要素生成带讲话/口播的 MP4,并排除普通图转视频。实际代码却只是通用的多参考图生视频任务封装:提交生成任务、轮询结果、下载媒体文件。代码中看不到任何针对电商带货场景的业务参数处理,也没有脚本生成、语音/口播、数字人、TikTok 广告模板、销售地区或受众定制等实现。因此其主要用途与声明明显不符,属于实质性描述-行为不匹配。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

声明描述的是一个电商带货口播视频生成 Skill,核心能力应围绕图片、卖点、语言、时长等输入生成 MP4 视频。但提供的代码完全聚焦于账号 onboarding 和商业化支付流程:调用登录接口发送验证码与登录、获取团队/API token、查询套餐、下单、展示微信/支付宝支付二维码、查询订单状态。代码中没有任何视频生成、媒体处理、图像转视频、口播合成、TikTok 广告制作相关逻辑。其主要目的与声明严重不符,属于明显的 description-behavior mismatch。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

The description presents a narrowly scoped skill for assembling product-promotion talking videos for cross-border e-commerce. However, the supplied code is a generic wrapper around /aigc/videoGenAsync and /aigc/taskQuery: it accepts arbitrary JSON input, creates a video generation task, polls for completion, and downloads result URLs. There is no visible logic tying the task to product images, product selling points, sales regions, target audience, language, duration, talking-head personas, TikTok ad formatting, or e-commerce-only use cases. While the backend API might support those scenarios, this code chunk itself does not substantiate the specialized declared purpose and instead implements a broader general-purpose AI video generation capability. The file-saving, polling, and media download behavior are supporting details, but the primary behavior is materially broader than the declared scope.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

声明描述的是‘带货口播视频生成’能力,但代码完全围绕账户开通、认证、API key 获取和充值购买流程展开。它访问登录、用户中心、套餐、订单、支付相关接口,并在本地落地二维码图片;没有任何与商品图输入、卖点文案组装、数字人口播、视频渲染、TikTok 广告素材生成或 MP4 导出相关的实现。因此该代码与声明用途存在明显且重大的功能不一致,属于主目的不同且包含未声明的账号/支付能力。

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The prompt hard-codes race-locked casting rules based on sales region, including exclusionary directives such as forbidding certain ethnicities. This is unrelated to the core function of generating a product talking-head video and creates discriminatory, biased outputs that can violate policy, platform rules, or anti-discrimination requirements.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The file explicitly maps sales regions to required race/ethnicity and physical traits without user consent, e.g. forcing 'white' for US/EU and banning Asian faces. This operationalizes protected-class profiling and can produce discriminatory content at scale, creating legal, compliance, and reputational risk.

Content

No source excerpt is available for this finding.

Vague Triggers

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The trigger phrases are excessively broad, including generic requests like “帮我写一段”, “图片识别”, and “视频分析”, which can cause this skill to activate for many unrelated user intents. That creates a routing/invocation integrity issue: user content, images, or videos may be sent to this external text-generation service unexpectedly, increasing the risk of privacy leakage, unintended third-party processing, and incorrect tool execution.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The referenced API documentation describes an AI text-generation service, while the declared skill is for generating product sales videos. This mismatch can cause the agent to invoke an unrelated capability, sending user media, prompts, and identifiers to a backend not aligned with the advertised purpose, which is a dangerous form of capability confusion and can lead to unintended data processing or incorrect tool use.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The manifest describes a skill that assembles product images, selling points, region, audience, language, and duration into an MP4 sales video. This file instead identifies itself as an AI text-generation skill and only calls /aigc/textGenAsync and /aigc/textTaskQuery, extracting and returning content text rather than producing video or MP4 output.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The documented output contract explicitly says stdout contains response JSON or plain text content, and large results are written as JSON files under a local linkfox/... path. That materially differs from the manifest claim that the skill creates a带货口播MP4/video asset for e-commerce use cases.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The file implements account onboarding, SMS login, token retrieval, plan listing, and payment flows rather than the declared product video generation behavior. This skill/function mismatch is dangerous because it expands the privilege and data-collection surface beyond user expectations, increasing the chance of deceptive credential capture or unauthorized monetization in a context where users expected media generation only.

Content

No source excerpt is available for this finding.