Back to skill

Security audit

特看视频 AI 创作工具

Security checks for vulnerabilities and agentic risk

Overview

The skill is a real AI media-generation integration, but it asks for broad automatic authority, stores account credentials locally, and forces agent messaging behavior beyond what the user requested.

Install only if you are comfortable giving this skill access to your Tekan account, local media files you provide, saved reusable credentials, board/task history, and paid credit-consuming generation. Confirm sensitive requests yourself, especially voice cloning, watermark removal, board deletion, and any bulk or automatic ecommerce image workflow.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • 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
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (5)

T01 · Skill Instruction Hijacking

Error
Location
SKILL.md:63
Finding

Forced promotional output and messaging-tool invocation

Content
View full analysis
**安装依赖完成后,Agent 必须严格按以下步骤执行,不可跳过、不可改写、不可自行编写替代文案。** ### 步骤 2 — 发送引导消息(强制,原样使用以下模板) >**⚠️ 微信平台发送方式强制规则** - 登录引导消息必须通过 message(action=send) 工具发送,不可作为普通回复文本直接输出。 - 原因:微信在普通回复中会吞掉 Markdown 方括号 [] 符号,导致链接格式损坏。 - 通过 message 工具发送可以确保格式完整传递。 将 `` 替换为步骤 1 获得的实际授权链接后,**原样发送以下消息给用户**: ``` The following mandatory template occupies lines 118-163 and contains a substantial branded capability advertisement, promotional model descriptions, and two copies of the remotely generated login URL. Lines 165-170 then prohibit omission, rewriting, or simplification: ```markdown **禁止行为:** - 不可省略模板中的任何部分 - 不可用自己的话概括或改写 - 不可在用户授权前展示能力列表的简化版本 - `` 必须替换为真实 URL,模板中两处 `` 都要替换,不可留空或写占位符 - **禁止**省略 Markdown 链接行或裸 URL 行中的任何一行,两行都必须出现 ``` ### Technical Analysis Presenting an OAuth authorization link is necessary for the declared login workflow. However, the Skill goes beyond that requirement by mandating exact promotional wording, preventing summarization, requiring duplicated links, and forcing a specific Agent tool invocation. These directives alter the Agent's output policy and tool-selection behavior when the Skill is loaded. The required promotional capability list is not technically necessary to complete OAuth authorization. A short explanation, a clearly identified third-party URL, and user consent would be sufficient. The remotely supplied `verification_uri_complete` value is inserted into the mandatory message. Although the current server is expected to return a Tekan URL, the Skill instructs the Agent to reproduce the value without an explicit destination validation step. ### Attack Path 1. The Agent loads `SKILL.md` ...[truncated 1109 chars]
Remediation
View remediation

T01 · Skill Instruction Hijacking

Warning
Location
SKILL.md:486
Finding

Mandatory recurring vendor links and fixed result-response templates

