os.system() or os exec-family call
High
- Category
- Dangerous Code Execution
- Content
def _execute_clawhub_cmd(self, cmd: str) -> str: """Execute ClawHub CLI command""" try: result = os.popen(cmd).read().strip() return result except Exception as e: print(f"❌ Error executing command: {e}")- Confidence
- 98% confidence
- Finding
- The code executes shell commands via `os.popen(cmd)` with a string command, which invokes a shell and creates command-injection risk if any part of `cmd` is influenced by user input. In this file, `cmd` is later built using user-controlled `slug` values, so an attacker could inject arbitrary shell metacharacters and execute unintended commands on the host.
