Back to skill

Security audit

Ai Video Gen Temp

Security checks for vulnerabilities and agentic risk

Overview

This video-generation skill is mostly purpose-aligned, but its third-party data handling and provider support are under-disclosed enough that users should review it before installing.

Review before installing. Use it only if you are comfortable storing AI-service keys in a .env file and sending prompts, narration, and media-related data to cloud providers. Treat Runway and ElevenLabs support as overstated in this version, run it in an isolated environment, avoid sensitive content, and prefer pinned dependencies before production use.

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

T08 · Insecure Dependencies

Warning
Location
requirements.txt:1
Finding

Unpinned Third-Party Dependencies Permit Unreviewed Package Updates

Content
View full analysis
=1.0.0 replicate>=0.20.0 requests>=2.31.0 pillow>=10.0.0 python-dotenv>=1.0.0 ``` The documentation also recommends installing these dependencies without version or integrity constraints: ```bash pip install openai requests pillow replicate python-dotenv ``` ### Technical Analysis Every dependency uses an open-ended lower-bound constraint. Consequently, installation can resolve to any future package version published under these package names. No lock file, upper version constraint, or package hash is provided to ensure that installed artifacts are the versions reviewed during this audit. Python packages can execute code during installation and whenever imported. This Skill imports these packages while API credentials are available in the process environment. A compromised package release, compromised maintainer account, or malicious transitive dependency could therefore execute code with the privileges of the user running the Skill. This does not demonstrate that the currently named packages are malicious. The vulnerability is the absence of reproducible and integrity-verified dependency resolution. ### Attack Path 1. An attacker compromises a dependency maintainer account, package release process, or transitive dependency. 2. The attacker publishes a malicious release whose version satisfies the open-ended `>=` constraint. 3. A user follows the documented installation command or runs `pip install -r requirements.txt`. 4. Package resolution selects the malicious release. 5. Attacker-controlled code executes during installation or when the package is imported. 6. The malicious code inherits the user's filesystem and network access and may read API keys loaded from the environment or `.env`. ### Impact Assessment Successful expl ...[truncated 421 chars]
Remediation
View remediation
replicate== requests== pillow== python-dotenv== ``` 2. Generate and commit a lock file that includes transitive dependencies. 3. Record cryptographic hashes and install with hash enforcement: ```bash python -m pip install --require-hashes -r requirements.txt ``` 4. Update the documentation so that it references only the locked requirements file rather than unconstrained package names. 5. Perform dependency updates through a controlled review process that includes vulnerability scanning, release-note review, and testing. 6. Install dependencies in an isolated virtual environment under a non-privileged account. 7. Avoid exposing production API credentials during dependency installation or first import validation. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
images_to_video.py:25
Finding

Predictable Temporary Manifest and Unescaped FFmpeg Concat Directives

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
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
Findings (31)

