Skip to content

fix: sanitize subprocess call in rename.py#709

Open
orbisai0security wants to merge 1 commit into
TexasInstruments:masterfrom
orbisai0security:fix-v-001-command-injection-rename-py
Open

fix: sanitize subprocess call in rename.py#709
orbisai0security wants to merge 1 commit into
TexasInstruments:masterfrom
orbisai0security:fix-v-001-command-injection-rename-py

Conversation

@orbisai0security
Copy link
Copy Markdown

Summary

Fix critical severity security issue in bin/rename.py.

Vulnerability

Field Value
ID V-001
Severity CRITICAL
Scanner multi_agent_ai
Rule V-001
File bin/rename.py:89
CWE CWE-78

Description: The bin/rename.py script constructs a shell command using user-supplied input (filenames or CLI arguments parsed at line 258) and passes the resulting 'command' variable to subprocess.run at line 89. If the command variable is assembled as a string rather than a list, or if shell=True is set, shell metacharacters embedded in user-supplied filenames or arguments will be interpreted by the OS shell, enabling arbitrary command execution. This is a classic OS command injection pattern (CWE-78).

Changes

  • bin/rename.py

Verification

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

Automated security fix by OrbisAI Security

Copy link
Copy Markdown
Member

@cshilwant cshilwant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please plan to address - https://github.com/TexasInstruments/processor-sdk-doc/actions/runs/25904782328/job/76183895662?pr=709

Error: # Commit-Check ❌
Commit rejected by Commit-Check.                                  
                                                                  
  (c).-.(c)    (c).-.(c)    (c).-.(c)    (c).-.(c)    (c).-.(c)  
   / ._. \      / ._. \      / ._. \      / ._. \      / ._. \   
 __\( C )/__  __\( H )/__  __\( E )/__  __\( C )/__  __\( K )/__ 
(_.-/'-'\-._)(_.-/'-'\-._)(_.-/'-'\-._)(_.-/'-'\-._)(_.-/'-'\-._)
   || E ||      || R ||      || R ||      || O ||      || R ||   
 _.' '-' '._  _.' '-' '._  _.' '-' '._  _.' '-' '._  _.' '-' '._ 
(.-./`-´\.-.)(.-./`-´\.-.)(.-./`-´\.-.)(.-./`-´\.-.)(.-./`-´\.-.)
 `-´     `-´  `-´     `-´  `-´     `-´  `-´     `-´  `-´     `-´ 
                                                                  
Commit rejected.                                                  
                                                                  
Type author_name check failed ==> orbisai0security 
The committer name seems invalid
Suggest: git config user.name 'Your Name'

Automated security fix generated by Orbis Security AI

Signed-off-by: orbisai0security <mediratta01.pally@gmail.com>
@orbisai0security orbisai0security force-pushed the fix-v-001-command-injection-rename-py branch from e6d9038 to b3aa25e Compare May 16, 2026 01:13
@orbisai0security
Copy link
Copy Markdown
Author

please plan to address - https://github.com/TexasInstruments/processor-sdk-doc/actions/runs/25904782328/job/76183895662?pr=709

Error: # Commit-Check ❌
Commit rejected by Commit-Check.                                  
                                                                  
  (c).-.(c)    (c).-.(c)    (c).-.(c)    (c).-.(c)    (c).-.(c)  
   / ._. \      / ._. \      / ._. \      / ._. \      / ._. \   
 __\( C )/__  __\( H )/__  __\( E )/__  __\( C )/__  __\( K )/__ 
(_.-/'-'\-._)(_.-/'-'\-._)(_.-/'-'\-._)(_.-/'-'\-._)(_.-/'-'\-._)
   || E ||      || R ||      || R ||      || O ||      || R ||   
 _.' '-' '._  _.' '-' '._  _.' '-' '._  _.' '-' '._  _.' '-' '._ 
(.-./`-´\.-.)(.-./`-´\.-.)(.-./`-´\.-.)(.-./`-´\.-.)(.-./`-´\.-.)
 `-´     `-´  `-´     `-´  `-´     `-´  `-´     `-´  `-´     `-´ 
                                                                  
Commit rejected.                                                  
                                                                  
Type author_name check failed ==> orbisai0security 
The committer name seems invalid
Suggest: git config user.name 'Your Name'

addressed this. pls review.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants