Back to skill

Security audit

长文转短视频分镜

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly a disclosed storyboard helper, but its persistent learning files can turn project-controlled text into mandatory future instructions.

Review this skill before installing in shared or cloned repositories. The main risk is that a project can include .avs/learnings.jsonl entries that the skill tells the agent to obey later. Use it only in workspaces you trust, inspect learning entries before running digest/check flows, and be cautious with promoting project lessons to global memory or using the cross-agent avs install command.

Vulnerability Patterns
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Findings (1)

T02 · Agent Memory Poisoning

Error
Location
SKILL.md:18
Finding

Project-Controlled Persistent Learning Entries Are Loaded as Mandatory Agent Instructions

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:18-29; scripts/learn.py:25-53, 153-167
Vulnerability Type: Persistent instruction injection through project-local memory
Risk Level: High

Technical Analysis

The Skill requires the Agent to load historical learning entries before creating a storyboard. The instructions state that this step cannot be skipped and that every returned entry must be followed.

Relevant instruction from SKILL.md:18-29, translated into English:

text
Before writing, the historical experience must be reviewed. This step cannot be skipped.

avs learn digest
# If the CLI is unavailable:
python3 scripts/learn.py digest

Every entry in the output must be followed.

The learning implementation loads both global and project-local state. The project path is relative to the current working directory:

python
GLOBAL_PATH = Path.home() / ".workbuddy" / "avs" / "learnings.jsonl"
PROJECT_PATH = Path(".avs") / "learnings.jsonl"

def load(scope):
    items = []
    paths = []
    if scope in ("all", "global"):
        paths.append(("global", GLOBAL_PATH))
    if scope in ("all", "project"):
        paths.append(("project", PROJECT_PATH))
    for name, p in paths:
        if not p.exists():
            continue
        for line in p.read_text(encoding="utf-8").splitlines():
            line = line.strip()
            if not line:
                continue
            try:
                obj = json.loads(line)
            except json.JSONDecodeError:
                continue
            obj["scope"] = name
            obj["file"] = str(p)
            items.append(obj)
    return items

cmd_digest then emits the stored text field without validation, escaping, provenance enforcement, or an allowlist restricting it to storyboard preferences:

python
def cmd_digest(args):
    items = load(args.scope)
    lessons = [i for i in 
...[truncated 3044 chars]
Remediation
View remediation

Remediation Suggestions

  1. Treat all learning-file values as untrusted data rather than executable or mandatory instructions.
  2. Replace free-form text rules with a structured schema containing narrowly defined fields such as color palette, narration style, prohibited visual object, and target model.
  3. Validate categories and values against an allowlist. Reject entries containing tool requests, file paths, URLs, shell commands, credential requests, or instructions unrelated to storyboard generation.
  4. Do not state that every digest entry must be obeyed. Instruct the Agent to use entries only as optional storyboard preferences and never as authority to change security constraints or invoke unrelated tools.
  5. Require explicit user approval before loading project-local .avs/learnings.jsonl, especially for cloned repositories and shared workspaces.
  6. Display each entry's scope and source path, and clearly separate global user-owned preferences from repository-controlled project data.
  7. Store trusted global entries in a user-owned directory with restrictive permissions and apply ownership or integrity checks where appropriate.
  8. Add a safe digest mode that serializes entries as quoted data under a fixed prompt boundary, explicitly stating that embedded imperatives are content and must not be executed.
  9. Add tests using instruction-like learning entries to verify that they cannot trigger unrelated tool operations or override the Skill's intended workflow.
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (12)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The description's primary purpose is content generation: taking a completed long article and producing a short-video storyboard suitable for text-to-video models. The code shown instead performs validation on existing storyboard files (check_storyboard.py). It loads files, parses shots, checks style prefixes/avoid words/speech-rate related issues through helper functions, and reports pass/fail results. This aligns only with the 'hard-check/inspection' portion of the description, not the main promised behavior of generating the storyboard itself. There is also no visible mechanism for accumulating lessons into new checks. Therefore the declared description materially overstates and misrepresents the actual behavior of this code chunk.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
91% confidence
Finding

描述强调的是一个较完整的“长文转短视频脚本”能力:直接产出每镜头的具体内容,并内置自动质检和持续学习机制。该代码块只实现了其中较基础的一部分——根据 Markdown 标题提取主题、估算镜头数、分配时间轴、写出包含提示字段的 Markdown 模板。虽然模板字段与描述中的镜头结构相关,也包含风格前缀、负向提示词、配音字数限制等辅助约束,但核心输出仍是占位骨架,不是完整成品;而且描述重点提到的自动检查与经验沉淀在此代码中并未实现。因此,代码行为与声明用途存在实质性差距。

Content

No source excerpt is available for this finding.

Vague Triggers

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The empty trigger entry creates ambiguous matching behavior and may cause the skill to activate unexpectedly or effectively match arbitrary prompts depending on the host agent’s routing logic. In a skill that recommends file access and persistent learning writes, unintended activation materially raises the risk of unnecessary local file reads/writes and user confusion about why those operations occurred.

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
**对本 skill 的影响**:无论用户怎么装,本文件(`SKILL.md`)和 `scripts/`、`references/` 的相对位置不变。所以上面所有命令里的相对路径写法始终成立,不需要关心自己被装到了哪里。

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The empty trigger entry creates ambiguous matching behavior and may cause the skill to activate unexpectedly or effectively match arbitrary prompts depending on the host agent’s routing logic. In a skill that recommends file access and persistent learning writes, unintended activation materially raises the risk of unnecessary local file reads/writes and user confusion about why those operations occurred.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill documentation includes a self-installation/deployment mechanism (avs install) that copies the skill into multiple agent environments, which expands its operational reach beyond the declared article-to-video purpose. Cross-agent installation can become a propagation vector: a user invoking a content skill may unknowingly authorize changes to other agent skill directories or broader filesystem locations, increasing the blast radius of any future malicious modification or misconfiguration.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The entire skill file is written exclusively in Chinese and provides no indication that language choice is optional or that the skill is intentionally limited to a Chinese-speaking audience. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The module docstring and generated content instructions are entirely in Chinese and describe the skill as producing storyboard output in Chinese by default. Under the policy rule, a language constraint should either be user-selectable or clearly justified as region-specific; neither appears here.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This Python file contains the module docstring, examples, CLI descriptions, help text, and runtime messages entirely in Chinese. That imposes a specific language on users without any documented opt-in or alternative locale, which matches the language/locale policy violation criteria.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The file’s natural-language documentation is entirely in Chinese and the code is built around Chinese-only field names such as "画面", "中文提示词", "英文提示词", "配音", and "字幕". This indicates a language-specific constraint without any visible opt-in, alternative locale support, or justification that the skill is region-specific.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

This markdown file presents all instructional text in Chinese and does not indicate that users may choose another language or that the skill is intentionally limited to a Chinese-speaking context. Under the natural-language policy rule, forcing a specific language without opt-in can be a locale-policy concern.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.