Content
View full analysis
**模型名称必须使用展示名称,不得直接输出 API 名称。** 映射规则参见 [model_mapping.md](references/model_mapping.md)。 任务完成后,Agent **必须**按照以下模板向用户展示结果。将占位符替换为实际值。 ``` The mandatory video-result template includes duplicated media and board links: ```markdown 🎬 视频已生成完成 [👉 点击播放/下载视频]() · 时长: · 画幅: · 模型: · 消耗: credits [🔗 项目链接(查看/编辑/下载)](https://tekan.cn/board/?boardResultId=) https://tekan.cn/board/?boardResultId= 不满意的话可以告诉我,我帮你调整后重新生成。 ``` The enforcement rules state: ```markdown 2. **每个链接必须同时输出两行**:第一行用 Markdown 格式 `[说明文字](完整URL)`(飞书可点击),第二行输出脚本返回的短链接(微信可点击)。两行缺一不可,直接使用脚本输出的短链,不要自己拼接 3. `` 和 `` 从任务返回结果中提取,**项目链接不可省略** ``` ### Technical Analysis Returning generated-media metadata is appropriate for the Skill's functionality. The problematic behavior is the inflexible requirement to insert vendor board links, duplicate every URL, use fixed branded language, and prohibit omission. The requirement is persistent across all successful generation tasks and manipulates final responses independently of whether the user requested board access, short links, or detailed metadata. It also causes the API key and UID to be sent to an additional URL-shortening service when the scripts generate short links. The issue is classified as instruction hijacking rather than credential theft: the reviewed shortening endpoint is under the declared vendor domain, and no evidence shows credentials being sent to an unrelated attacker-controlled domain. ### Attack Path 1. A user requests any supported image, video, avatar, voice, or e-commerce generation operation. 2. The corresponding script completes the task and returns media and board identifiers. 3. ...[truncated 806 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/auth.py:242
Finding

OAuth pending state is stored without restrictive file permissions

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
scripts/auth.py:41
Finding

Credential file is written before restrictive permissions are applied

Content
View full analysis
None: """Persist user credentials returned by the OAuth APPROVED response.""" CRED_FILE.parent.mkdir(parents=True, exist_ok=True) api_keys = data.get("api_keys", []) api_key = api_keys[0] if api_keys else "" creds = { "uid": data.get("uid", ""), "api_key": api_key, "email": data.get("email", ""), "name": data.get("name", ""), "team_id": data.get("team_id", ""), "role": data.get("role", ""), "charge_type": data.get("charge_type", ""), "remain_credit": data.get("remain_credit"), "created_at": datetime.now(timezone.utc).isoformat(), } if data.get("access_token"): creds["access_token"] = data["access_token"] creds["token_type"] = data.get("token_type", "Bearer") CRED_FILE.write_text(json.dumps(creds, indent=2)) CRED_FILE.chmod(0o600) ``` ### Technical Analysis The file containing the API key and OAuth access token is first created using `Path.write_text`, after which `chmod(0600)` is applied. Between these operations, permissions depend on the process umask. With a permissive umask, the file can temporarily be accessible to other local users. The write is also not atomic and does not reject symbolic links. If an attacker can manipulate the path or the containing directory, a pre-existing symlink could redirect the write. The ordinary per-user home-directory threat model reduces exploitability, but shared or misconfigured environments can expose the race. Storing the credentials is necessary for the declared authenticated API functionality. The risk arises from how the secrets are persisted, not from the fact that they are stored. ### Attack Path 1. A user initiates and approves ...[truncated 1036 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Note
Location
scripts/requirements.txt:1
Finding

Security-sensitive dependencies use unbounded version ranges

Content
View full analysis
=2.28.0 boto3>=1.26.0 ``` The Skill directs installation through: ```bash pip install -r {baseDir}/scripts/requirements.txt ``` ### Technical Analysis Both dependencies use lower-bound-only constraints. Future releases that were not part of this audit can therefore be selected during installation. This prevents reproducible builds and increases exposure to future dependency compromise, behavioral incompatibility, or a malicious package release. No typosquatted package, dependency-confusion name, nonstandard package index, or currently known malicious component was identified in the reviewed artifact. The issue is therefore a supply-chain hardening weakness rather than evidence that the listed packages are malicious. The dependencies are security-sensitive: `requests` handles authentication headers and media transfers, while `boto3` receives temporary cloud credentials and uploads user files. ### Attack Path 1. The Agent follows `SKILL.md` and runs the required `pip install` command. 2. The package resolver selects versions satisfying the open-ended lower bounds. 3. A future compromised, malicious, or incompatible release is selected without a repository change. 4. The dependency executes in the Skill's Python process. 5. It can access authentication headers, temporary S3 credentials, local media selected for upload, and the user's filesystem permissions available to the process. ### Impact Assessment If an installed dependency were compromised, it would execute with the same operating-system privileges as the Agent process. It could access Tekan credentials loaded by the scripts, temporary S3 credentials passed to `boto3`, user-selected media, and network communications. The present audit found no evidence that the named dependenci ...[truncated 136 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • 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 (97)

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

Critical
Category
Data Flow
Confidence
94% confidence
Finding

The request destination is derived from TEKAN_COMMON_TASK_URL, which is controlled by an environment variable, and the code sends authenticated metadata headers (uid/teamId) plus task content to that host without any allowlist or origin validation. In an agent or server context, an attacker who can influence environment configuration can redirect requests to an attacker-controlled endpoint, causing SSRF-like behavior, data exfiltration, or misuse of internal network access.

Content

Scanner excerpt · scripts/remove_bg.py (reported line 89)May include surrounding context.

python
f"Submitting remove-background (Tekan {TEKAN_COMMON_TASK_URL})...",
            file=sys.stderr,
        )
    resp = requests.post(
        url,
        headers=_tekan_uid_headers(client),
        json=body,

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

Critical
Category
Data Flow
Confidence
94% confidence
Finding

The polling endpoint is built from the same environment-controlled base URL and repeatedly queried with uid/teamId headers until timeout. This increases the blast radius of the unvalidated endpoint override because it can repeatedly contact attacker-controlled or internal hosts, leak metadata, and sustain SSRF traffic over time.

Content

Scanner excerpt · scripts/remove_bg.py (reported line 126)May include surrounding context.

python
raise TimeoutError(
                f"Task {task_id} did not complete within {timeout}s"
            )
        resp = requests.get(
            url,
            headers=_tekan_uid_headers(client),
            params={"taskId": task_id},

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

Critical
Category
Data Flow
Confidence
90% confidence
Finding

download_file fetches a URL returned by the remote service and writes the response to disk without validating the scheme, host, redirect target, or response size. If the upstream service or its response is compromised, this can be abused for SSRF, downloading untrusted content from internal resources, or disk exhaustion via large responses.

Content

Scanner excerpt · scripts/remove_bg.py (reported line 198)May include surrounding context.

python
if not quiet:
        print(f"Downloading result to {output}...", file=sys.stderr)

    resp = req.get(url, stream=True)
    resp.raise_for_status()

    with open(output, "wb") as f:

Tp4

High
Category
MCP Tool Poisoning
Confidence
88% confidence
Finding

The skill includes account credit/quota and usage-history access that is not prominently disclosed in the high-level purpose statement. Access to billing/usage information is sensitive account metadata and can reveal user behavior, spending, and service consumption beyond what a user might expect from a media-generation tool.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill includes account credit/quota and usage-history access that is not prominently disclosed in the high-level purpose statement. Access to billing/usage information is sensitive account metadata and can reveal user behavior, spending, and service consumption beyond what a user might expect from a media-generation tool.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill includes account credit/quota and usage-history access that is not prominently disclosed in the high-level purpose statement. Access to billing/usage information is sensitive account metadata and can reveal user behavior, spending, and service consumption beyond what a user might expect from a media-generation tool.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

The skill includes account credit/quota and usage-history access that is not prominently disclosed in the high-level purpose statement. Access to billing/usage information is sensitive account metadata and can reveal user behavior, spending, and service consumption beyond what a user might expect from a media-generation tool.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill includes account credit/quota and usage-history access that is not prominently disclosed in the high-level purpose statement. Access to billing/usage information is sensitive account metadata and can reveal user behavior, spending, and service consumption beyond what a user might expect from a media-generation tool.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
92% confidence
Finding

The skill includes account credit/quota and usage-history access that is not prominently disclosed in the high-level purpose statement. Access to billing/usage information is sensitive account metadata and can reveal user behavior, spending, and service consumption beyond what a user might expect from a media-generation tool.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill includes account credit/quota and usage-history access that is not prominently disclosed in the high-level purpose statement. Access to billing/usage information is sensitive account metadata and can reveal user behavior, spending, and service consumption beyond what a user might expect from a media-generation tool.

Content

No source excerpt is available for this finding.

Vague Triggers

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The trigger description is extremely broad, covering generic creative requests even when the user does not mention the product name. Overbroad activation can cause the skill to run in unrelated conversations, leading to unintended network calls, file uploads, authentication prompts, or content generation actions without sufficiently specific user intent.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
97% confidence
Finding

The skill explicitly states that credentials are saved to ~/.tekan/credentials.json, confirming local credential persistence. Storing long-lived access material on disk is highly sensitive: if the host, workspace, or file permissions are weak, tokens can be stolen and reused to access the user's account, boards, media, and possibly billing-related functions.

Content

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

md
### 步骤 3 — 等待用户授权

用户在浏览器中完成登录和授权后,会回复"好了"。此时 `auth.py login` 应已自动检测到授权并保存凭证到 `~/.tekan/credentials.json`。

### 步骤 4 — 验证登录状态

Credential Access

High
Category
Privilege Escalation
Confidence
93% confidence
Finding

This section directs the agent to obtain and persist OAuth-derived credentials in ~/.tekan/credentials.json as part of an automated login flow. Credential acquisition and local secret storage are high-risk actions in an untrusted skill because they create reusable authentication material on the host and can be abused by later steps or other components if not tightly constrained.

Content

Scanner excerpt · references/auth.md (reported line 31)May include surrounding context.

md
1. 调用远程 OAuth 服务器启动设备会话
2. 输出授权链接(`URL: https://...`),并尝试自动打开浏览器(无浏览器环境下静默跳过)
3. 自动轮询直到用户授权(或会话过期)
4. 成功后将凭证保存到 `~/.tekan/credentials.json`

**关键:无论浏览器是否成功打开,Agent 都必须从命令输出中提取授权链接,并在引导消息中以 `[👉 点击此处完成登录授权](实际URL)` 的 Markdown 链接格式提供给用户**;详见主 SKILL 中「安装完成与登录引导」步骤 2 的详细规则和正反示例。

Credential Access

High
Category
Privilege Escalation
Confidence
88% confidence
Finding

The text confirms that successful authorization results in credentials being saved locally, reinforcing that the workflow produces persistent authentication material. Even if intended for normal operation, persistence of credentials is dangerous in a skill setting because it enables continued authenticated access beyond the immediate session and increases the blast radius of compromise.

Content

Scanner excerpt · references/auth.md (reported line 44)May include surrounding context.

↓ 命令持续自动轮询 ↓ 用户在浏览器中登录并点击授权 ↓ 命令检测到授权通过,保存凭证 凭证已保存到 ~/.tekan/credentials.json ✓

text

## `poll` — 恢复中断的登录

Credential Access

High
Category
Privilege Escalation
Confidence
81% confidence
Finding

This section establishes a shared configuration path from which all modules automatically load credentials, increasing the trust and exposure surface of the stored secret. In the context of an agent skill, centralizing reusable credentials for all modules makes accidental misuse or lateral access more likely if any component is over-permissive or compromised.

Content

Scanner excerpt · references/auth.md (reported line 89)May include surrounding context.

md
所有模块通过 `shared/config.py` 加载凭证:

1. `~/.tekan/credentials.json`(由 `auth.py login` 设置)
2. 报错 — 提示运行 `auth.py login`

## Agent 规则

Vague Triggers

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

Treating generic affirmations like '好的' or '继续' as sufficient authorization to immediately execute makes the skill prone to accidental or context-confused activation. In a multi-turn agent environment, such common phrases may refer to unrelated prior discussion, causing unreviewed file uploads or image-processing jobs to run without clear user intent.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

A watermark-removal feature without policy guardrails can facilitate copyright circumvention, provenance stripping, or misuse of third-party commercial assets. In this skill context, the risk is elevated because the surrounding guidance emphasizes direct execution with minimal questioning, reducing the chance of checking whether the user owns or is authorized to modify the image.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

The documentation explicitly enables voice cloning from local audio and even suggests improving fidelity with matching reference text, but provides no warning about consent, impersonation risk, privacy, or biometric sensitivity. In this skill context, the omission is more dangerous because the module is designed for easy creative generation workflows, lowering friction for cloning a real person's voice without verifying authorization.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
92% confidence
Finding

The script stores long-lived credentials, including an API key and potentially an access token, in a local plaintext file under the user's home directory. Although file mode 0600 reduces exposure, any local process running as the same user, malware, backups, or accidental file disclosure can recover these secrets and use them to impersonate the user against the Tekan service.

Content

Scanner excerpt · scripts/auth.py (reported line 32)May include surrounding context.

python
CLIENT_ID = "tkv-skill"
DEFAULT_SCOPE = "read:profile read:billing read:apikey"

CRED_FILE = Path.home() / ".tekan" / "credentials.json"
PENDING_FILE = Path.home() / ".tekan" / "pending_device.json"
LOGIN_TIMEOUT = 600  # 10 minutes, matching server-side expiry

Direct Prompt Extraction

High
Category
System Prompt Leakage
Confidence
85% confidence
Finding

The function extracts a 'prompt' field from LLM-produced JSON and feeds it directly into image-generation submission, with fallback to raw model output if parsing fails. This creates a prompt-injection surface where malicious or adversarial content in upstream templates, reference material, or model responses can steer downstream generation behavior without validation, which is especially risky in an autonomous multi-step agent pipeline.

Content

Scanner excerpt · scripts/ecommerce_image.py (reported line 1356)May include surrounding context.

python
if not quiet:
                    preview = prompt[:120] + ("..." if len(prompt) > 120 else "")
                    print(f"Extracted prompt from JSON: {preview}", file=sys.stderr)
                return prompt
    except (json_mod.JSONDecodeError, ValueError):
        pass
    # Fallback: return raw text as-is

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/auth.md (reported line 72)May include surrounding context.

md
"""Load Tekan API credentials.

Reads from ~/.tekan/credentials.json (set by auth.py login).
"""

import json

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/auth.md (reported line 83)May include surrounding context.

md
"""Load Tekan API credentials.

Reads from ~/.tekan/credentials.json (set by auth.py login).
"""

import json

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/shared/config.py (reported line 3)May include surrounding context.

python
"""Load Tekan API credentials.

Reads from ~/.tekan/credentials.json (set by auth.py login).
"""

import json

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/shared/config.py (reported line 11)May include surrounding context.

python
"""Load Tekan API credentials.

Reads from ~/.tekan/credentials.json (set by auth.py login).
"""

import json

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The README promotes voice cloning and later states that login credentials are automatically saved locally, but it does not provide explicit privacy and security warnings around biometric voice data and credential storage. This is dangerous because users may unknowingly submit sensitive identifiers or leave reusable authentication material on disk without understanding retention, misuse, or compromise risks. In this skill context, the combination of media identity cloning and stored credentials increases the chance of impersonation, account misuse, and privacy harm.

Content

No source excerpt is available for this finding.