fix: sanitize subprocess call in init_agent.py#263
Open
orbisai0security wants to merge 1 commit intoshareAI-lab:mainfrom
Open
fix: sanitize subprocess call in init_agent.py#263orbisai0security wants to merge 1 commit intoshareAI-lab:mainfrom
orbisai0security wants to merge 1 commit intoshareAI-lab:mainfrom
Conversation
Automated security fix generated by Orbis Security AI
|
@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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix critical severity security issue in
skills/agent-builder/scripts/init_agent.py.Vulnerability
V-001skills/agent-builder/scripts/init_agent.py:66Description: 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.pyVerification
Automated security fix by OrbisAI Security