Objective
Close the backend/frontend API contract gap so Live mode can use real data instead of mock fallback for core product pages.
Why this matters
The dashboard defines and calls several product-level endpoints that are not implemented in the current Flask API. Without these endpoints, the UI can look complete in demo mode but cannot become a true CSPM workflow in live mode.
Current backend endpoints
Implemented today:
- GET /health
- GET /api/findings
- GET /api/findings/
- GET /api/scans
- POST /api/scans/trigger
- GET /api/score
- GET /api/score/cve-summary
- GET /api/compliance/
- Current AI routes under /api/ai/...
Dashboard contract gaps
The frontend contract expects endpoints such as:
- GET /api/resources
- GET /api/findings//playbook
- GET /api/scans/<scan_id>
- GET /api/prioritization
- GET /api/drift
- GET /api/monitoring
- AI endpoints with names/semantics that may differ from the backend today
Recommended implementation order
- GET /api/scans/<scan_id> - needed for scan polling
- GET /api/resources - aggregate resources from findings and scan metadata
- GET /api/findings//playbook - expose remediation content from existing playbooks
- GET /api/prioritization - compute risk-ranked findings from severity, CVSS, exploit flags, and fix effort
- GET /api/monitoring - score trend and category distribution
- GET /api/drift - likely requires historical resource snapshots and may need a separate design issue
Files likely involved
- api/routes/
- api/models/finding.py
- api/app.py
- docs/api-reference.md
- frontend/API_ENDPOINTS.txt once the dashboard PR lands
- tests/
Acceptance criteria
Objective
Close the backend/frontend API contract gap so Live mode can use real data instead of mock fallback for core product pages.
Why this matters
The dashboard defines and calls several product-level endpoints that are not implemented in the current Flask API. Without these endpoints, the UI can look complete in demo mode but cannot become a true CSPM workflow in live mode.
Current backend endpoints
Implemented today:
Dashboard contract gaps
The frontend contract expects endpoints such as:
Recommended implementation order
Files likely involved
Acceptance criteria