Back to skill

Security audit

Video Dubbing

Security checks for vulnerabilities and agentic risk

Overview

This dubbing skill mostly matches its stated purpose, but it bundles under-disclosed account-based Bilibili uploading and has risky configurable API credential forwarding.

Install only if you are comfortable with remote translation and vision APIs receiving media-derived content, and review or remove scripts/upload_bilibili.py unless you explicitly want Bilibili publishing. Use separate, narrowly scoped API keys, avoid overriding API URLs to untrusted hosts, pin dependencies/model revisions, and run the skill in an isolated workspace with limited file and network access.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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 (3)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/dubbing.py:119
Finding

Translation API Credential Forwarded to an Independently Configurable Vision Endpoint

Content
View full analysis

Vulnerability Details

File Location: scripts/dubbing.py:30-37, scripts/dubbing.py:119-131
Vulnerability Type: Credential disclosure through unsafe endpoint configuration
Risk Level: High

Vulnerable Code

python
"translate": {
    "api_url": os.environ.get(
        'TRANSLATE_API_URL',
        'https://api.siliconflow.cn/v1/chat/completions'
    ),
    "api_key": os.environ.get('TRANSLATE_API_KEY', ''),
    "model": os.environ.get(
        'TRANSLATE_MODEL',
        'tencent/Hunyuan-MT-7B'
    )
},
"vision": {
    "api_url": os.environ.get(
        'VISION_API_URL',
        'https://api.siliconflow.cn/v1/chat/completions'
    ),
    "model": os.environ.get(
        'VISION_MODEL',
        'Qwen/Qwen2.5-VL-72B-Instruct'
    )
},
python
vision_url = config.get('vision', {}).get(
    'api_url',
    'https://api.siliconflow.cn/v1/chat/completions'
)
vision_model = config.get('vision', {}).get(
    'model',
    'Qwen/Qwen2.5-VL-72B-Instruct'
)

try:
    resp = requests.post(
        vision_url,
        headers={
            "Authorization": f"Bearer {translate_key}",
            "Content-Type": "application/json"
        },
        json={
            "model": vision_model,
            "messages": [{"role": "user", "content": [
                {"type": "text", "text": prompt},
                {
                    "type": "image_url",
                    "image_url": {
                        "url": f"data:image/jpeg;base64,{image_data}"
                    }
                }
            ]}],
            "max_tokens": 200
        },
        timeout=30
    )

Technical Analysis

The translation API credential is reused as the authorization credential for the vision service. However, VISION_API_URL is independently configurable through configuration data or an environment variable. The code does not bind t ...[truncated 2026 chars]

Remediation
View remediation

Remediation Suggestions

  1. Introduce a dedicated VISION_API_KEY rather than reusing TRANSLATE_API_KEY.
  2. Do not send an authorization header when vision detection is disabled or when no vision credential is explicitly configured.
  3. Restrict endpoints to HTTPS and reject URLs using HTTP or other schemes.
  4. Validate destination hostnames against an explicit allowlist of trusted API providers.
  5. If the translation and vision endpoints must share a credential, require that both normalized origins match.
  6. Display the destination hostname and obtain explicit user consent before uploading a video frame.
  7. Provide a local-only or explicitly disabled subtitle-detection mode.
  8. Use narrowly scoped provider credentials with spending limits and rotation support.
  9. Document that transcript text and video frames leave the local system during normal operation.

T05 · Unauthorized Access and Privilege Escalation

Error
Location
scripts/upload_bilibili.py:10
Finding

Undeclared Bilibili Uploader Automatically Reads Persistent Session Credentials

Content
View full analysis

Vulnerability Details

File Location: scripts/upload_bilibili.py:10-19, scripts/upload_bilibili.py:60-66
Vulnerability Type: Excessive credential access and authenticated external action
Risk Level: High

Vulnerable Code

python
# Load credentials
CRED_PATH = Path("D:/openclaw_workspace/credentials/bilibili.json")
with open(CRED_PATH) as f:
    creds = json.load(f)

SESSDATA = creds['sessdata']
BILI_JCT = creds['bili_jct']

print('Bilibili credentials loaded')

credential = Credential(sessdata=SESSDATA, bili_jct=BILI_JCT)
python
uploader = video_uploader.VideoUploader(
    pages=[page],
    meta=meta,
    credential=credential,
    cover=cover_path,
)

result = await uploader.start()

The quoted status message above is an English rendering of the original log text; the executable behavior is the credential loading and uploader construction shown by the code.

Technical Analysis

The uploader reads sessdata and bili_jct from a fixed, developer-specific credential path as soon as the module is imported. Credential access is therefore not confined to the point where an upload is explicitly confirmed.

