MCPcopy Create free account
hub / github.com/commitizen-tools/commitizen / run_shell

Function run_shell

commitizen/cmd.py:95–105  ·  view source on GitHub ↗

Run a command string via the system shell (shell=True). Only use this for cases that intentionally require shell features (e.g., user-defined hooks with pipes/redirects). Never pass untrusted/user-controlled values into *cmd*. Related: CWE-78 (OS Command Injection), https://git

(cmd: str, env: Mapping[str, str] | None = None)

Source from the content-addressed store, hash-verified

93
94
95def run_shell(cmd: str, env: Mapping[str, str] | None = None) -> Command:
96 """Run a command string via the system shell (shell=True).
97
98 Only use this for cases that intentionally require shell features
99 (e.g., user-defined hooks with pipes/redirects). Never pass
100 untrusted/user-controlled values into *cmd*.
101
102 Related: CWE-78 (OS Command Injection),
103 https://github.com/commitizen-tools/commitizen/issues/1918
104 """
105 return _popen(cmd, shell=True, env=env)
106
107
108def run_interactive(

Callers

nothing calls this directly

Calls 1

_popenFunction · 0.85

Tested by

no test coverage detected