Conversation
…ted-level contract Refactor VersionStrategy from a per-version interface with numeric priorities to a slice-ordered, Affected-level contract using ExtractionState to atomically track consumed version entries and prevent duplicate extractions. Also unify CPE fallback extraction across cpeApplicability and affected[].cpes, memoize per-repo version tag resolution in ProcessRanges, and fix Linux conversion outcome counting in AddAffected.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Merges the provenance improvements from #5820 into the strategy-based CVE5 extraction architecture (
refactor/provenance) and extends range provenance with strategy-level attribution. Should be merged after #5971The best place to observe the changes is probably the snapshots.
Changes
Reference Commit vs. Tag Provenance:
REFERENCES_COMMIT(VersionSourceRefsCommit) andREFERENCES_TAG(VersionSourceRefsTag) sources to differentiate direct commit URLs from GitHub release tag URLs resolved to commits.AffectedCommitandMetadatawithSource,Strategy, andOriginalTagfields.Commit()andExtractGitCommit()to propagate the resolvedVersionSourceandOriginalTag.ExtractCommitsFromRefs) intoDefaultVersionExtractor.ExtractVersions.Strategy-Level Attribution:
ExtractionState.SetStrategyFromsoExtractAffectedRangesandCPEVersionStrategyautomatically tag extracted ranges with theVersionStrategyname (Metadata.Strategy, e.g.StandardRange,SplitRange,StringRangeExpression,StandaloneSingleVersion,CPEApplicability,CPEVersionString).Grouped
extracted_events& Direct Git Range Provenance:database_specific.extracted_eventsacrossGitVersionsToCommits,ProcessRanges(including direct Git commit ranges),CreateUnresolvedRanges, andMergeRangesAndCreateAffectedto group each extracted range with its provenance metadata (range,source,strategy,cpe,original_tag).combine-to-osv(parseExtractedEvent,parseExtractedEvents,isCPERange) to parse the groupedextracted_eventsstructure while maintaining backward compatibility.cve5andnvdsnapshots.