Skip to content

Add vulnerability, license and outdated helpers#29

Open
abhinavgautam01 wants to merge 1 commit into
git-pkgs:mainfrom
abhinavgautam01:issue-10-vuln-license-outdated
Open

Add vulnerability, license and outdated helpers#29
abhinavgautam01 wants to merge 1 commit into
git-pkgs:mainfrom
abhinavgautam01:issue-10-vuln-license-outdated

Conversation

@abhinavgautam01

Copy link
Copy Markdown

fixes #10

Summary

Adds shared enrichment helpers for the logic currently duplicated across consumers:

  • Add OSV-backed vulnerability checking via CheckVulnerabilities, BulkCheckVulnerabilities and VulnerabilityClient
  • Add shared VulnInfo, VulnerabilityQuery and VulnerabilityResult types
  • Add CategorizeLicense for permissive/copyleft/unknown classification using SPDX normalization
  • Add IsOutdated for version comparison
  • Add VersionInfo.Yanked and populate it from direct registry lookups
  • Document the new APIs in the README

Notes

The vulnerability client uses OSV by default, but supports injecting another vulns.Source. License categorization and outdated detection are local helpers, so they still work in direct/private registry environments.

Tests

go test ./...

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.

Add vulnerability checking, license categorization, and outdated detection

1 participant