Repository navigation
chore(openapi): [main] update client/openapi/trustd.yaml - #1320
trustify-ci-bot[bot] wants to merge 1 commit into
Conversation
Reviewer's GuideSynchronizes the trustd OpenAPI specification with the updated service contract by adding capability/variant metadata and revising endpoint error responses from service-unavailable semantics to validation-style 422 responses. Sequence diagram for updated trustd endpoint error responsessequenceDiagram
participant Client
participant Trustd
Client->>Trustd: POST /api/v3/purl/recommend/report
alt endpoint disabled
Trustd-->>Client: 422 Unprocessable Entity
else package limit exceeded
Trustd-->>Client: 413 Content Too Large
end
Client->>Trustd: GET /api/v2/sbom/{key}/analyze
alt exploit intelligence not configured
Trustd-->>Client: 422 Unprocessable Entity
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="client/openapi/trustd.yaml" line_range="66" />
<code_context>
schema:
$ref: '#/components/schemas/RecommendResponse'
- '503':
+ '422':
description: Endpoint disabled — TRUSTD_RECOMMEND_PATTERNS not configured
deprecated: true
</code_context>
<issue_to_address>
**Unavailable recommendations stay enabled**
When `TRUSTD_RECOMMEND_PATTERNS` is not configured and the endpoint returns the documented 422, `useIsRecommendationEnabled` only recognizes 503 as disabled, so it returns true and `SbomToolbar` exposes recommendation actions whose requests fail.
Update `useIsRecommendationEnabled` to recognize the documented 422 response as disabled.
Also at `client/openapi/trustd.yaml:3011-3012`.
</issue_to_address>Sourcery assessment
Approval pending. 1 finding to address first.
Blocking findings: client/openapi/trustd.yaml:66
| schema: | ||
| $ref: '#/components/schemas/RecommendResponse' | ||
| '503': | ||
| '422': |
There was a problem hiding this comment.
🟡 Medium · Unavailable recommendations stay enabled
When TRUSTD_RECOMMEND_PATTERNS is not configured and the endpoint returns the documented 422, useIsRecommendationEnabled only recognizes 503 as disabled, so it returns true and SbomToolbar exposes recommendation actions whose requests fail.
Update useIsRecommendationEnabled to recognize the documented 422 response as disabled.
Also at client/openapi/trustd.yaml:3011-3012.
Prompt for AI agents
In `client/openapi/trustd.yaml` at line 66:
**Unavailable recommendations stay enabled**
When `TRUSTD_RECOMMEND_PATTERNS` is not configured and the endpoint returns the documented 422, `useIsRecommendationEnabled` only recognizes 503 as disabled, so it returns true and `SbomToolbar` exposes recommendation actions whose requests fail.
Update `useIsRecommendationEnabled` to recognize the documented 422 response as disabled.
Also at `client/openapi/trustd.yaml:3011-3012`.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1320 +/- ##
==========================================
- Coverage 60.10% 60.08% -0.02%
==========================================
Files 266 266
Lines 6286 6286
Branches 2083 2083
==========================================
- Hits 3778 3777 -1
- Misses 2274 2276 +2
+ Partials 234 233 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
a77e007 to
4110698
Compare
|
Needs adjustement, replaced with #1322 |
The openapi.yaml of trustify has changed
Summary by Sourcery
Synchronize the trustd client OpenAPI specification with the latest service contract.
New Features:
Enhancements: