T09 · Insecure Skill Coding Practices
- Location
scripts/run_command.sh:7- Finding
Local Python Code Injection Through Unsafe Heredoc Interpolation
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill has a legitimate E2B desktop-control purpose, but its shell wrappers can execute injected local Python code and its VNC streaming is unauthenticated by default.
Review before installing. Use this only in an isolated environment, avoid passing untrusted or raw model-generated strings to the scripts, prefer authenticated streaming, avoid displaying secrets in the sandbox desktop, and pin/review the e2b-desktop dependency. The issues look like serious unsafe implementation choices, not artifact-backed deception or intentional exfiltration.
scripts/run_command.sh:7Local Python Code Injection Through Unsafe Heredoc Interpolation
scripts/stream_start.sh:8Unauthenticated VNC Desktop Streaming Enabled by Default
SKILL.md:10Unpinned Third-Party Dependency Installation
scripts/start_sandbox.sh:45Sandbox State File Created Without Explicit Permission or Symlink Protections
The skill exposes meaningful capabilities around environment handling and persistent state (E2B_API_KEY, ~/.e2b_state) but does not declare any explicit tool scope or permission boundaries. In an agent setting, missing scope declarations can cause the skill to be invoked with broader-than-expected access, making misuse or accidental data handling harder to control and audit.
The skill is explicitly designed to capture screenshots and stream a live VNC view, which can expose any sensitive data displayed in the sandbox, including credentials, tokens, documents, or user activity. Without a clear warning or consent guidance, downstream users or agents may enable visual capture in contexts where on-screen data should not be recorded or shared.
The documented run_command.sh interface allows arbitrary shell command execution inside the sandbox, which is inherently dangerous because it can download malware, exfiltrate data available in the sandbox, or pivot through any credentials or network access present there. Although command execution is central to the skill's purpose, the lack of an explicit warning or usage constraints makes accidental or unsafe use more likely in autonomous agent workflows.
The script persists the sandbox identifier in a predictable file under ~/.e2b_state, creating session state that can be reused by other local processes or later invocations. In a computer-use skill that manages remote desktop sandboxes, this increases the chance of unintended sandbox reuse, cross-task state leakage, or unauthorized interaction if another process or user on the same host can read or overwrite that file.
#!/usr/bin/env bash
# start_sandbox.sh - Create a new E2B Desktop sandbox
# Usage: start_sandbox.sh [--resolution WxH] [--timeout SECS] [--stream]
#
# Outputs sandbox ID and optionally stream URL.
The script starts with authentication disabled by default and only enables protection when the caller explicitly passes --auth. In a skill whose purpose is to expose and control a live desktop/VNC stream, this increases the chance that an operator or automation forgets to require auth, potentially exposing the sandbox session URL to unauthorized viewers or controllers depending on how the backend stream service is configured.
set -e
AUTH=false
while [[ $# -gt 0 ]]; do
case "$1" in
--auth) AUTH=true; shift ;;
The script prints f"Waited {$MS}ms" inside Python, but $MS is shell-style syntax, not valid Python f-string interpolation. This contradicts the apparent intent of the surrounding code and comment, because the message implies it will report the waited duration even though it will instead print a literal or malformed value rather than the actual milliseconds.
No suspicious patterns detected.