ciguard: Web UI is missing HTTP defence-in-depth headers
ciguard's FastAPI Web UI (src/ciguard/web/app.py) does not set HTTP defence-in-depth headers. OWASP ZAP baseline scan flagged 11 alerts: missing Content-Security-Policy (Medium), X-Frame-Options (Medium), Sub-Resource-Integrity on /api/docs (Medium), COOP / COEP / CORP (Low), Permissions-Policy (Low), X-Content-Type-Options (Low).
For local-only deployment (current intent): minimal — there's no untrusted browser context, no third-party hosting, no auth surface to protect.
For public hosting (PRD Slice 9 GitHub App or hosted dashboard, future): each missing header reduces a defence layer:
SecurityHeadersMiddleware at src/ciguard/web/security_headers.py injecting: X-Content-Type-Options nosniff, X-Frame-Options DENY, Referrer-Policy no-referrer, Permissions-Policy interest-cohort=(), Cross-Origin-Opener-Policy same-origin, Cross-Origin-Resource-Policy same-origin, plus per-path CSP with /api/docs + /api/redoc carve-out for cdn.jsdelivr.net (Swagger UI / ReDoc dependency).app.add_middleware(SecurityHeadersMiddleware).tests/test_web.py::TestSecurityHeaders.Found by OWASP ZAP baseline scan during ciguard's first self-conducted pentest cycle, 2026-04-26.
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N — 4.3 (Medium per v3.1 thresholds)CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N — first.org calc 4.3 (Low); GitHub's calc 2.1 (Low). All consistent at Low/borderline.$ curl -sI http://127.0.0.1:8080/ | grep -E '^(X-Frame|X-Content|Referrer|Permissions|Cross-Origin|Content-Security):'
# Pre-fix: empty
# Post-fix: 7 headers present
왜 이 VPI인가 (설명가능 · 실험적)
VPI 산정 기준
| 영향도 | 43.00 |
| 악용 신호(추가 악용신호 없음) | ×1.00 |
| VPI | 43.00 |
VPI 공식 vpi-v1 기준