This repository was archived by the owner on Jun 5, 2025. It is now read-only.
This repository was archived by the owner on Jun 5, 2025. It is now read-only.
Include CVE data from Insights #474
Description
CVEs gonna be handled in a simplest way so far. We'll improve it later, if needed.
Brief explanation in a comment below
Old description
Introduce Vulnerability / Version data from insights into the Vector Search system to provide contextual augmentation of CVES and version specific fixes
┌───────────────────────────┐
│ 1. CVE / Version Info │
│ introduced from insight│
└───────────────────────────┘
│
▼
┌───────────────────────────┐
│ 2. Parse code snippet │
│ and use existing │
│ Package Extractor │
│ (Package/Ecosystem) │
└───────────────────────────┘
│
▼
┌───────────────────────────┐
│ 3. Parse dependency │
│ dependency matrix │
│ for the specific │
│ version of package │
└───────────────────────────┘
│
▼
┌───────────────────────────┐
│ 4. Perform similarity │
│ search (Package & │
│ Version) │
└───────────────────────────┘
│
┌───┴───┐
│ │
CVE Matched? │
│ │
▼ ▼
┌──────────────────────┐
│ Yes: Augment prompt │
│ to guide LLM toward │
│ recommending action │
│ & fix │
└──────────────────────┘
┌──────────────────────┐
│ No: Continue as │
│ normal in pipeline │
└──────────────────────┘
Explanation:
- Introduce CVE / Version Info: Collect CVE data or package version details within the insight pipeline
- Parse Code Snippet & Extract Package: Leverage already existing “Package Extractor” to identify which packages (and their ecosystems) are used in the snippet.
- Traverse dependency matrix tree: e.g. look up the currently used package(s) captured from code snippet.
- Perform Similarity Search: Match the discovered package and version against CVEs
- CVE Matched?:
- Yes: Prompt augmentation instructs the LLM to recommend a fix (e.g., upgrade package, apply patch, warn or alternative library).
- No: Proceed without additional guidance or continue searching other data sources.
This would be contingent upon #454 landing first.
cc @yrobla