diff --git a/scripts/ci_pipeline.sh b/scripts/ci_pipeline.sh index 2ca8178..0c752f0 100644 --- a/scripts/ci_pipeline.sh +++ b/scripts/ci_pipeline.sh @@ -70,7 +70,7 @@ check "Backend Tests" "python3 -m pytest tests/ -x -q --tb=short 2>&1 | tail -5" check "Frontend Tests" "cd frontend && npx vitest run --reporter=verbose 2>&1 | tail -5" # ── 7. Security: SQL Injection Check ───────────────────────────────────────── -check "SQL Injection Check" "! grep -rn 'text(f"SELECT.*{' app/services/ --include='*.py' >/dev/null 2>&1" +check "SQL Injection Check" "! grep -rnE 'text[(]f.+SELECT' app/services/ --include='*.py' >/dev/null 2>&1" # ── 8. Security: Jinja2 Sandbox Check ───────────────────────────────────────── check "Jinja2 Sandbox Check" "! grep -rn 'Environment(' app/plugins/builtins/report_generator/ --include='*.py' | grep -v Sandboxed >/dev/null 2>&1" @@ -98,10 +98,14 @@ fi # ── 13. Dependency Scan (if pip-audit installed) ───────────────────────────── if command -v pip-audit &>/dev/null; then check "Dependency Scan (pip-audit)" "pip-audit -r requirements.txt --strict 2>&1 | tail -5" + check "Pip Consistency (pip check)" "pip check" else echo -e "${YELLOW}[CI] SKIP: Dependency Scan (pip-audit not installed)${NC}" fi +# ── 13b. Frontend Dependency Scan ───────────────────────────────────────────── +check "Frontend Dependency Scan (npm audit)" "cd frontend && npm audit --audit-level=high 2>&1 | tail -3" + # ── 14. Container Smoke Test (if Docker available) ─────────────────────────── if command -v docker &>/dev/null && [ -f Dockerfile ]; then check "Container Smoke Test" "curl -sk https://crm.media-on.de/api/v1/health 2>&1 | grep -q 'healthy'"