All checks were successful
Deploy Development / deploy (push) Successful in 34s
Test Suite / pytest-backend (push) Successful in 23s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 7s
Test Suite / playwright-tests (push) Successful in 24s
- Added functions to determine production environment and OpenAPI exposure settings, improving API documentation control. - Updated FastAPI initialization to conditionally set OpenAPI and documentation URLs based on environment variables. - Refactored health check response to limit detail exposure in production environments, enhancing security. - Streamlined profile management by removing legacy ID retrieval and ensuring session-based profile access for security improvements.
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())
|