Initial code commit
CI / test (3.11) (push) Canceled after 0s
CI / test (3.12) (push) Canceled after 0s
CI / test (3.13) (push) Canceled after 0s
CI / test (3.14) (push) Canceled after 0s
CI / package (push) Canceled after 0s
CI / precommit-and-security (push) Canceled after 11s
CI / typecheck (push) Canceled after 11s

This commit is contained in:
2026-09-25 11:16:19 +01:00
parent 427daa7f1a
commit aded37d491
64 changed files with 8201 additions and 24 deletions
View File
+33
View File
@@ -0,0 +1,33 @@
from __future__ import annotations
from pathlib import Path
SRC = Path(__file__).resolve().parents[2] / "src" / "schedls"
def test_no_shell_true_in_production_code() -> None:
offenders = []
for path in SRC.rglob("*.py"):
text = path.read_text()
if "subprocess" in text and "shell=True" in text:
offenders.append(str(path))
assert offenders == []
def test_subprocess_confined_to_runner() -> None:
offenders = []
for path in SRC.rglob("*.py"):
if "import subprocess" in path.read_text() and path.name != "runner.py":
offenders.append(str(path))
assert offenders == []
def test_runner_explicitly_disables_shell() -> None:
assert "shell=False" in (SRC / "runner.py").read_text()
def test_no_os_system_or_popen() -> None:
for path in SRC.rglob("*.py"):
text = path.read_text()
assert "os.system(" not in text, path
assert "os.popen(" not in text, path