Compare commits
2
Commits
v0.5.1
..
8a82bde531
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8a82bde531 | ||
|
|
0e9e22da18 |
@@ -83,8 +83,12 @@ class TrueCloudPatchUpdateAlertSource(ThreadedAlertSource):
|
|||||||
# ── internals ────────────────────────────────────────────────────────────
|
# ── internals ────────────────────────────────────────────────────────────
|
||||||
|
|
||||||
def _git(self, *args):
|
def _git(self, *args):
|
||||||
return subprocess.run(
|
# List form, never shell=True, and every `args` value is a literal from
|
||||||
["git", "-C", PATCH_DIR, *args],
|
# this file -- nothing user-supplied reaches the command line. The partial
|
||||||
|
# `git` path is moot: this runs as root inside middlewared, so anyone who
|
||||||
|
# can poison PATH already has root.
|
||||||
|
return subprocess.run( # noqa: S603
|
||||||
|
["git", "-C", PATCH_DIR, *args], # noqa: S607
|
||||||
capture_output=True, text=True, timeout=_TIMEOUT, check=True,
|
capture_output=True, text=True, timeout=_TIMEOUT, check=True,
|
||||||
).stdout
|
).stdout
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user