33 lines
704 B
Python
33 lines
704 B
Python
|
|
#!/usr/bin/env python3
|
||
|
|
"""
|
||
|
|
CI-Sicherheitschecks: schlanke pytest-Sammlung ohne Integrations-DB.
|
||
|
|
|
||
|
|
Repo-Root ist egal — arbeitet relativ zu diesem Script (backend/).
|
||
|
|
|
||
|
|
Usage (aus backend/):
|
||
|
|
python scripts/security_release_checks.py
|
||
|
|
"""
|
||
|
|
from __future__ import annotations
|
||
|
|
|
||
|
|
import subprocess
|
||
|
|
import sys
|
||
|
|
from pathlib import Path
|
||
|
|
|
||
|
|
|
||
|
|
def main() -> int:
|
||
|
|
root = Path(__file__).resolve().parents[1]
|
||
|
|
test_file = root / "tests" / "test_security_release.py"
|
||
|
|
cmd = [
|
||
|
|
sys.executable,
|
||
|
|
"-m",
|
||
|
|
"pytest",
|
||
|
|
str(test_file),
|
||
|
|
"-v",
|
||
|
|
"--tb=short",
|
||
|
|
]
|
||
|
|
return subprocess.run(cmd, cwd=str(root)).returncode
|
||
|
|
|
||
|
|
|
||
|
|
if __name__ == "__main__":
|
||
|
|
raise SystemExit(main())
|