Skip to content

feat(vulnerabilities): add reference_link field with priority-based URL selection#3988

Merged
epipav merged 6 commits intomainfrom
feat/vulnerabilities-reference-link
Apr 1, 2026
Merged

feat(vulnerabilities): add reference_link field with priority-based URL selection#3988
epipav merged 6 commits intomainfrom
feat/vulnerabilities-reference-link

Conversation

@epipav
Copy link
Copy Markdown
Collaborator

@epipav epipav commented Mar 31, 2026

Note

Medium Risk
Touches persistence/query surfaces (Postgres upsert + Tinybird schema/pipe), so deployments must ensure the underlying vulnerabilities.reference_link column exists and data shape changes won’t break downstream consumers.

Overview
Adds a new reference_link field to vulnerability findings end-to-end: the scanner now derives a best reference URL (preferring an NVD link when a CVE exists, otherwise prioritizing OSV reference types) and persists it during the vulnerabilities upsert.

Updates Tinybird ingestion and the vulnerabilities_list pipe to include this referenceLink in the dataset/output (using anyIf to avoid empty values).

Written by Cursor Bugbot for commit 2e92aa7. This will update automatically on new commits. Configure here.

…RL selection

Signed-off-by: anilb <epipav@gmail.com>
Copilot AI review requested due to automatic review settings March 31, 2026 21:26
@github-actions
Copy link
Copy Markdown
Contributor

⚠️ Jira Issue Key Missing

Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability.

Example:

  • feat: add user authentication (CM-123)
  • feat: add user authentication (IN-123)

Projects:

  • CM: Community Data Platform
  • IN: Insights

Please add a Jira issue key to your PR title.

@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@github-actions
Copy link
Copy Markdown
Contributor

⚠️ Jira Issue Key Missing

Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability.

Example:

  • feat: add user authentication (CM-123)
  • feat: add user authentication (IN-123)

Projects:

  • CM: Community Data Platform
  • IN: Insights

Please add a Jira issue key to your PR title.

@github-actions
Copy link
Copy Markdown
Contributor

⚠️ Jira Issue Key Missing

Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability.

Example:

  • feat: add user authentication (CM-123)
  • feat: add user authentication (IN-123)

Projects:

  • CM: Community Data Platform
  • IN: Insights

Please add a Jira issue key to your PR title.

@github-actions
Copy link
Copy Markdown
Contributor

⚠️ Jira Issue Key Missing

Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability.

Example:

  • feat: add user authentication (CM-123)
  • feat: add user authentication (IN-123)

Projects:

  • CM: Community Data Platform
  • IN: Insights

Please add a Jira issue key to your PR title.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a reference_link field to vulnerability records end-to-end (scanner → DB upsert → Tinybird datasource → Tinybird list pipe) so clients can display a canonical URL for each vulnerability.

Changes:

  • Extend vulnerability scanner output to compute and persist a single “best” reference URL per vulnerability.
  • Persist reference_link in the DB upsert and expose it in Tinybird ingestion schema.
  • Return referenceLink from the Tinybird vulnerabilities_list pipe output.

Reviewed changes

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

Show a summary per file
File Description
services/apps/git_integration/src/crowdgit/services/vulnerability_scanner/vulnerability_scanner.go Adds best-reference URL selection and includes it in normalized vulnerability output.
services/apps/git_integration/src/crowdgit/services/vulnerability_scanner/types.go Adds ReferenceLink to the Vulnerability struct JSON payload.
services/apps/git_integration/src/crowdgit/services/vulnerability_scanner/db.go Writes reference_link into the vulnerabilities upsert (insert + conflict update).
services/libs/tinybird/datasources/vulnerabilities.datasource Adds referenceLink column mapping from record.reference_link.
services/libs/tinybird/pipes/vulnerabilities_list.pipe Returns referenceLink in the aggregated vulnerabilities list response.

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

epipav added 2 commits April 1, 2026 00:03
…dDotDev/crowd.dev into feat/vulnerabilities-reference-link
@github-actions
Copy link
Copy Markdown
Contributor

⚠️ Jira Issue Key Missing

Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability.

Example:

  • feat: add user authentication (CM-123)
  • feat: add user authentication (IN-123)

Projects:

  • CM: Community Data Platform
  • IN: Insights

Please add a Jira issue key to your PR title.

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

There are 2 total unresolved issues (including 1 from previous review).

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 1, 2026

⚠️ Jira Issue Key Missing

Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability.

Example:

  • feat: add user authentication (CM-123)
  • feat: add user authentication (IN-123)

Projects:

  • CM: Community Data Platform
  • IN: Insights

Please add a Jira issue key to your PR title.

@epipav epipav requested a review from themarolt April 1, 2026 08:40
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 1, 2026

⚠️ Jira Issue Key Missing

Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability.

Example:

  • feat: add user authentication (CM-123)
  • feat: add user authentication (IN-123)

Projects:

  • CM: Community Data Platform
  • IN: Insights

Please add a Jira issue key to your PR title.

@epipav epipav merged commit 20f8fe4 into main Apr 1, 2026
16 checks passed
@epipav epipav deleted the feat/vulnerabilities-reference-link branch April 1, 2026 11:47
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.

4 participants