You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(vulns): add check-sca-patches command for osv patch validation (#20)
# 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.
Copy file name to clipboardExpand all lines: README.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -103,6 +103,7 @@ conviso --help
103
103
- Vulnerabilities with local field filter (auto deep for deep fields): `python -m conviso.app vulns list --company-id 443 --all --contains codeSnippet=eval( --contains fileName=app.py`
104
104
- Vulnerabilities (DAST/WEB) search by request/response: `python -m conviso.app vulns list --company-id 443 --types DAST_FINDING,WEB_VULNERABILITY --all --contains request=Authorization --contains response=stacktrace`
105
105
- Vulnerabilities with forced deep local search: `python -m conviso.app vulns list --company-id 443 --all --contains codeSnippet=eval( --deep-search --workers 8`
0 commit comments