T09 · Insecure Skill Coding Practices
- Location
scripts/upscale_video.sh:134- Finding
Command Injection Through an Unsafe EXIT Trap
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This video upscaling skill has a coherent purpose, but its shell script and install steps create review-worthy local execution and supply-chain risks.
Install only if you are comfortable running third-party native video tools locally. Before use, fix or avoid the job_id trap issue, restrict activation to explicit video requests, and verify downloaded Real-ESRGAN and Waifu2x archives with trusted hashes or signatures.
scripts/upscale_video.sh:134Command Injection Through an Unsafe EXIT Trap
references/INSTALL.md:13Downloaded Native Executables Are Not Integrity-Verified
The manifest trigger phrases are broad, generic terms like "upscale," "enhance," and "improve quality" that can match many ordinary user requests without clearly constraining invocation to video-processing contexts. This increases the chance of accidental or inappropriate activation, which could cause the agent to route unrelated content or files into an external media-processing workflow unexpectedly.
The example prompts reinforce ambiguous activation behavior by using short, generic phrases like "Upscale this" and "Make this 4K" without clarifying that the target must be a video input. In isolation these phrases are common conversational requests, so they can contribute to over-triggering and accidental invocation of the skill.
The trigger list includes generic phrases such as "upscale," "enhance," and "improve quality," which can match many ordinary user requests outside the narrow intent of video upscaling. This raises the chance of unintended skill invocation, causing the agent to route unrelated prompts into a tool that may consume resources, mishandle user intent, or produce unsafe side effects in the wrong context.
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.
mkdir -p ~/video-tools/waifu2x-ncnn-vulkan
cd ~/video-tools/waifu2x-ncnn-vulkan
curl -L -o waifu2x.zip "https://github.com/nihui/waifu2x-ncnn-vulkan/releases/download/20220728/waifu2x-ncnn-vulkan-20220728-ubuntu.zip"
unzip waifu2x.zip
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.
Set these to point to your tool locations:
# Add to ~/.bashrc or ~/.zshrc
export VIDEO_UPSCALE_REALESRGAN="$HOME/video-tools/real-video-enhancer"
export VIDEO_UPSCALE_WAIFU2X="$HOME/video-tools/waifu2x-ncnn-vulkan/waifu2x-ncnn-vulkan-20220728-ubuntu"
export VIDEO_UPSCALE_CACHE="$HOME/.openclaw/cache/video-upscale"
No suspicious patterns detected.