UNPKG

pastoralist

Version:

A tool to watch over node module resolutions and overrides

52 lines (51 loc) 1.66 kB
import type { SecurityAlert } from "../../../types"; import { logger, type RetryOptions } from "../../../utils"; export declare const clearOSVCache: () => void; export declare class OSVProvider { readonly providerType: "osv"; protected debug: boolean; protected isIRLFix: boolean; protected isIRLCatch: boolean; protected strict: boolean; protected log: ReturnType<typeof logger>; protected retryOptions: RetryOptions; private readonly osvCache; constructor(options?: { debug?: boolean; isIRLFix?: boolean; isIRLCatch?: boolean; strict?: boolean; retryOptions?: RetryOptions; cacheDir?: string; cacheTtl?: number; noCache?: boolean; }); isAvailable(): Promise<boolean>; private fetchFromOSVBatchAPI; private createOSVQueries; private requestOSVBatch; private enrichBatchResults; private fetchBatchVulnerabilities; private fetchSingleVulnerability; private fetchFullVulnerabilityDetails; private createVulnerabilityBatches; private fetchVulnerabilityBatch; private resolveVulnerabilityResult; fetchAlerts(packages: Array<{ name: string; version: string; }>, _options?: { root?: string; }): Promise<SecurityAlert[]>; private fetchBatchResults; private handleBatchFetchError; private createBatchWarning; private convertBatchResultsToAlerts; private getIRLFixtureAlerts; private convertOSVAlerts; private extractVersionRange; private extractPatchedVersion; private extractSeverity; private cvssScoreToSeverity; private extractCVEs; }