Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
feat: add packages router and mock (CM-1218) #4185
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Uh oh!
There was an error while loading. Please reload this page.
feat: add packages router and mock (CM-1218) #4185
Changes from all commits
e4a431ec79f906File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
openVulnscan be fetched from theadvisoriestable:I'm imagining something like this for
openVulns:fixed_version IS NULL = unpatched). Otherwise, skip it for a raw count. -> Let's have all open vulns for now skipping version.
E.g. To check data
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's call this
stewardshipinstead of statusThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to return this in the response payload
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it will only be one value. So I would say to keep it as null for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Batch and detail stewardship mismatch
Medium Severity
For the same
purl,POST /packages:batch-stewardshipalways returnsstatus: unassignedwith empty stewards, whileGET /packages/:purlreturnsstewardship.status: escalatedwith stewards and activity. List-plus-drawer flows that merge batch summaries with detail will show conflicting stewardship state for one package.Additional Locations (1)
backend/src/api/public/v1/packages/getPackage.ts#L111-L119Reviewed by Cursor Bugbot for commit c79f906. Configure here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Batch never returns null entries
Medium Severity
The batch handler builds a stewardship object for every requested
purl, but the OpenAPI for this endpoint specifies unknown CDP packages map tonull(e.g.pkg:pypi/requests). Clients implementing merge logic against the spec cannot exercise missing-package handling with this mock.Reviewed by Cursor Bugbot for commit c79f906. Configure here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can discuss with Gasper but I would suggest to have a simpler endpoints/response payload. We would have a filter/query param in this endpoint by tab.
So by overview, assessment, security, provenance and history.
We would only return the needed data for each.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there are some inconsistencies with the design.
Latest version: https://linuxfoundation.slack.com/archives/C0B6TK0QJ00/p1780999390218909
Suggestion on how to return data:
If we split the response by tab, then we would return only the data points for each one of the objects
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lastActivityAt disagrees with activity
Low Severity
stewardship.lastActivityAtis fixed at2025-06-08T00:00:00Z, while the neweststewardship.activityentry usescreatedAtfromDate.now()minus one day. Those fields usually represent the same event but drift on every request and no longer match each other.Reviewed by Cursor Bugbot for commit c79f906. Configure here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add 2 extra endpoints:
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.