Skip to content

chore(openapi): [main] update client/openapi/trustd.yaml - #1187

Open
trustify-ci-bot[bot] wants to merge 2 commits into
mainfrom
create-pull-request/patch-ea8c3dc
Open

chore(openapi): [main] update client/openapi/trustd.yaml#1187
trustify-ci-bot[bot] wants to merge 2 commits into
mainfrom
create-pull-request/patch-ea8c3dc

Conversation

@trustify-ci-bot

@trustify-ci-bot trustify-ci-bot Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

The openapi.yaml of trustify has changed

Summary by Sourcery

Update Trustd OpenAPI specification for the new release, adding Exploit Intelligence APIs and NVD support.

New Features:

  • Add Exploit Intelligence analysis APIs for creating, listing, and retrieving CVE/SBOM analysis jobs.
  • Introduce schema definitions for Exploit Intelligence jobs, findings, component results, and pagination responses.
  • Add NVD as a supported advisory source and define an NVD importer configuration schema.

Enhancements:

  • Bump Trustd API version from 0.5.0-rc.1 to 0.6.0-rc.1 in the OpenAPI spec.

Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@sourcery-ai

sourcery-ai Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Reviewer's Guide

Updates the trustd OpenAPI spec to version 0.6.0-rc.1, adding Exploit Intelligence job APIs and related schemas, plus NVD importer/advisory support.

Sequence diagram for Exploit Intelligence job lifecycle APIs

sequenceDiagram
  actor Client
  participant trustd_api

  Client->>trustd_api: analyzeExploitIntelligence(AnalyzeRequest)
  trustd_api-->>Client: AnalyzeResponse (201 or 200)

  Client->>trustd_api: listExploitIntelligenceJobs(q, sort, offset, limit, total)
  trustd_api-->>Client: PaginatedResults_ExploitIntelligenceJobSummary

  Client->>trustd_api: getExploitIntelligenceJob(id)
  trustd_api-->>Client: ExploitIntelligenceJobDetails (200 or 404)
Loading

File-Level Changes

Change Details Files
Bump trustd API version and extend advisory type lists to include NVD.
  • Update OpenAPI info.version from 0.5.0-rc.1 to 0.6.0-rc.1.
  • Add 'nvd' as a valid advisory type in multiple path parameter enums.
  • Extend advisory-related component enums to recognize NVD as a source.
client/openapi/trustd.yaml
Introduce Exploit Intelligence analysis job APIs for CVE vs SBOM analysis.
  • Add POST /api/v3/exploit-intelligence/analyze endpoint to trigger or retrieve analysis jobs with AnalyzeRequest/AnalyzeResponse payloads.
  • Add GET /api/v3/exploit-intelligence/jobs endpoint with query/sort/pagination parameters returning PaginatedResults_ExploitIntelligenceJobSummary.
  • Add GET /api/v3/exploit-intelligence/jobs/{id} endpoint to fetch ExploitIntelligenceJobDetails by job id.
client/openapi/trustd.yaml
Define Exploit Intelligence job and component data models, plus NVD importer configuration schema.
  • Add AnalyzeRequest and AnalyzeResponse schemas for starting EI jobs and returning basic status.
  • Add ExploitIntelligenceFinding enum and ExploitIntelligenceJobStatus enum to model analysis outcomes and lifecycle states.
  • Add ComponentResult, ExploitIntelligenceJobDetails, ExploitIntelligenceJobSummary, and PaginatedResults_ExploitIntelligenceJobSummary schemas to represent job metadata and per-component results.
  • Add NvdImporter schema and wire it into the importer union, including configuration for source URL and years/startYear options.
client/openapi/trustd.yaml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've found 1 issue, and left some high level feedback:

  • The q parameter description and examples for /api/v3/exploit-intelligence/jobs reference advisories and fields like title/modified that don't match the allowed fields (id, sbom_id, vulnerability_id, status, created, updated); consider updating this text to align with the actual schema for jobs.
  • For timestamp properties like created and updated across the new Exploit Intelligence schemas, consider adding an explicit format: date-time to make the expected value more precise for clients and tooling.
  • The PaginatedResults_ExploitIntelligenceJobSummary.items schema inlines the job summary structure instead of referencing ExploitIntelligenceJobSummary; reusing the existing component via $ref would reduce duplication and keep the definitions consistent.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The `q` parameter description and examples for `/api/v3/exploit-intelligence/jobs` reference advisories and fields like `title`/`modified` that don't match the allowed fields (`id`, `sbom_id`, `vulnerability_id`, `status`, `created`, `updated`); consider updating this text to align with the actual schema for jobs.
- For timestamp properties like `created` and `updated` across the new Exploit Intelligence schemas, consider adding an explicit `format: date-time` to make the expected value more precise for clients and tooling.
- The `PaginatedResults_ExploitIntelligenceJobSummary.items` schema inlines the job summary structure instead of referencing `ExploitIntelligenceJobSummary`; reusing the existing component via `$ref` would reduce duplication and keep the definitions consistent.

## Individual Comments

### Comment 1
<location path="client/openapi/trustd.yaml" line_range="4862-4871" />
<code_context>
         message:
           type: string
           description: A human-readable error message
+    ExploitIntelligenceFinding:
+      type: string
+      description: |-
+        Analysis finding from the Exploit Intelligence service.
+
+        Represents the outcome of a vulnerability analysis for a given component/CVE pair.
+      enum:
+      - vulnerable
+      - not_vulnerable
+      - uncertain
+    ExploitIntelligenceJobDetails:
+      type: object
</code_context>
<issue_to_address>
**nitpick:** Descriptions for component count fields reference capitalized finding names that don't match the enum values.

The `ExploitIntelligenceFinding` enum uses lowercase values (`vulnerable`, `not_vulnerable`, `uncertain`), but the `*_components` field descriptions reference `NotVulnerable`, `Vulnerable`, and `Uncertain`. Please update the descriptions to match the enum values (e.g., "components with `finding=not_vulnerable`") to avoid ambiguity for clients.
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment on lines +4862 to +4871
ExploitIntelligenceFinding:
type: string
description: |-
Analysis finding from the Exploit Intelligence service.

Represents the outcome of a vulnerability analysis for a given component/CVE pair.
enum:
- vulnerable
- not_vulnerable
- uncertain

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick: Descriptions for component count fields reference capitalized finding names that don't match the enum values.

The ExploitIntelligenceFinding enum uses lowercase values (vulnerable, not_vulnerable, uncertain), but the *_components field descriptions reference NotVulnerable, Vulnerable, and Uncertain. Please update the descriptions to match the enum values (e.g., "components with finding=not_vulnerable") to avoid ambiguity for clients.

@codecov

codecov Bot commented Aug 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 54.09%. Comparing base (a95edb9) to head (d2b43a3).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1187   +/-   ##
=======================================
  Coverage   54.09%   54.09%           
=======================================
  Files         250      250           
  Lines        5638     5638           
  Branches     1748     1748           
=======================================
  Hits         3050     3050           
  Misses       2331     2331           
  Partials      257      257           
Flag Coverage Δ
e2e 70.38% <ø> (ø)
unit 8.45% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant