Skip to content

docs(adr): describe how vuln correlation works today - #2540

Open
rh-jfuller wants to merge 1 commit into
guacsec:mainfrom
rh-jfuller:adr/vuln_correlation
Open

docs(adr): describe how vuln correlation works today#2540
rh-jfuller wants to merge 1 commit into
guacsec:mainfrom
rh-jfuller:adr/vuln_correlation

Conversation

@rh-jfuller

@rh-jfuller rh-jfuller commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

view

Summary by Sourcery

Documentation:

  • Add ADR 00020 describing the status quo and future direction of the vulnerability correlation engine, including directional behaviors, ingestion constraints, and identified limitations.

Summary by Sourcery

Add an architectural decision record documenting the current design and known limitations of the vulnerability correlation engine for SBOMs and advisories.

Documentation:

  • Document the data model, query flows, and status semantics for SBOM-to-vulnerability and vulnerability-to-SBOM correlation directions.
  • Capture ingestion constraints, version matching schemes, and ecosystem-specific behaviors impacting vulnerability correlation.
  • Record a catalog of identified limitations and asymmetries between correlation directions as a basis for future refactoring.

@rh-jfuller rh-jfuller self-assigned this Jul 24, 2026
@rh-jfuller
rh-jfuller marked this pull request as draft July 24, 2026 07:31
@sourcery-ai

sourcery-ai Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Reviewer's Guide

Adds ADR 00020 documenting the current design, behavior, and limitations of the vulnerability correlation engine for both SBOM-centric (Direction A) and vulnerability-centric (Direction B) queries, including shared foundations, ingestion constraints, directional asymmetries, limitation index, and future direction notes. This PR is documentation-only with no code changes.

File-Level Changes

Change Details Files
Add ADR 00020 describing the vulnerability correlation engine architecture, query flows, and limitations for SBOM and vulnerability correlation directions.
  • Introduce a new ADR documenting shared data model and status tables used by the correlation engine.
  • Detail Direction A (SBOM → vulnerabilities) implementation, including REST endpoints, call chains, query strategies (PURL, product name, CPE), context CPE scoping, and known limitations.
  • Detail Direction B (vulnerability → SBOMs) implementation, including REST endpoint, call chain, DESCRIBES spine, query strategies, result shaping, and limitations.
  • Document ingestion-side behavior and constraints (formats, version schemes, loaders, and heuristics) that impact both directions.
  • Add an indexed list of identified limitations (L1–L20) and outline high-level future direction and consequences for planned refactors.
docs/adrs/00020-vulnerability-correlation-engine.md

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 "Leverage graph cache ?" subsection under Future Direction is a dangling heading with no content; either add a short description of what is being considered or remove the heading to avoid confusion.
  • In Part 5 and Future Direction, some TODOs and limitation descriptions reference code comments verbatim; consider tightening these to focus on the current behavior and intended change, so the ADR remains useful even if inline comments later drift.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The "Leverage graph cache ?" subsection under Future Direction is a dangling heading with no content; either add a short description of what is being considered or remove the heading to avoid confusion.
- In Part 5 and Future Direction, some TODOs and limitation descriptions reference code comments verbatim; consider tightening these to focus on the current behavior and intended change, so the ADR remains useful even if inline comments later drift.

## Individual Comments

### Comment 1
<location path="docs/adrs/00020-vulnerability-correlation-engine.md" line_range="614-616" />
<code_context>
+
+**F9. Unify version scheme assignment across loaders.** Extend `From<&str> for VersionScheme`
+to cover every PURL type with a comparator, or move scheme derivation into a single shared
+function used by all loaders, so ingestion path no longer determines match quality.
+
+### Other
</code_context>
<issue_to_address>
**suggestion (typo):** The phrase "ingestion path" may be clearer as "ingestion paths" given the context.

This sentence refers to multiple loaders and ingestion paths, so pluralizing "ingestion path" to "ingestion paths" would better match the context and surrounding text.

```suggestion
**F9. Unify version scheme assignment across loaders.** Extend `From<&str> for VersionScheme`
to cover every PURL type with a comparator, or move scheme derivation into a single shared
function used by all loaders, so ingestion paths no longer determine match quality.
```
</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 thread docs/adrs/00020-vulnerability-correlation-engine.md Outdated
@rh-jfuller rh-jfuller changed the title docs(adr): add definition of vuln correlation as it works today and d… docs(adr): describe how vuln correlation works today Jul 24, 2026
@rh-jfuller
rh-jfuller force-pushed the adr/vuln_correlation branch from 8e664ad to 8690815 Compare July 29, 2026 12:40
@rh-jfuller
rh-jfuller requested a review from a team July 29, 2026 12:40
@rh-jfuller
rh-jfuller marked this pull request as ready for review July 29, 2026 12:40

@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 reviewed your changes and they look great!


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.

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