Skip to content

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

Open
trustify-ci-bot[bot] wants to merge 1 commit into
mainfrom
create-pull-request/patch-ed87429
Open

chore(openapi): [main] update client/openapi/trustd.yaml#1172
trustify-ci-bot[bot] wants to merge 1 commit into
mainfrom
create-pull-request/patch-ed87429

Conversation

@trustify-ci-bot

@trustify-ci-bot trustify-ci-bot Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

The openapi.yaml of trustify has changed

@sourcery-ai

sourcery-ai Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Reviewer's Guide

Updates the Trustd OpenAPI specification to add NVD as a supported importer/source alongside existing vulnerability data providers, including schema and union-type changes to model NVD-specific configuration options.

File-Level Changes

Change Details Files
Add NVD as a supported vulnerability data source/importer throughout the Trustd OpenAPI spec.
  • Extend allowed values for provider/source enums to include nvd in relevant path parameters or request bodies.
  • Add an NVD-specific branch to the importer union, requiring an nvd property referencing a new NvdImporter schema.
  • Introduce the NvdImporter schema, reusing CommonImporter and adding NVD configuration fields such as source, startYear, and years with validation and descriptions.
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 NvdImporter.years description refers to start_year, but the field is named startYear; update the description to match the actual property name for consistency.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The `NvdImporter.years` description refers to `start_year`, but the field is named `startYear`; update the description to match the actual property name for consistency.

## Individual Comments

### Comment 1
<location path="client/openapi/trustd.yaml" line_range="5036-5045" />
<code_context>
+              The base URL of the GitHub repository publishing NVD data as per-year
+              release assets (`CVE-<year>.json.xz` + `.meta`), in the NVD-API JSON
+              schema. The latest release is always used.
+          startYear:
+            type:
+            - integer
+            - 'null'
+            format: int32
+            description: |-
+              The first feed year to import when `years` is empty; all years from
+              here through the current year are imported. Defaults to 1999, the
+              first year with NVD data.
+            minimum: 0
+          years:
+            type: array
+            items:
+              type: integer
+              format: int32
+              minimum: 0
+            description: |-
+              An explicit set of feed years to import. When non-empty, exactly these
+              years are imported and `start_year` is ignored.
+            uniqueItems: true
     OrganizationDetails:
       allOf:
</code_context>
<issue_to_address>
**issue (typo):** Descriptions reference `start_year` but the field is `startYear`, which is potentially confusing.

Both `startYear` and `years` descriptions refer to `start_year`, which doesn’t exist in this schema and appears to be an internal naming copy. Please update the text to consistently reference `startYear` instead (e.g., “when `startYear` is empty” and “`startYear` is ignored”).

Suggested implementation:

```
          startYear:
            type:
            - integer
            - 'null'
            format: int32
            description: |-
              The first feed year to import when `startYear` is empty; all years from
              here through the current year are imported. Defaults to 1999, the
              first year with NVD data.
            minimum: 0

```

```
          years:
            type: array
            items:
              type: integer
              format: int32
              minimum: 0
            description: |-
              An explicit set of feed years to import. When non-empty, exactly these
              years are imported and `startYear` is ignored.
            uniqueItems: true

```
</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 +5036 to +5045
startYear:
type:
- integer
- 'null'
format: int32
description: |-
The first feed year to import when `years` is empty; all years from
here through the current year are imported. Defaults to 1999, the
first year with NVD data.
minimum: 0

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.

issue (typo): Descriptions reference start_year but the field is startYear, which is potentially confusing.

Both startYear and years descriptions refer to start_year, which doesn’t exist in this schema and appears to be an internal naming copy. Please update the text to consistently reference startYear instead (e.g., “when startYear is empty” and “startYear is ignored”).

Suggested implementation:

          startYear:
            type:
            - integer
            - 'null'
            format: int32
            description: |-
              The first feed year to import when `startYear` is empty; all years from
              here through the current year are imported. Defaults to 1999, the
              first year with NVD data.
            minimum: 0

          years:
            type: array
            items:
              type: integer
              format: int32
              minimum: 0
            description: |-
              An explicit set of feed years to import. When non-empty, exactly these
              years are imported and `startYear` is ignored.
            uniqueItems: true

@codecov

codecov Bot commented Jul 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 54.03%. Comparing base (ed87429) to head (56cd38d).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1172   +/-   ##
=======================================
  Coverage   54.03%   54.03%           
=======================================
  Files         269      269           
  Lines        5904     5904           
  Branches     1849     1849           
=======================================
  Hits         3190     3190           
  Misses       2419     2419           
  Partials      295      295           
Flag Coverage Δ
unit 6.82% <ø> (ø)

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.

Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@trustify-ci-bot
trustify-ci-bot Bot force-pushed the create-pull-request/patch-ed87429 branch from 56cd38d to d0225f1 Compare July 29, 2026 18:15

@carlosthe19916 carlosthe19916 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

🤖 Auto-approved

Only client/openapi/trustd.yaml changed — no manual review required.

@carlosthe19916
carlosthe19916 enabled auto-merge July 30, 2026 16:02
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