Skip to content

feat(vulns): add check-sca-patches command for osv patch validation#20

Open
gabrielvmayer wants to merge 3 commits intomainfrom
feature/vulns-check-sca-patches-osv
Open

feat(vulns): add check-sca-patches command for osv patch validation#20
gabrielvmayer wants to merge 3 commits intomainfrom
feature/vulns-check-sca-patches-osv

Conversation

@gabrielvmayer
Copy link
Contributor

Description

This PR introduces a new check-sca-patches command to python -m conviso.app vulns designed to identify and cross-reference available patches for open SCA vulnerabilities.

It automatically queries the Conviso Platform for open SCA_FINDING vulnerabilities missing a patchedVersion and integrates with the public Open Source Vulnerabilities (OSV) API (api.osv.dev) to discover fixed versions.

Key features include:

  • Smart OSV Validation: Queries OSV using CVEs or Package Name + Version.
  • Alias Fallback Mechanism: Automatically follows OSV aliases (such as GHSA-* from the GitHub Advisory Database) if the primary CVE entry lacks patch details, ensuring high discovery rates.
  • Advanced Extraction Logic: Prioritizes actual semantic versions from ECOSYSTEM and database_specific ranges instead of raw git commit hashes.
  • List Compatibility: Accepts standard server-side filters (--severities, --status, --cves, --asset-tags, --asset-ids) leveraging native GraphQL parameters.

How to Test

  1. Check that the command exists:
    Run python -m conviso.app vulns check-sca-patches --help
    Confirm the new command and standard filtering options are listed.
  2. Validate the OSV fetching and table output (Dry Run):
    Run python -m conviso.app vulns check-sca-patches --company-id <ID>
    Expected behavior: The CLI should query the company's open SCA vulnerabilities, query OSV resolving any aliases for missing patches, and render a formatted table displaying the new OSV Patched Version column.
  3. Validate server-side filtering:
    Run python -m conviso.app vulns check-sca-patches --company-id <ID> --status IDENTIFIED --severities HIGH
    Expected behavior: The tool must only process and query patches for IDENTIFIED and HIGH severity vulnerabilities.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant