Background
When a scan encounters partial failures — transient OSV detail lookup errors, missing offline advisory records, packument fetch failures, remediation computation failures, or chain resolution failures — the current CLI output, HTML report, and JSON output give no indication that the scan result may be incomplete.
Solution
Track five incompleteness scenarios inside scanPackages, build a ScanCompleteness structure, and surface diagnostics to the output layer:
- CLI output —
printFinalStatus and printCompactOutput print a yellow warning banner at the end
- HTML report — render a
completeness-banner below the CVE summary cards, listing each failure reason
- JSON output — add
status, complete, and diagnostics fields at the top level
New types
type ScanDiagnosticCode =
| "OSV_DETAIL_TRANSIENT_FAILURE"
| "OSV_DETAIL_OFFLINE_MISSING"
| "PACKUMENT_FETCH_FAILURE"
| "REMEDIATION_FAILURE"
| "CHAIN_RESOLUTION_FAILURE";
type ScanCompleteness = {
complete: boolean;
diagnostics: ScanDiagnostic[];
};
Background
When a scan encounters partial failures — transient OSV detail lookup errors, missing offline advisory records, packument fetch failures, remediation computation failures, or chain resolution failures — the current CLI output, HTML report, and JSON output give no indication that the scan result may be incomplete.
Solution
Track five incompleteness scenarios inside
scanPackages, build aScanCompletenessstructure, and surface diagnostics to the output layer:printFinalStatusandprintCompactOutputprint a yellow warning banner at the endcompleteness-bannerbelow the CVE summary cards, listing each failure reasonstatus,complete, anddiagnosticsfields at the top levelNew types