Skip to content

feat(nvd): update cves - #1271

Merged
MR2011 merged 2 commits into
mainfrom
tsim-sap/issue-1242/nvd-update-sves
Aug 27, 2026
Merged

feat(nvd): update cves#1271
MR2011 merged 2 commits into
mainfrom
tsim-sap/issue-1242/nvd-update-sves

Conversation

@tsim-sap

@tsim-sap tsim-sap commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator

Description

Adds an NVD update mode that periodically syncs modified CVEs back into Heureka, plus several additional fixes.

What type of PR is this? (check all applicable)

  • 🍕 Feature

Related Tickets & Documents

Remove if not applicable

Added tests?

  • Separate ticket for tests # (issue/pr)

Added to documentation?

  • 🙅 no documentation needed

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@tsim-sap
tsim-sap force-pushed the tsim-sap/issue-1242/nvd-update-sves branch from 6dc4e1c to 07eb7b6 Compare July 30, 2026 13:38
@tsim-sap
tsim-sap marked this pull request as ready for review July 30, 2026 20:51
Copilot AI review requested due to automatic review settings July 30, 2026 20:51

Copilot AI 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.

Pull request overview

Adds an “update mode” to the NVD scanner so it can periodically re-fetch CVEs modified in NVD (by last-modified date) and update existing Heureka Issues/IssueVariants when relevant fields change.

Changes:

  • Extend NVD scanner config and main flow to support an update mode with a configurable review interval.
  • Add processor logic (ProcessOrUpdate) plus new GraphQL queries/mutations to fetch and update Issues/IssueVariants.
  • Extend Helm chart to deploy an additional CronJob for periodic update scans.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
scanner/nvd/scanner/config.go Adds UpdateMode and ReviewIntervalDays config for last-modified update scanning.
scanner/nvd/processor/processor.go Adds update path that queries existing Issues and conditionally updates Issue/IssueVariant.
scanner/nvd/main.go Adds update-mode execution path and passes contexts through processing; adjusts time-window start timestamp.
scanner/nvd/client/queries/issuevariant_update.graphql Adds GraphQL mutation to update an IssueVariant.
scanner/nvd/client/queries/issues_query.graphql Extends issue query to include IssueVariant + CVSS vector for change detection.
scanner/nvd/client/queries/issue_update.graphql Adds GraphQL mutation to update an Issue.
scanner/nvd/chart/nvd-scanner/values.yaml Adds chart values for enabling/scheduling the update CronJob and review interval.
scanner/nvd/chart/nvd-scanner/templates/cronjob.yaml Adds a second CronJob to run the scanner in update mode.
Comments suppressed due to low confidence (1)

scanner/nvd/main.go:120

  • processCVESConcurrently’s semaphore does not actually cap concurrency: the worker goroutines continuously send tokens on an unbuffered channel, and each CVE goroutine consumes one token without returning it, so all CVE goroutines can proceed concurrently. This can cause unbounded parallel GraphQL/API calls (especially problematic in update mode).
	// sem is an unbuffered channel meaning that sending onto it will block
	// until there's a corresponding receive operation
	sem := make(chan struct{})

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread scanner/nvd/main.go
Comment thread scanner/nvd/processor/processor.go Outdated
Comment thread scanner/nvd/chart/nvd-scanner/templates/cronjob.yaml Outdated
Signed-off-by: Valiantsin Tsimoshyk <v.tsimoshyk@sap.com>
@tsim-sap
tsim-sap force-pushed the tsim-sap/issue-1242/nvd-update-sves branch from 07eb7b6 to 00c9fa2 Compare August 7, 2026 17:58
@MR2011
MR2011 merged commit af441ef into main Aug 27, 2026
11 checks passed
@MR2011
MR2011 deleted the tsim-sap/issue-1242/nvd-update-sves branch August 27, 2026 09:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(nvd): update cves

3 participants