feat: add new 4 endpoints (CM-1236)#4218
Conversation
There was a problem hiding this comment.
Pull request overview
Adds OSSPREY Admin Dashboard V2 backend support by introducing new Auth0-protected /v1/ossprey/* public API endpoints plus DAL query helpers for metrics, package list/scatter, and stewardship activity feed.
Changes:
- Added
/v1/osspreyrouter with endpoints for metrics, packages list, scatter data, and activity feed. - Extended the packages DAL to support new filters (
vulnSeverity=none), richer package list rows (stewards + last activity), and scatter-point aggregation. - Added a stewardship activity feed DAL query with pagination total support.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| services/libs/data-access-layer/src/osspckgs/stewardships.ts | Adds DAL method to list stewardship activity feed rows with total count. |
| services/libs/data-access-layer/src/osspckgs/api.ts | Adds OSSPREY metrics + scatter DAL, new severity filter, health band helper, and optional joins for stewards/last activity. |
| backend/src/api/public/v1/packages/listPackages.ts | Extends vulnSeverity query enum to include none. |
| backend/src/api/public/v1/ossprey/packageScatter.ts | New /v1/ossprey/packages/scatter handler returning scatter points. |
| backend/src/api/public/v1/ossprey/packageList.ts | New /v1/ossprey/packages handler with filtering + status counts. |
| backend/src/api/public/v1/ossprey/metrics.ts | New /v1/ossprey/metrics handler. |
| backend/src/api/public/v1/ossprey/index.ts | Registers OSSPREY public v1 routes under /v1/ossprey. |
| backend/src/api/public/v1/ossprey/activityFeed.ts | New /v1/ossprey/activity handler backed by DAL activity feed query. |
| backend/src/api/public/v1/index.ts | Mounts /v1/ossprey behind existing Auth0 middleware. |
| backend/src/api/ossprey/packageScatter.ts | Adds legacy /ossprey/packages/scatter handler. |
| backend/src/api/ossprey/packageList.ts | Adds legacy /ossprey/packages handler. |
| backend/src/api/ossprey/openapi.yaml | Adds an OpenAPI spec for legacy /ossprey/* endpoints. |
| backend/src/api/ossprey/metrics.ts | Adds legacy /ossprey/metrics handler. |
| backend/src/api/ossprey/index.ts | Adds legacy /ossprey/* route registration module. |
| backend/src/api/ossprey/activityFeed.ts | Adds legacy /ossprey/activity handler. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
There are 3 total unresolved issues (including 1 from previous review).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit e9817dc. Configure here.
Signed-off-by: Umberto Sgueglia <usgueglia@contractor.linuxfoundation.org>
Signed-off-by: Umberto Sgueglia <usgueglia@contractor.linuxfoundation.org>
Signed-off-by: Umberto Sgueglia <usgueglia@contractor.linuxfoundation.org>
Signed-off-by: Umberto Sgueglia <usgueglia@contractor.linuxfoundation.org>
eba4c0b to
06fd0a8
Compare

Summary
Implements the backend query and aggregation endpoints needed to power the three main OSSPREY Admin Dashboard V2 views: Overview, Triage Board, and Risk Matrix (CM-1235 scope extension). All endpoints are mounted under GET /v1/ossprey/ and protected by Auth0 JWT via the existing oauth2Middleware.
Changes
Type of change
JIRA ticket
Ticket
Note
Medium Risk
New authenticated read surface over stewardship and package aggregates, including a non-paginated scatter query that could be heavy at ~2k rows; no write-path changes.
Overview
Adds Auth0-protected
GET /v1/ossprey/*routes for OSSPREY Admin Dashboard V2: metrics (KPI bar), packages (filtered list +statusCounts), packages/scatter (risk matrix), and activity (paginated stewardship feed), plus an OpenAPI spec for those paths.The data-access layer gains
getOsspreyMetrics,listPackagesForScatter,computeHealthBand, andlistStewardshipActivity, and extendslistPackagesForApiwith optional steward/last-activity joins,maxVulnSeverity, andvulnSeverity=none(aligned on existing/v1/packagesquery validation). OSSPREY package list responses addhealthBandand richer row fields; activityactorNamestill mirrorsactorUserIduntil cross-DB name resolution exists.Reviewed by Cursor Bugbot for commit 06fd0a8. Bugbot is set up for automated code reviews on this repo. Configure here.