Tainted flow: 'image_url' from os.getenv (line 49, credential/environment) → requests.get (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · generate_video.py (reported line 53)May include surrounding context.

python
# Download image
        img_path = self.output_dir / f"image_{int(time.time())}.png"
        img_data = requests.get(image_url).content
        with open(img_path, 'wb') as f:
            f.write(img_data)

Tainted flow: 'headers' from os.getenv (line 94, credential/environment) → requests.post (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · generate_video.py (reported line 106)May include surrounding context.

python
"prompt": prompt or "animate this image"
        }
        
        response = requests.post(
            "https://api.lumalabs.ai/dream-machine/v1/generations",
            headers=headers,
            json=data

Tainted flow: 'headers' from os.getenv (line 94, credential/environment) → requests.get (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · generate_video.py (reported line 119)May include surrounding context.

python
# Poll for completion
        while True:
            status = requests.get(
                f"https://api.lumalabs.ai/dream-machine/v1/generations/{generation_id}",
                headers=headers
            ).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 · QUICK_START.md (reported line 16)May include surrounding context.

md
1. Go to https://lumalabs.ai
2. Sign up (has free tier!)
3. Get API key from dashboard

**Cost:** FREE for first 30 videos/month

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 · QUICK_START.md (reported line 26)May include surrounding context.

bash
cd skills/ai-video-gen
copy .env.example .env

Edit .env and add:

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 · README.md (reported line 28)May include surrounding context.

bash
cd skills/ai-video-gen
copy .env.example .env

Edit .env and add:

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 · README.md (reported line 29)May include surrounding context.

bash
copy .env.example .env
notepad .env

Minimum required:

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The code generally matches the stated primary purpose: generating videos from text prompts through image generation, video synthesis, optional voice-over, and FFmpeg-based combination. However, there is a material description-to-behavior mismatch in provider support. The description explicitly says it supports Runway, but the code does not implement Runway integration; the runway option only prints a warning and uses Luma instead. Also, while the description suggests support for multiple voice-over options, the implemented TTS is only via OpenAI, and ElevenLabs is not used despite an API key variable being present. There are no obvious undeclared malicious or unrelated capabilities, but the unsupported claimed integration is enough to flag a mismatch.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The README instructs users to configure external AI service API keys and use cloud providers for image, video, and voice generation, but it does not clearly warn that prompts, uploaded media, narration text, and possibly generated artifacts may be transmitted to third-party services. In a video-generation skill, users are likely to submit creative or sensitive content, so the lack of an explicit disclosure creates a real privacy and data-handling risk even if the documentation is otherwise legitimate.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill advertises and demonstrates operations that require environment access, network calls, shell execution, and file writes, but it declares no explicit tool scope or permission boundaries. This is dangerous because an agent or user cannot easily determine what capabilities the skill may exercise, increasing the risk of unintended command execution, secret exposure, or filesystem modification when the skill is invoked.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The setup and usage text encourages use of third-party AI services but does not warn that prompts, images, audio, or video may be transmitted to external providers. In a media-generation skill, users may submit sensitive or proprietary content; omission of this disclosure can lead to privacy, compliance, and data-handling risks because users may unknowingly exfiltrate content to external APIs.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The tool transmits user-supplied prompt and voiceover text to external AI providers without an explicit disclosure or confirmation step. In a video-generation skill, prompts and narration can easily contain sensitive business, personal, or unpublished creative material, so silent transmission increases privacy and compliance risk.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% 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 · generate_video.py (reported line 106)May include surrounding context.

python
"prompt": prompt or "animate this image"
        }
        
        response = requests.post(
            "https://api.lumalabs.ai/dream-machine/v1/generations",
            headers=headers,
            json=data

External Transmission

Medium
Category
Data Exfiltration
Confidence
80% 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 · generate_video.py (reported line 106)May include surrounding context.

python
"prompt": prompt or "animate this image"
        }
        
        response = requests.post(
            "https://api.lumalabs.ai/dream-machine/v1/generations",
            headers=headers,
            json=data

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 · generate_video.py (reported line 107)May include surrounding context.

python
}
        
        response = requests.post(
            "https://api.lumalabs.ai/dream-machine/v1/generations",
            headers=headers,
            json=data
        )

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 · generate_video.py (reported line 120)May include surrounding context.

python
}
        
        response = requests.post(
            "https://api.lumalabs.ai/dream-machine/v1/generations",
            headers=headers,
            json=data
        )

Tainted flow: 'generation_id' from requests.post (line 115, network input) → requests.get (network output)

Medium
Category
Data Flow
Confidence
65% confidence
Finding

Data from a source is assigned to a variable that is later passed to a sink, creating a variable-mediated taint flow.

Content

Scanner excerpt · generate_video.py (reported line 119)May include surrounding context.

python
# Poll for completion
        while True:
            status = requests.get(
                f"https://api.lumalabs.ai/dream-machine/v1/generations/{generation_id}",
                headers=headers
            ).json()

Tainted flow: 'video_url' from requests.get (line 125, network input) → requests.get (network output)

Medium
Category
Data Flow
Confidence
72% confidence
Finding

The code blindly fetches video_url obtained from prior network responses and writes the content to disk without validating the scheme, hostname, size, or content type. If the upstream API or an intermediary were compromised, this could be abused for unexpected outbound requests or to download oversized/malicious content, which is more concerning in a skill that automates external media handling.

Content

Scanner excerpt · generate_video.py (reported line 135)May include surrounding context.

python
# Download video
        video_path = self.output_dir / f"video_{int(time.time())}.mp4"
        video_data = requests.get(video_url).content
        with open(video_path, 'wb') as f:
            f.write(video_data)

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 · generate_video.py (reported line 180)May include surrounding context.

python
output_path
        ]
        
        result = subprocess.run(cmd, capture_output=True, text=True)
        
        if result.returncode != 0:
            raise Exception(f"FFmpeg error: {result.stderr}")

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The CLI advertises a Runway option but silently routes requests to LumaAI instead. This is a security-relevant transparency failure because user prompts and image content may be sent to a different external provider than the user selected, undermining consent, data handling expectations, and any provider-specific compliance assumptions.

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 · add_voiceover.py (reported line 70)May include surrounding context.

python
]
    
    try:
        result = subprocess.run(cmd, capture_output=True, text=True, check=True)
        print(f"✅ Video created: {output_path}")
        return output_path
    except subprocess.CalledProcessError as e:

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 · images_to_video.py (reported line 47)May include surrounding context.

python
]
    
    try:
        result = subprocess.run(cmd, capture_output=True, text=True, check=True)
        print(f"✅ Video created: {output_path}")
        return output_path
    except subprocess.CalledProcessError as e:

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

The file accesses several sensitive API keys from environment variables, but there is no warning in the CLI description, comments, or user-facing output explaining that the skill depends on and will use those credentials. For code files, access to sensitive environment variables should have some visible disclosure unless already clearly documented elsewhere.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
94% confidence
Finding

The dependency is specified with a lower bound only, which allows future unreviewed versions to be installed and prevents reproducible builds. While not immediately exploitable by itself, this weakens supply-chain control and can result in vulnerable or breaking releases being pulled into the environment.

Content

Scanner excerpt · requirements.txt (reported line 1)May include surrounding context.

text
openai>=1.0.0
replicate>=0.20.0
requests>=2.31.0
pillow>=10.0.0

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
94% confidence
Finding

Using replicate>=0.20.0 permits any newer version, making builds non-deterministic and reducing assurance that only tested dependency code will run. This increases supply-chain risk because a compromised or vulnerable upstream release could be installed without notice.

Content

Scanner excerpt · requirements.txt (reported line 2)May include surrounding context.

text
openai>=1.0.0
replicate>=0.20.0
requests>=2.31.0
pillow>=10.0.0
python-dotenv>=1.0.0