Back to skill

Security audit

Alibabacloud Bailian Video Creator

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly aligned with Alibaba Cloud video generation, but it can automatically install a pre-release CLI plugin, create/delete cloud API keys, persist credentials, and send user media prompts to Alibaba Cloud without strong user-confirmation gates.

Review before installing. Prefer supplying a dedicated DASHSCOPE_API_KEY yourself, avoid granting AliyunBailianFullAccess, use a low-privilege RAM identity if automatic key management is needed, and do not send sensitive or regulated media through public URLs. Expect possible cloud charges and be aware that full media URLs may appear in terminal logs.

Vulnerability Patterns
  • 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
  • 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)

T08 · Insecure Dependencies

Error
Location
scripts/api_key.py:62
Finding

Implicit Pre-Release Plugin Installation and Cloud API-Key Provisioning

Content
View full analysis
bool: """Auto-install the ModelStudio plugin.""" try: print("Auto-installing ModelStudio plugin...", file=sys.stderr) result = subprocess.run( ["aliyun", "plugin", "install", "--names", "aliyun-cli-modelstudio", "--enable-pre"], capture_output=True, text=True, timeout=60 ) if result.returncode == 0: print("✓ ModelStudio plugin installed successfully", file=sys.stderr) return True print(f"⚠️ ModelStudio plugin installation failed: {result.stderr.strip()}", file=sys.stderr) return False except (subprocess.TimeoutExpired, FileNotFoundError): return False def check_aliyun_cli() -> bool: """Check if Alibaba Cloud CLI and ModelStudio plugin are available. Auto-installs plugin if missing.""" if not _check_aliyun_binary(): return False try: result = subprocess.run( ["aliyun", "modelstudio", "version"], capture_output=True, text=True, timeout=5 ) if result.returncode == 0: return True except (subprocess.TimeoutExpired, FileNotFoundError): pass if not _install_modelstudio_plugin(): return False ``` ```python # Priority 3: Auto-create via Alibaba Cloud CLI if check_aliyun_cli(): print("No existing API Key found, auto-creating via Alibaba Cloud CLI...", file=sys.stderr) try: api_key_value, api_key_id = generate_api_key() save_api_key_to_config(api_key_value, api_key_id=api_key_id) print("✓ API Key auto-created and saved to Alibaba Cloud CLI config", file=sys.stderr) ...[truncated 2423 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Error
Location
references/ram-policies.md:31
Finding

Documentation Recommends Excessive Bailian Full-Access Permissions

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/image_to_video.py:164
Finding

Complete Media URLs May Leak Signed Access Tokens Through Logs

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/image_to_video.py:49
Finding

Undefined Idempotency Token Causes Four Advertised API Features to Fail

Content
View full analysis
Remediation
View remediation
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
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Rogue AgentSelf-Modification, Session Persistence
Findings (49)

Chaining Abuse

High
Category
Tool Misuse
Confidence
75% confidence
Finding

Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.

Content

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

md
brew install ffmpeg

# Ubuntu/Debian
sudo apt update && sudo apt install ffmpeg

# Windows (Chocolatey)
choco install ffmpeg

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The front-matter description mentions automatic API key management and plugin installation, but it does not present a clear, prominent safety warning that first run may modify the local CLI configuration and create or recycle cloud API keys. Because these actions affect credentials and the local environment, users may invoke the skill without informed consent, creating risk of unintended account or system changes.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill heavily promotes video generation and editing features that can incur real cloud charges, but the warning about billing appears much later and is not prominent at the point of use. A user could trigger costly remote generation jobs before realizing the financial impact, especially since the skill emphasizes automatic execution and polling.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
87% confidence
Finding

This skill is explicitly designed to send prompts, URLs, and media references to Alibaba Cloud DashScope over the network, so external transmission is an intended behavior. However, that still carries data exposure risk because user-supplied content and possibly sensitive media are transmitted to a third-party remote API for processing.

Content

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

Step 1 -- Create task (obtain task_id):