The Skill's declared main functionality is local video dubbing with translation and optional vision API calls. Bilibili publication is not listed in the declared external_calls section and is not required to generate dubbed video. The helper consequently introduces authenticated account access beyond the minimum privileges required by the core Skill.

The fixed path also prevents users from clearly selecting or reviewing the credential source. Any process that imports this module in the expected environment causes the credential file to be read, even if it does not ultimately perform an upload.

The reviewed code does not directly print or transmit the raw credentials to an unrelated destination. The confirmed risk is unnecessary access to persistent account creden ...[truncated 1338 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove the uploader from the dubbing Skill or package it as a separate, explicitly installed integration.
  2. Declare Bilibili upload behavior, its network destination, and its required credentials in the Skill metadata.
  3. Move credential loading inside the upload action so importing the module has no sensitive side effects.
  4. Replace the hard-coded path with an explicit command-line option or a protected secret-store integration.
  5. Require an interactive confirmation that shows the account, video path, title, and destination immediately before upload.
  6. Check that the credential file has restrictive filesystem permissions.
  7. Avoid long-lived session cookies where short-lived or narrowly scoped authorization is available.
  8. Do not log credentials or API responses that may contain refreshed authentication data.
  9. Validate that the selected video is within a user-approved directory before uploading it.

T03 · Remote Payload Retrieval and Execution

Warning
Location
scripts/dubbing.py:334
Finding

Unpinned Remote Dependencies and Repository Code Are Imported and Executed

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:67-73, SKILL.md:231-234, README.md:8-12, scripts/dubbing.py:334-341
Vulnerability Type: Unpinned executable supply-chain dependencies
Risk Level: Medium

Vulnerable Code

bash
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
pip install openai-whisper soundfile scipy librosa requests

# VoxCPM obtained from the upstream repository
git clone https://github.com/modelscope/VoxCPM.git
bash
modelscope download --model modelscope/VoxCPM --local_dir ./VoxCPM
python
voxcpm_dir = Path(config['voxcpm_dir'])
sys.path.insert(0, str(voxcpm_dir))

print(f"\n[*] Loading VoxCPM...")
from voxcpm import VoxCPM

model = VoxCPM.from_pretrained(str(voxcpm_dir / "1.5"))

Technical Analysis

The installation instructions retrieve Python packages and the VoxCPM repository without exact versions, immutable commit hashes, or integrity hashes. The main script then inserts the downloaded VoxCPM directory at the beginning of sys.path and imports Python code from it.

Python imports execute module-level code. Therefore, the effective executable payload is not limited to the reviewed Skill package: it also includes whatever code exists in the selected VoxCPM directory at runtime. If an upstream branch changes, a dependency distribution is compromised, or the configured local directory is replaced, different code can execute without any modification to this Skill.

Placing the configured directory at index zero of sys.path also gives it import precedence. A malicious or compromised directory can potentially provide not only voxcpm, but other module names imported afterward.

The Bilibili helper additionally relies on bilibili_api, but the reviewed documentation does not pin or fully document that dependency.

Attack Path

  1. An attacker compromises an upstream package, repository branch, ...[truncated 1279 chars]
Remediation
View remediation

Remediation Suggestions

  1. Pin every Python dependency to a reviewed exact version.
  2. Use a lock file containing cryptographic hashes and install with hash verification.
  3. Pin VoxCPM to a reviewed immutable commit rather than cloning the current default branch.
  4. Verify repository commits or release artifacts using trusted signatures or checksums.
  5. Pin model artifacts to immutable revisions and validate downloaded file hashes.
  6. Run the Skill in an isolated virtual environment or container with restricted filesystem and network access.
  7. Avoid prepending broad user-configurable directories to sys.path; import from a validated installation instead.
  8. Validate ownership and permissions of VOXCPM_DIR before importing code from it.
  9. Document and pin the bilibili-api-python dependency if the uploader remains in the project.
  10. Establish a dependency update and security review process before changing pinned versions.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
Findings (47)

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

Critical
Category
Data Flow
Confidence
97% confidence
Finding

The skill sends a base64-encoded frame from the user's video to a remote vision API endpoint whose URL is environment/config-controlled, and it reuses the translation bearer token for authorization. This creates both a privacy leak of potentially sensitive visual content and a credential exfiltration path to attacker-chosen endpoints.

Content

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

python
vision_model = config.get('vision', {}).get('model', 'Qwen/Qwen2.5-VL-72B-Instruct')
    
    try:
        resp = requests.post(
            vision_url,
            headers={"Authorization": f"Bearer {translate_key}", "Content-Type": "application/json"},
            json={

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

Critical
Category
Data Flow
Confidence
98% confidence
Finding

The script sends transcript text derived from the user's audio to an external translation endpoint whose URL is configurable from environment variables. That creates undisclosed data exfiltration risk for potentially sensitive spoken content and can also leak the bearer token to an attacker-controlled service.

Content

Scanner excerpt · scripts/dubbing.py (reported line 255)May include surrounding context.

python
}
            
            try:
                resp = requests.post(api_url, headers=headers, json=data, timeout=60)
                result = resp.json()
                
                if 'choices' in result:

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

Critical
Category
Data Flow
Confidence
98% confidence
Finding

The per-sentence fallback translation path repeats the same external transmission and attacker-controlled endpoint problem as the batch path. Because it may send many individual segments, it can increase the volume of leaked sensitive content if misconfigured or abused.

Content

Scanner excerpt · scripts/dubbing.py (reported line 283)May include surrounding context.

python
for text in batch:
                for _ in range(3):
                    try:
                        resp = requests.post(
                            api_url,
                            headers={"Authorization": f"Bearer {api_key}", "Content-Type": "application/json"},
                            json={

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The documented inclusion of a Bilibili upload workflow adds an external publishing capability that is unrelated to the stated dubbing purpose and may use stored account credentials. Hidden or under-disclosed publishing functionality can lead to unauthorized content uploads, metadata disclosure, and user surprise about actions taken on third-party platforms.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The documented inclusion of a Bilibili upload workflow adds an external publishing capability that is unrelated to the stated dubbing purpose and may use stored account credentials. Hidden or under-disclosed publishing functionality can lead to unauthorized content uploads, metadata disclosure, and user surprise about actions taken on third-party platforms.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill documents capabilities consistent with file access, environment-variable use, shell execution, and network calls, but it does not declare any explicit tool scope or permissions boundary. This increases the chance of over-privileged execution and makes it harder for users or a runtime to enforce least privilege for a skill that handles local files and external APIs.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The trigger conditions are broad enough to match generic translation or localization requests, increasing the risk of unintended activation. Because the skill can process media, access files, and call external services, accidental invocation may expose user content or trigger actions the user did not specifically request.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The description repeatedly positions the skill as performing '中文配音' and converting foreign-language video into Chinese, but does not present this as a user-selectable locale option. Under the policy, forcing a specific language without opt-in can be a natural-language locale violation unless clearly justified as region-specific.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
89% confidence
Finding

The skill is configured to send data to an external API endpoint for translation, which is expected for the feature but still represents third-party data transmission. Because the skill processes media-derived text and possibly sensitive content, the risk depends on disclosure, consent, and minimization controls.

Content

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

md
endpoints:
  - name: TRANSLATE_API_URL
    description: 翻译API端点
    default: https://api.siliconflow.cn/v1/chat/completions
  - name: VISION_API_URL
    description: 硬字幕检测API端点(支持Vision模型)
    default: https://api.siliconflow.cn/v1/chat/completions

External Transmission

Medium
Category
Data Exfiltration
Confidence
89% confidence
Finding

The vision endpoint introduces another external transmission path for content related to subtitle detection. Even when legitimate, sending frames or derived video content to a remote service can disclose sensitive or copyrighted information if not explicitly disclosed and controlled.

Content

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

md
default: https://api.siliconflow.cn/v1/chat/completions
  - name: VISION_API_URL
    description: 硬字幕检测API端点(支持Vision模型)
    default: https://api.siliconflow.cn/v1/chat/completions
paths:
  - name: WORK_DIR
    description: 工作目录

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The documentation states that translation and vision APIs are called automatically during processing, but it does not clearly warn that user video/audio-derived content may be transmitted to third-party services. This creates a meaningful privacy and compliance risk, especially for copyrighted, personal, or confidential media.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
88% confidence
Finding

The sample configuration embeds an external translation API URL, confirming remote processing as part of normal operation. This is not inherently malicious, but without strong disclosure and consent it creates privacy, compliance, and data-handling risk for user media content.

Content

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

md
"voxcpm_dir": "./VoxCPM",
  "ffmpeg_path": "ffmpeg",
  "translate": {
    "api_url": "https://api.siliconflow.cn/v1/chat/completions",
    "api_key": "YOUR_API_KEY",
    "model": "tencent/Hunyuan-MT-7B"
  },

External Transmission

Medium
Category
Data Exfiltration
Confidence
88% confidence
Finding

The sample configuration also defines a remote vision API URL for subtitle detection, creating an additional outbound data path that users may not expect from a 'local' dubbing workflow. The danger is elevated by the mismatch between security claims and actual transmission behavior.

Content

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

md
"model": "tencent/Hunyuan-MT-7B"
  },
  "vision": {
    "api_url": "https://api.siliconflow.cn/v1/chat/completions",
    "model": "Qwen/Qwen2.5-VL-72B-Instruct"
  },
  "tts": {

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The file structure advertises a separate upload script that is not part of the stated dubbing/localization mission, signaling scope creep and hidden capability. Even if benign, bundling unrelated publication features in the same skill weakens user trust and can cause accidental invocation of risky actions.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

A documented Bilibili upload capability is not justified by the declared dubbing purpose, which makes the skill materially more dangerous than advertised. Users seeking local media processing may unknowingly expose content, account credentials, or publishing metadata to an external platform.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The documentation claims local operation for data security while also describing automatic calls to third-party translation and vision APIs. This contradiction can mislead users into sharing sensitive video/audio content under the false belief that processing stays local.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The description states this is a '中文配音' skill for '一键中文配音', which frames the skill as converting foreign-language videos into Chinese dubbing only. In a manifest, this natural-language positioning imposes a specific language/locale without indicating user choice, opt-in, or a justified region-specific constraint.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The header documentation lists 'BGM自动循环(交叉淡入淡出)' and '自动淡入淡出' as features. However, the actual filter_complex at L75-L78 only applies volume and amix; it does not use fade, acrossfade, or related filters, so the documented behavior materially contradicts the implementation.

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/add_bgm.py (reported line 34)May include surrounding context.

python
"ffprobe", "-v", "error", "-show_entries", "format=duration",
        "-of", "json", video_path
    ]
    result = subprocess.run(cmd, capture_output=True, text=True)
    data = json.loads(result.stdout)
    return float(data['format']['duration'])

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/add_bgm.py (reported line 93)May include surrounding context.

python
"ffprobe", "-v", "error", "-show_entries", "format=duration",
        "-of", "json", video_path
    ]
    result = subprocess.run(cmd, capture_output=True, text=True)
    data = json.loads(result.stdout)
    return float(data['format']['duration'])

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 · config.example.json (reported line 6)May include surrounding context.

json
"voxcpm_dir": os.environ.get('VOXCPM_DIR', './VoxCPM'),
    "ffmpeg_path": os.environ.get('FFMPEG_PATH', 'ffmpeg'),
    "translate": {
        "api_url": os.environ.get('TRANSLATE_API_URL', 'https://api.siliconflow.cn/v1/chat/completions'),
        "api_key": os.environ.get('TRANSLATE_API_KEY', ''),
        "model": os.environ.get('TRANSLATE_MODEL', 'tencent/Hunyuan-MT-7B')
    },

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 · config.example.json (reported line 11)May include surrounding context.

json
"voxcpm_dir": os.environ.get('VOXCPM_DIR', './VoxCPM'),
    "ffmpeg_path": os.environ.get('FFMPEG_PATH', 'ffmpeg'),
    "translate": {
        "api_url": os.environ.get('TRANSLATE_API_URL', 'https://api.siliconflow.cn/v1/chat/completions'),
        "api_key": os.environ.get('TRANSLATE_API_KEY', ''),
        "model": os.environ.get('TRANSLATE_MODEL', 'tencent/Hunyuan-MT-7B')
    },

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 · scripts/dubbing.py (reported line 31)May include surrounding context.

python
"voxcpm_dir": os.environ.get('VOXCPM_DIR', './VoxCPM'),
    "ffmpeg_path": os.environ.get('FFMPEG_PATH', 'ffmpeg'),
    "translate": {
        "api_url": os.environ.get('TRANSLATE_API_URL', 'https://api.siliconflow.cn/v1/chat/completions'),
        "api_key": os.environ.get('TRANSLATE_API_KEY', ''),
        "model": os.environ.get('TRANSLATE_MODEL', 'tencent/Hunyuan-MT-7B')
    },

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 · scripts/dubbing.py (reported line 36)May include surrounding context.

python
"voxcpm_dir": os.environ.get('VOXCPM_DIR', './VoxCPM'),
    "ffmpeg_path": os.environ.get('FFMPEG_PATH', 'ffmpeg'),
    "translate": {
        "api_url": os.environ.get('TRANSLATE_API_URL', 'https://api.siliconflow.cn/v1/chat/completions'),
        "api_key": os.environ.get('TRANSLATE_API_KEY', ''),
        "model": os.environ.get('TRANSLATE_MODEL', 'tencent/Hunyuan-MT-7B')
    },

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 · scripts/dubbing.py (reported line 122)May include surrounding context.

python
"voxcpm_dir": os.environ.get('VOXCPM_DIR', './VoxCPM'),
    "ffmpeg_path": os.environ.get('FFMPEG_PATH', 'ffmpeg'),
    "translate": {
        "api_url": os.environ.get('TRANSLATE_API_URL', 'https://api.siliconflow.cn/v1/chat/completions'),
        "api_key": os.environ.get('TRANSLATE_API_KEY', ''),
        "model": os.environ.get('TRANSLATE_MODEL', 'tencent/Hunyuan-MT-7B')
    },