subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
# 不传不存在的 background 参数,避免把旧版 Ainote 约定误传给 Doxent。 # CLI 由 Skill 作为后台服务唤醒,不能继承 Codex/Agent 的控制台;登录页由 CLI # 自己打开浏览器,控制台窗口对用户没有价值,反而会造成误以为需要手工操作。 subprocess.Popen(command, stdin=subprocess.DEVNULL, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, close_fds=True, creationflags=hidden_creation_flags(new_process_group=True), env=cli_environment(), shell=False) return True except (OSError, subprocess.SubprocessError): # 一个候选入口失败时继续尝试安装目录中的其他入口。- Confidence
- 88% confidence
- Finding
- The code launches a local executable discovered from environment variables, config files, and filesystem locations, and may also auto-download and execute a new binary. Although shell=False avoids classic shell injection, executing an untrusted or attacker-planted binary still yields arbitrary code execution in the user's context.
