T09 · Insecure Skill Coding Practices
- Location
scripts/with_server.py:69- Finding
Server Child Processes May Survive Lifecycle Cleanup
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill is a disclosed Playwright webapp testing helper, but users should treat its server-launch helper as trusted local command execution.
Install only if you are comfortable with a testing helper that can run local commands you provide, such as npm run dev or backend startup scripts. Review the exact --server commands, use it only in trusted workspaces, and check for leftover server processes after runs.
scripts/with_server.py:69Server Child Processes May Survive Lifecycle Cleanup
The declared description frames the skill as Playwright-based webapp testing, but the documented behavior includes starting arbitrary shell commands, waiting on ports, and executing follow-up commands. That mismatch is dangerous because users or orchestration systems may trust the skill as a limited browser-testing utility while it actually has broader process-execution capability that could be abused to run unintended local commands.
Because the tool's purpose is to orchestrate local webapp testing, it is likely to be run in developer environments with access to source code, secrets, SSH keys, and browser session data; this context increases the blast radius of shell-based parameter injection. A malicious project, test configuration, or copied command line could abuse --server to run arbitrary payloads while appearing to start a dev server.
print(f"Starting server {i+1}/{len(servers)}: {server['cmd']}")
# Use shell=True to support commands with cd and &&
process = subprocess.Popen(
server['cmd'],
shell=True,
stdout=subprocess.PIPE,
Because the tool's purpose is to orchestrate local webapp testing, it is likely to be run in developer environments with access to source code, secrets, SSH keys, and browser session data; this context increases the blast radius of shell-based parameter injection. A malicious project, test configuration, or copied command line could abuse --server to run arbitrary payloads while appearing to start a dev server.
print(f"Starting server {i+1}/{len(servers)}: {server['cmd']}")
# Use shell=True to support commands with cd and &&
process = subprocess.Popen(
server['cmd'],
shell=True,
stdout=subprocess.PIPE,
The skill exposes shell execution and file-writing capabilities without declaring any explicit tool scope or permission boundaries. In an agent environment, this creates ambiguity about what the skill is allowed to do and increases the chance that a caller will invoke powerful operations without adequate review or sandboxing.
The script passes a caller-controlled string directly to subprocess.Popen with shell=True, allowing shell metacharacters, command substitution, and chaining operators to be interpreted. If an attacker can influence the --server value, they can execute arbitrary OS commands under the privileges of the script, which is especially risky in an automation/testing tool that routinely launches local services.
print(f"Starting server {i+1}/{len(servers)}: {server['cmd']}")
# Use shell=True to support commands with cd and &&
process = subprocess.Popen(
server['cmd'],
shell=True,
stdout=subprocess.PIPE,
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
# Run the command
print(f"Running: {' '.join(args.command)}\n")
result = subprocess.run(args.command)
sys.exit(result.returncode)
finally:
The script saves screenshots to /mnt/user-data/outputs at L17 and L29, which is a file-write operation affecting user-accessible storage. While comments describe taking screenshots, there is no user-facing prompt, warning, or disclosure that image files will be created.