UNPKG

vulnzap-core

Version:

Secure AI-generated code by intercepting vulnerabilities in real-time

34 lines (33 loc) 880 B
import { VulnerabilityResult } from './github-advisory-source.js'; export default class OwaspSource { private readonly API_URL; private readonly CACHE_TTL; private readonly cachePath; private isInitialized; constructor(options?: { apiUrl?: string; cacheTtl?: number; }); initialize(): Promise<boolean>; /** * Save data to cache file * @private */ private _saveToCache; /** * Get data from cache * @private */ private _getFromCache; /** * Clear cache for specific key or all cache * @private */ private _clearCache; private makeApiRequest; private determineSeverity; private processOwaspResults; findVulnerabilities(packageName: string, version: string, ecosystem: string, options?: { refresh?: boolean; }): Promise<VulnerabilityResult>; }