python
response = requests.post(
    "https://dashscope.aliyuncs.com/api/v1/services/aigc/video-generation/video-synthesis",
    headers={"Authorization": f"Bearer {api_key}", "X-DashScope-Async": "enable"},
    json={"model": "wan2.6-t2v", "input": {"prompt": prompt}, "parameters": {...}}

External Transmission

Medium
Category
Data Exfiltration
Confidence
87% confidence
Finding

This skill is explicitly designed to send prompts, URLs, and media references to Alibaba Cloud DashScope over the network, so external transmission is an intended behavior. However, that still carries data exposure risk because user-supplied content and possibly sensitive media are transmitted to a third-party remote API for processing.

Content

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

Step 1 -- Create task (obtain task_id):

python
response = requests.post(
    "https://dashscope.aliyuncs.com/api/v1/services/aigc/video-generation/video-synthesis",
    headers={"Authorization": f"Bearer {api_key}", "X-DashScope-Async": "enable"},
    json={"model": "wan2.6-t2v", "input": {"prompt": prompt}, "parameters": {...}}

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
84% confidence
Finding

The skill instructs users to run package installation commands with sudo, which can modify the host system with elevated privileges. In a skill that may be invoked automatically or by less technical users, normalizing privileged commands without strong warnings increases the chance of unnecessary system-wide changes or abuse if surrounding instructions are altered.

Content

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

md
brew install ffmpeg

# Ubuntu/Debian
sudo apt update && sudo apt install ffmpeg

# Windows (Chocolatey)
choco install ffmpeg

Unrestricted Tool Access

Medium
Category
Excessive Agency
Confidence
80% confidence
Finding

Skill grants unrestricted tool access without appropriate constraints. An agent with unfettered tool access can perform arbitrary actions including file modification, network requests, and code execution.

Content

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

md
## Usage Examples

Run any script directly to see detailed parameter descriptions (`python scripts/<script_name>.py`).

| Feature | Script | Key Parameters |
|---------|--------|---------------|

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The documentation explicitly shows sending video content and prompts to a third-party cloud API, and it notes that video URLs must be publicly accessible. In a reference doc this is expected behavior, but the lack of a nearby privacy/disclosure warning can still cause inadvertent exposure of sensitive media, prompts, or metadata by users who copy the examples without understanding the external transmission and public-hosting requirement.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · references/api-docs.md (reported line 74)May include surrounding context.

Request example:

bash
curl --location 'https://dashscope.aliyuncs.com/api/v1/services/aigc/video-generation/video-synthesis' \
    -H 'X-DashScope-Async: enable' \
    -H "Authorization: Bearer $DASHSCOPE_API_KEY" \
    -H 'Content-Type: application/json' \

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · references/api-docs.md (reported line 115)May include surrounding context.

Request example:

bash
curl --location 'https://dashscope.aliyuncs.com/api/v1/services/aigc/video-generation/video-synthesis' \
    -H 'X-DashScope-Async: enable' \
    -H "Authorization: Bearer $DASHSCOPE_API_KEY" \
    -H 'Content-Type: application/json' \

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · references/api-docs.md (reported line 157)May include surrounding context.

Request example:

bash
curl --location 'https://dashscope.aliyuncs.com/api/v1/services/aigc/video-generation/video-synthesis' \
    -H 'X-DashScope-Async: enable' \
    -H "Authorization: Bearer $DASHSCOPE_API_KEY" \
    -H 'Content-Type: application/json' \

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · references/api-docs.md (reported line 201)May include surrounding context.

Request example:

bash
curl --location 'https://dashscope.aliyuncs.com/api/v1/services/aigc/video-generation/video-synthesis' \
    -H 'X-DashScope-Async: enable' \
    -H "Authorization: Bearer $DASHSCOPE_API_KEY" \
    -H 'Content-Type: application/json' \

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · references/api-docs.md (reported line 244)May include surrounding context.

Request example:

bash
curl --location 'https://dashscope.aliyuncs.com/api/v1/services/aigc/video-generation/video-synthesis' \
    -H 'X-DashScope-Async: enable' \
    -H "Authorization: Bearer $DASHSCOPE_API_KEY" \
    -H 'Content-Type: application/json' \

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/api_key.py (reported line 52)May include surrounding context.

python
def _check_aliyun_binary() -> bool:
    """Check if Alibaba Cloud CLI binary is installed."""
    try:
        result = subprocess.run(
            ["aliyun", "version"],
            capture_output=True,
            text=True,

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The module auto-installs a plugin and enables pre-release behavior without explicit user confirmation or prominent disclosure. In a skill setting, silent system modification is dangerous because it changes the trust boundary, introduces third-party executable code, and may create persistence or supply-chain exposure on the host.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
91% confidence
Finding

This code automatically installs and enables a CLI plugin by executing a package-management style command without explicit user consent. That modifies the host system and extends trusted code at runtime; if the plugin source, package channel, or local CLI environment is compromised, this can lead to unintended code execution or persistence on the user's machine.

Content

Scanner excerpt · scripts/api_key.py (reported line 67)May include surrounding context.

python
"""Auto-install the ModelStudio plugin."""
    try:
        print("Auto-installing ModelStudio plugin...", file=sys.stderr)
        result = subprocess.run(
            ["aliyun", "plugin", "install",
             "--names", "aliyun-cli-modelstudio", "--enable-pre"],
            capture_output=True,

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

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

python
return False
    # Check ModelStudio plugin
    try:
        result = subprocess.run(
            ["aliyun", "modelstudio", "version"],
            capture_output=True,
            text=True,

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/api_key.py (reported line 104)May include surrounding context.

python
return False
    # Check ModelStudio plugin
    try:
        result = subprocess.run(
            ["aliyun", "modelstudio", "version"],
            capture_output=True,
            text=True,

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

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

python
RuntimeError: When unable to retrieve
    """
    try:
        result = subprocess.run(
            ["aliyun", "modelstudio", "list-workspaces",
             "--region", "cn-beijing",
             "--user-agent", "AlibabaCloud-Agent-Skills/alibabacloud-bailian-video-creator"],

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The workspace lookup is fixed to the cn-beijing region, which imposes a locale/region choice in the skill's behavior. The file does not offer a user opt-in or configuration mechanism for region selection, nor does it explain that the skill is intentionally limited to that locale for compliance or product-scope reasons.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · scripts/api_key.py (reported line 145)May include surrounding context.

python
workspaces = data.get("workspaces", [])
        if not workspaces:
            raise RuntimeError(
                "No Bailian Workspace found. Please create one in the console first:\n"
                "  https://bailian.console.aliyun.com/"
            )
        return workspaces[0]["workspaceId"]

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
93% confidence
Finding

This subprocess call creates a real cloud API key automatically, using the current Alibaba Cloud CLI credentials, and the resulting secret is later persisted locally. In a skill/module context, silently provisioning credentials expands cloud access and leaves durable secrets on disk without explicit informed user approval, increasing the risk of unauthorized account changes, secret sprawl, and unintended billing or service access.

Content

Scanner excerpt · scripts/api_key.py (reported line 180)May include surrounding context.

python
workspace_id = _get_workspace_id()

    try:
        result = subprocess.run(
            ["aliyun", "modelstudio", "create-api-key",
             "--region", "cn-beijing",
             "--workspace-id", workspace_id,

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The create-api-key command forces the cn-beijing region and does not provide a way for users to select another region. This is a natural-language/policy concern because the skill silently enforces a locale-specific operational context without explicit consent or explanation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

When no key is found, the code automatically creates a cloud API key and saves it into ~/.aliyun/config.json, causing both remote account modification and local secret persistence without prior approval. In an agent skill context, this is especially risky because the user may only expect read/check behavior, not credential issuance and storage that can outlive the session.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/api_key.py (reported line 378)May include surrounding context.

python
}

    try:
        result = subprocess.run(
            ["aliyun", "modelstudio", "delete-api-key",
             "--region", "cn-beijing",
             "--api-key-id", api_key_id,