feat(govulncheck): add Govulncheck Scanner V2 parser#15045
Open
valentijnscholten wants to merge 1 commit into
Open
feat(govulncheck): add Govulncheck Scanner V2 parser#15045valentijnscholten wants to merge 1 commit into
valentijnscholten wants to merge 1 commit into
Conversation
Add a second scan type, Govulncheck Scanner V2, that parses the streaming JSON output by iterating finding records instead of osv advisory definitions. This drops advisories that do not apply to the scanned code, derives severity from reachability level, and maps findings to components. The original Govulncheck Scanner parser is unchanged.
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.
Summary
Adds a second scan type, Govulncheck Scanner V2, for the govulncheck streaming JSON format (
govulncheck -format json ./...), addressing the inconsistencies reported in #15033. The original Govulncheck Scanner parser is left unchanged so existing imports keep working.osvadvisory definitions in the stream and creates one finding per definition. On the sample from Govulncheck JSON and SARIF Parsers Produce Inconsistent and Incorrect Results #15033 this produced 234 findings — most of them advisories that are present in the vulnerability database stream but do not actually apply to the scanned code.findingrecords instead, so only vulnerabilities that actually apply to the code are imported. On the same sample it produces 72 findings.symbol(vulnerable symbol is called) → Highpackage(vulnerable package imported) → Lowmodule(vulnerable module required) → Infogovulncheck ./...output.component_name/component_versionpopulated from the trace).unique_id_from_toolis"{osv}:{module}".