Skip to content

fix: sanitize subprocess call in init_agent.py#263

Open
orbisai0security wants to merge 1 commit intoshareAI-lab:mainfrom
orbisai0security:fix-shell-injection-init-agent-v001
Open

fix: sanitize subprocess call in init_agent.py#263
orbisai0security wants to merge 1 commit intoshareAI-lab:mainfrom
orbisai0security:fix-shell-injection-init-agent-v001

Conversation

@orbisai0security
Copy link
Copy Markdown

Summary

Fix critical severity security issue in skills/agent-builder/scripts/init_agent.py.

Vulnerability

Field Value
ID V-001
Severity CRITICAL
Scanner multi_agent_ai
Rule V-001
File skills/agent-builder/scripts/init_agent.py:66
CWE CWE-78

Description: The agent builder script passes user-controlled command strings directly to subprocess.run() with shell=True at two locations (lines 66 and 136). The command values originate from agent or user input (b.input["command"] and args["command"]) and are not sanitized, validated, or restricted before execution. When shell=True is used, the operating system shell interprets the entire string, enabling injection of shell metacharacters such as semicolons, pipes, backticks, and command substitution sequences. An attacker who can influence the command string — either directly via CLI input or by crafting a prompt that causes the LLM to invoke the command tool with a malicious payload — can execute arbitrary OS commands.

Changes

  • skills/agent-builder/scripts/init_agent.py

Verification

  • Build passes
  • Scanner re-scan confirms fix
  • LLM code review passed

Automated security fix by OrbisAI Security

Automated security fix generated by Orbis Security AI
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 30, 2026

@orbisai0security is attempting to deploy a commit to the crazyboym's projects Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant